summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-05 23:24:54 -0500
committerjoe <joe@jerkface.net>2017-11-05 23:24:54 -0500
commite3efc5455185bc984b2e49f0d54c9bded1b4f269 (patch)
tree871eef2dacae091e336b5395fdbf4b65cf2c3fe9 /src
parent4b0cdcbb19d2e585aa764fce2d68f81d6b0aaf2c (diff)
computeSharedSecret: more explicit pre-computation.
Diffstat (limited to 'src')
-rw-r--r--src/Crypto/Tox.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Crypto/Tox.hs b/src/Crypto/Tox.hs
index f427421e..88a7372f 100644
--- a/src/Crypto/Tox.hs
+++ b/src/Crypto/Tox.hs
@@ -244,7 +244,7 @@ encrypt (State hash crypt) (Plain m) = Encrypted $ B.append (encode a) c
244 244
245-- (Poly1305.State, XSalsa.State) 245-- (Poly1305.State, XSalsa.State)
246computeSharedSecret :: SecretKey -> PublicKey -> Nonce24 -> State 246computeSharedSecret :: SecretKey -> PublicKey -> Nonce24 -> State
247computeSharedSecret sk recipient = \nonce -> 247computeSharedSecret sk recipient = k `seq` \nonce ->
248 let -- cipher state 248 let -- cipher state
249 st0 = XSalsa.initialize 20 k nonce 249 st0 = XSalsa.initialize 20 k nonce
250 -- Poly1305 key 250 -- Poly1305 key