Skip to content

Commit

Permalink
Update Valgrind's constant-time test
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklonga committed Jun 11, 2022
1 parent 61ad2bc commit 753cfb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sidh.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ int EphemeralSecretAgreement_B_extended(const unsigned char* PrivateKeyB, const
// Alice's PublicKeyA consists of 3 elements in GF(p^2) encoded by removing leading 0 bytes.
// Output: a shared secret SharedSecretB that consists of one element in GF(p^2) encoded by removing leading 0 bytes.
point_proj_t R, pts[MAX_INT_POINTS_BOB];
f2elm_t coeff[3], PKB[3] = {0}, jinv;
f2elm_t coeff[3], PKB[3], jinv;
f2elm_t A24plus = {0}, A24minus = {0}, A = {0};
unsigned int i, row, m, index = 0, pts_index[MAX_INT_POINTS_BOB], npts = 0, ii = 0;
digit_t SecretKeyB[NWORDS_ORDER] = {0};
Expand Down
1 change: 1 addition & 0 deletions src/sike.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ int crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned ch
int8_t selector = -1;
#ifdef DO_VALGRIND_CHECK
VALGRIND_MAKE_MEM_UNDEFINED(sk, MSG_BYTES + SECRETKEY_B_BYTES);
VALGRIND_MAKE_MEM_DEFINED(ct, CRYPTO_CIPHERTEXTBYTES);
#endif

// Decrypt
Expand Down

0 comments on commit 753cfb4

Please sign in to comment.