From d739478ae17384d4359bc6dd9b6aeebefb9bfdb1 Mon Sep 17 00:00:00 2001 From: Orson Peters Date: Sun, 24 Mar 2013 22:44:10 +0100 Subject: [PATCH] added formula to key exchange as comment --- src/key_exchange.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key_exchange.c b/src/key_exchange.c index 924da79..a856361 100644 --- a/src/key_exchange.c +++ b/src/key_exchange.c @@ -27,7 +27,7 @@ void ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *pub e[31] |= 64; /* unpack the public key and convert edwards to montgomery */ - /* due to CodesInChaos */ + /* due to CodesInChaos: montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p */ fe_frombytes(x1, public_key); fe_1(tmp1); fe_add(tmp0, x1, tmp1);