Skip to content

Commit

Permalink
Fail sig verify if public key is small order
Browse files Browse the repository at this point in the history
  • Loading branch information
sakridge committed Jul 31, 2020
1 parent 8c14000 commit 79455d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cuda-ecc-ed25519/verify.cu
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ ed25519_verify_device(const unsigned char *signature,
return 0;
}

if (0 != ge_is_small_order(&A)) {
return 0;
}

sha512_init(&hash);
sha512_update(&hash, signature, 32);
sha512_update(&hash, public_key, 32);
Expand Down

0 comments on commit 79455d2

Please sign in to comment.