Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix k256 vectors #1

Open
wants to merge 1 commit into
base: update-kem-algos
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tests/test_hpke_kat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ fn kat<Crypto: HpkeCrypto + 'static>(tests: Vec<HpkeTestVector>) {
// Replace into_par_iter() with into_iter() to run tests sequentially.
// tests.into_par_iter().for_each(|test| {
tests.into_iter().for_each(|test| {
println!(
"Testing mode {:?} with ciphersuite {:?}_{:?}_{:?}",
test.mode, test.kem_id, test.kdf_id, test.aead_id
);
let mode: HpkeMode = test.mode.try_into().unwrap();
let kem_id: KemAlgorithm = test.kem_id.try_into().unwrap();
let kdf_id: KdfAlgorithm = test.kdf_id.try_into().unwrap();
Expand Down Expand Up @@ -153,9 +157,9 @@ fn kat<Crypto: HpkeCrypto + 'static>(tests: Vec<HpkeTestVector>) {

// Check setup info
// Note that key and nonce are empty for exporter only key derivation.
// assert_eq!(direct_ctx.key(), key);
// assert_eq!(direct_ctx.nonce(), nonce);
// assert_eq!(direct_ctx.exporter_secret(), exporter_secret);
assert_eq!(direct_ctx.key(), key);
assert_eq!(direct_ctx.nonce(), nonce);
assert_eq!(direct_ctx.exporter_secret(), exporter_secret);
assert_eq!(direct_ctx.sequence_number(), 0);

// Test key pair derivation.
Expand Down
Loading