Skip to content

Commit

Permalink
undo unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
keks committed Aug 22, 2024
1 parent 3f76e07 commit 87f8dfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dh_kem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ pub(super) fn auth_decaps<Crypto: HpkeCrypto>(
) -> Result<Vec<u8>, Error> {
let pk_e = deserialize(enc);
let dh_pk = concat(&[
&Crypto::kem_derive(alg, &pk_e, sk_r).unwrap(),
&Crypto::kem_derive(alg, pk_s, sk_r).unwrap(),
&Crypto::kem_derive(alg, &pk_e, sk_r)?,
&Crypto::kem_derive(alg, pk_s, sk_r)?,
]);

let pk_rm = serialize(&Crypto::kem_derive_base(alg, sk_r).unwrap());
let pk_rm = serialize(&Crypto::kem_derive_base(alg, sk_r)?);
let pk_sm = serialize(pk_s);
let kem_context = concat(&[enc, &pk_rm, &pk_sm]);

Expand Down

0 comments on commit 87f8dfd

Please sign in to comment.