replace random nonces with message sequence numbers in tcp crypto
Since TCP is reliable, we do not need to transmit the nonce itself; the recipient can simply construct the nonce from its own message counter. Hence there is no message envelope and we can thus remove a whole layer of encoding.
This commit is contained in:
1 parent
87f47a60ae
commit
696bfe464c
3 files changed
+45
-79
No files matched your search
+1
-1
@@ -102,7 +102,7 @@ func (conn *LocalConnection) handshake(enc *gob.Encoder, dec *gob.Decoder, accep
|
||||
remotePublic[idx] = elem
|
||||
}
|
||||
conn.SessionKey = FormSessionKey(&remotePublic, private, conn.Router.Password)
|
||||
conn.tcpSender = NewEncryptedTCPSender(enc, conn.SessionKey)
|
||||
conn.tcpSender = NewEncryptedTCPSender(enc, conn.SessionKey, conn.outbound)
|
||||
conn.Decryptor = NewNaClDecryptor(conn.SessionKey)
|
||||
} else {
|
||||
if rpErr == nil {
|
||||
|
||||
Reference in new issue
Block a user