Skip to content

Commit b777919

Browse files
committed
eddsa: zero orig_k after sign
1 parent 211359f commit b777919

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

wolfcrypt/src/ed25519.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ int wc_ed25519_sign_msg_ex(const byte* in, word32 inLen, byte* out,
548548
}
549549
ret = ctMaskGT(c, 0) & SIG_VERIFY_E;
550550
}
551+
ForceZero(orig_k, sizeof(orig_k));
551552
#endif
552553

553554
return ret;

wolfcrypt/src/ed448.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ int wc_ed448_sign_msg_ex(const byte* in, word32 inLen, byte* out,
505505
}
506506
ret = ctMaskGT(c, 0) & SIG_VERIFY_E;
507507
}
508+
ForceZero(orig_k, sizeof(orig_k));
508509
#endif
509510

510511
ForceZero(az, sizeof(az));

0 commit comments

Comments
 (0)