summaryrefslogtreecommitdiff
path: root/src/Crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto')
-rw-r--r--src/Crypto/Tox.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Crypto/Tox.hs b/src/Crypto/Tox.hs
index 0a7f07c3..d1992967 100644
--- a/src/Crypto/Tox.hs
+++ b/src/Crypto/Tox.hs
@@ -263,7 +263,12 @@ computeSharedSecret sk recipient = k `seq` \nonce ->
263 in State hash crypt 263 in State hash crypt
264 where 264 where
265 -- diffie helman 265 -- diffie helman
266#if MIN_VERSION_cryptonite(0,24,0)
267 -- TODO: Handle failure.
268 Cryptonite.CryptoPassed shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient
269#else
266 shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient 270 shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient
271#endif
267 -- shared secret XSalsa key 272 -- shared secret XSalsa key
268 k = hsalsa20 shared zeros24 273 k = hsalsa20 shared zeros24
269 274