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

Add missing k256 kat_tests #67

Draft
wants to merge 15 commits into
base: unstable-k256
Choose a base branch
from
6 changes: 5 additions & 1 deletion src/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ impl<A: Aead, Kdf: KdfTrait, Kem: KemTrait> AeadCtx<A, Kdf, Kem> {
.labeled_expand(&self.suite_id, b"sec", exporter_ctx, out_buf)
.map_err(|_| HpkeError::KdfOutputTooLong)
}

pub(crate) fn current_nonce(&self) -> AeadNonce<A> {
mix_nonce::<A>(&self.base_nonce, &self.seq)
}
}

/// The HPKE receiver's context. This is what you use to `open` ciphertexts and `export` secrets.
Expand Down Expand Up @@ -355,7 +359,7 @@ impl<A: Aead, Kdf: KdfTrait, Kem: KemTrait> AeadCtxR<A, Kdf, Kem> {
}

/// The HPKE senders's context. This is what you use to `seal` plaintexts and `export` secrets.
pub struct AeadCtxS<A: Aead, Kdf: KdfTrait, Kem: KemTrait>(AeadCtx<A, Kdf, Kem>);
pub struct AeadCtxS<A: Aead, Kdf: KdfTrait, Kem: KemTrait>(pub(crate) AeadCtx<A, Kdf, Kem>);

// AeadCtx -> AeadCtxS via wrapping
impl<A: Aead, Kdf: KdfTrait, Kem: KemTrait> From<AeadCtx<A, Kdf, Kem>> for AeadCtxS<A, Kdf, Kem> {
Expand Down
6 changes: 6 additions & 0 deletions src/fursona.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
b"my fursona is personal ok": 3695819e3cc5f3df753b7eedfc3c0adadabb0511acab818ebac13dd5ec27b986
b"my fursona is for my eyes only": df89e798e5048101b966e46a09c17b991db75e3151982d33cb79890b869f69c0
b"don't tread on my fursona": 7736453cadf9543f5ba50856a313f218bd70513226d342c6b6f04b18b8026b1c

"psk": "0247fd33b913760fa1fa51e1892d9f307fbe65eb171e8132c2af18555a738b82",
"psk_id": "456e6e796e20447572696e206172616e204d6f726961",
Loading
Loading