diff options
Diffstat (limited to 'libs/libaxolotl/src/curve25519/ed25519/additions/xeddsa.c')
-rw-r--r-- | libs/libaxolotl/src/curve25519/ed25519/additions/xeddsa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/libaxolotl/src/curve25519/ed25519/additions/xeddsa.c b/libs/libaxolotl/src/curve25519/ed25519/additions/xeddsa.c index ee2964a0d5..63b73bf2ed 100644 --- a/libs/libaxolotl/src/curve25519/ed25519/additions/xeddsa.c +++ b/libs/libaxolotl/src/curve25519/ed25519/additions/xeddsa.c @@ -49,7 +49,6 @@ int xed25519_verify(const unsigned char* signature, fe u; fe y; unsigned char ed_pubkey[32]; - unsigned char strict[32]; unsigned char verifybuf[MAX_MSG_LEN + 64]; /* working buffer */ unsigned char verifybuf2[MAX_MSG_LEN + 64]; /* working buffer #2 */ @@ -63,10 +62,9 @@ int xed25519_verify(const unsigned char* signature, NOTE: u=-1 is converted to y=0 since fe_invert is mod-exp */ + if (!fe_isreduced(curve25519_pubkey)) + return -1; fe_frombytes(u, curve25519_pubkey); - fe_tobytes(strict, u); - if (crypto_verify_32(strict, curve25519_pubkey) != 0) - return 0; fe_montx_to_edy(y, u); fe_tobytes(ed_pubkey, y); |