diff options
author | joe <joe@jerkface.net> | 2017-11-05 23:24:54 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-11-05 23:24:54 -0500 |
commit | e3efc5455185bc984b2e49f0d54c9bded1b4f269 (patch) | |
tree | 871eef2dacae091e336b5395fdbf4b65cf2c3fe9 | |
parent | 4b0cdcbb19d2e585aa764fce2d68f81d6b0aaf2c (diff) |
computeSharedSecret: more explicit pre-computation.
-rw-r--r-- | src/Crypto/Tox.hs | 2 |
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) |
246 | computeSharedSecret :: SecretKey -> PublicKey -> Nonce24 -> State | 246 | computeSharedSecret :: SecretKey -> PublicKey -> Nonce24 -> State |
247 | computeSharedSecret sk recipient = \nonce -> | 247 | computeSharedSecret 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 |