diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2017-04-22 23:37:33 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2017-04-23 00:19:38 +0300 |
commit | 5048672e81f3ee9aa864ef9d736a3d74da051754 (patch) | |
tree | 8148405d428027ceab0528cf186a9faf3817b196 /libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c | |
parent | df4c8656be0e85a69a238f3fc3f4d53568c53828 (diff) |
libs: libsignal-c: sync with upstream
Diffstat (limited to 'libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c')
-rw-r--r-- | libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c b/libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c index 802a73563d..8f60169bd4 100644 --- a/libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c +++ b/libs/libaxolotl/src/curve25519/ed25519/additions/vxeddsa.c @@ -50,7 +50,6 @@ int vxed25519_verify(unsigned char* vrf_out, fe u; fe y; unsigned char ed_pubkey[32]; - unsigned char strict[32]; unsigned char verifybuf[MAX_MSG_LEN + 160]; /* working buffer */ unsigned char verifybuf2[MAX_MSG_LEN + 160]; /* working buffer #2 ?? !!! */ ge_p3 Bv; @@ -65,10 +64,9 @@ int vxed25519_verify(unsigned char* vrf_out, 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); |