From e3efc5455185bc984b2e49f0d54c9bded1b4f269 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 5 Nov 2017 23:24:54 -0500 Subject: computeSharedSecret: more explicit pre-computation. --- src/Crypto/Tox.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- (Poly1305.State, XSalsa.State) computeSharedSecret :: SecretKey -> PublicKey -> Nonce24 -> State -computeSharedSecret sk recipient = \nonce -> +computeSharedSecret sk recipient = k `seq` \nonce -> let -- cipher state st0 = XSalsa.initialize 20 k nonce -- Poly1305 key -- cgit v1.2.3