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:
Matthias Radestock committed 2015-04-30 14:47:16 +01:00
1 parent 87f47a60ae
commit 696bfe464c
3 files changed
+45 -79

No files matched your search

+1 -1
View File
@@ -446,7 +446,7 @@ func (conn *LocalConnection) receiveTCP(decoder *gob.Decoder) {
usingPassword := conn.SessionKey != nil
var receiver TCPReceiver
if usingPassword {
receiver = NewEncryptedTCPReceiver(conn.SessionKey)
receiver = NewEncryptedTCPReceiver(conn.SessionKey, conn.outbound)
} else {
receiver = NewSimpleTCPReceiver()
}