Update derived traits, add ability to zeroize on drop, and refactor

This commit is contained in:
Neemek 2025-11-13 17:25:56 +01:00
parent 78f077b3b4
commit 082adec86b
4 changed files with 28 additions and 18 deletions

View file

@ -1,5 +1,4 @@
#![cfg(feature = "rand")]
use crypto_bigint::subtle::ConstantTimeEq;
use diffie_hellman::{Public, Secret};
#[test]
@ -13,5 +12,5 @@ fn random_dh_key_exchange() {
let sa = a.diffie_hellman(&pb);
let sb = b.diffie_hellman(&pa);
println!("{} == {}", sa, sb)
assert!(bool::from(sa.ct_eq(&sb)));
}