summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto/Transport.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-06-02 04:08:54 -0400
committerjoe <joe@jerkface.net>2018-06-02 04:08:54 -0400
commitbc8c61dd7933f1cacd91282c0476f7bc46795daf (patch)
treea1a70df0fecd312152bc7ad421457dc28cf7e18e /src/Network/Tox/Crypto/Transport.hs
parent1a2e32e7ae1e6e2e9e02ae4fefeb3645e4fb6028 (diff)
Change Cookie -> Cookie Encrypted
Diffstat (limited to 'src/Network/Tox/Crypto/Transport.hs')
-rw-r--r--src/Network/Tox/Crypto/Transport.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/Tox/Crypto/Transport.hs b/src/Network/Tox/Crypto/Transport.hs
index 0588da4b..e23d1865 100644
--- a/src/Network/Tox/Crypto/Transport.hs
+++ b/src/Network/Tox/Crypto/Transport.hs
@@ -99,7 +99,7 @@ data Handshake (f :: * -> *) = Handshake
99 -- response packet with a cookie in it. It may also be obtained in the 99 -- response packet with a cookie in it. It may also be obtained in the
100 -- handshake packet by a peer receiving a handshake packet (Other 100 -- handshake packet by a peer receiving a handshake packet (Other
101 -- Cookie). 101 -- Cookie).
102 handshakeCookie :: Cookie 102 handshakeCookie :: Cookie f
103 -- The nonce is a nonce used to encrypt the encrypted part of the handshake 103 -- The nonce is a nonce used to encrypt the encrypted part of the handshake
104 -- packet. 104 -- packet.
105 , handshakeNonce :: Nonce24 105 , handshakeNonce :: Nonce24
@@ -113,10 +113,10 @@ instance Serialize (Handshake Encrypted) where
113 put (Handshake cookie n24 dta) = put cookie >> put n24 >> put dta 113 put (Handshake cookie n24 dta) = put cookie >> put n24 >> put dta
114 114
115data HandshakeData = HandshakeData 115data HandshakeData = HandshakeData
116 { baseNonce :: Nonce24 116 { baseNonce :: Nonce24 -- ^ [24 bytes base nonce]
117 , sessionKey :: PublicKey 117 , sessionKey :: PublicKey -- ^ [session public key of the peer (32 bytes)]
118 , cookieHash :: Digest SHA512 118 , cookieHash :: Digest SHA512 -- ^ [sha512 hash of the entire Cookie sitting outside the encrypted part]
119 , otherCookie :: Cookie 119 , otherCookie :: Cookie Encrypted -- ^ [Other Cookie (used by the other to respond to the handshake packet)]
120 } 120 }
121 121
122instance Sized HandshakeData where 122instance Sized HandshakeData where