summaryrefslogtreecommitdiff
path: root/libs/libsodium/src/crypto_sign
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-07-18 00:06:49 +0300
committeraunsane <aunsane@gmail.com>2018-07-18 00:17:42 +0300
commit5a8dadd96ca13797f67c39079ba5c4889ef8c421 (patch)
tree0532b9a3c21feb03a6a3be810f559ebf0af45947 /libs/libsodium/src/crypto_sign
parent39d52f0ab12ecf2a3a5f48bf7af140db282a13a6 (diff)
updated libsodium
Diffstat (limited to 'libs/libsodium/src/crypto_sign')
-rw-r--r--libs/libsodium/src/crypto_sign/ed25519/ref10/open.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/libsodium/src/crypto_sign/ed25519/ref10/open.c b/libs/libsodium/src/crypto_sign/ed25519/ref10/open.c
index c9e8843c1e..aafecf64a1 100644
--- a/libs/libsodium/src/crypto_sign/ed25519/ref10/open.c
+++ b/libs/libsodium/src/crypto_sign/ed25519/ref10/open.c
@@ -23,21 +23,21 @@ _crypto_sign_ed25519_verify_detached(const unsigned char *sig,
ge25519_p3 A;
ge25519_p2 R;
-#ifndef ED25519_COMPAT
- if (sc25519_is_canonical(sig + 32) == 0 ||
- ge25519_has_small_order(sig) != 0) {
+#ifdef ED25519_COMPAT
+ if (sig[63] & 224) {
return -1;
}
- if (ge25519_is_canonical(pk) == 0) {
+#else
+ if (sc25519_is_canonical(sig + 32) == 0 ||
+ ge25519_has_small_order(sig) != 0) {
return -1;
}
-#else
- if (sig[63] & 224) {
+ if (ge25519_is_canonical(pk) == 0 ||
+ ge25519_has_small_order(pk) != 0) {
return -1;
}
#endif
- if (ge25519_has_small_order(pk) != 0 ||
- ge25519_frombytes_negate_vartime(&A, pk) != 0) {
+ if (ge25519_frombytes_negate_vartime(&A, pk) != 0) {
return -1;
}
_crypto_sign_ed25519_ref10_hinit(&hs, prehashed);