Skip to content

Commit

Permalink
ed25519: fix fd_r43x6_ge_decode2 produces non-canonical results #fuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0ece committed Mar 15, 2024
1 parent 3401bfc commit 4d26e5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Binary file not shown.
2 changes: 2 additions & 0 deletions src/ballet/ed25519/avx512/fd_r43x6_ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ fd_r43x6_ge_decode( wwl_t * _P03, wwl_t * _P14, wwl_t * _P25,
y, /* Reduced */
one, /* Reduced */
fd_r43x6_mul( x, y ) ); /* in u44 */
FD_R43X6_QUAD_FOLD_UNSIGNED( *_P, *_P );
return 0;

fail:
Expand Down Expand Up @@ -234,6 +235,7 @@ fd_r43x6_ge_decode2( wwl_t * _Pa03, wwl_t * _Pa14, wwl_t * _Pa25,
fd_r43x6_t xya, xyb; FD_R43X6_MUL2_INL ( xya, xa,ya, xyb, xb,yb );

FD_R43X6_QUAD_PACK( *_Pa, xa,ya,one,xya ); FD_R43X6_QUAD_PACK( *_Pb, xb,yb,one,xyb );
FD_R43X6_QUAD_FOLD_UNSIGNED( *_Pa, *_Pa ); FD_R43X6_QUAD_FOLD_UNSIGNED( *_Pb, *_Pb );
return 0;

faila:
Expand Down

0 comments on commit 4d26e5b

Please sign in to comment.