See analysis below, saltchannel.dev.RunClient/RunServer were used.
Implement the possibility that the server sends M2+M3 together in one write instead of two write operations.
WIRESHARK ANALYSIS 2017-05-10
402 bytes total
C S
46 ----->
<----- 42
<---- 124
158 ---->
<----- 34
46+42+124+158+34 = 404 bytes.
The Salt Channel handshake is: 46+42+124+124 = 336 bytes.
Note, we have two TCP packets 42+124. This could be avoided.
When IO is slow compared to crypto, 42+124 should be combined into one write.
When crypto is slow compared to IO, it makes sense to split them.
See analysis below, saltchannel.dev.RunClient/RunServer were used. Implement the possibility that the server sends M2+M3 together in one write instead of two write operations.
WIRESHARK ANALYSIS 2017-05-10
402 bytes total
46+42+124+158+34 = 404 bytes. The Salt Channel handshake is: 46+42+124+124 = 336 bytes.
Note, we have two TCP packets 42+124. This could be avoided. When IO is slow compared to crypto, 42+124 should be combined into one write. When crypto is slow compared to IO, it makes sense to split them.