Skip to content

Commit

Permalink
Add link the proper way to do HPKE KEM context binding
Browse files Browse the repository at this point in the history
  • Loading branch information
OR13 committed May 26, 2024
1 parent a629e7d commit db11faa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cose/encrypt/hpke/direct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ const sharedSecretToContentEncryptionKey = async (sharedSecret: Uint8Array) => {
// https://datatracker.ietf.org/doc/html/rfc9180#section-4-10
// labeled_ikm = concat("HPKE-v1", suite_id, label, ikm)
// 🔥 this is ALL WRONG.... 🔥
// fake
// need to follow https://datatracker.ietf.org/doc/html/draft-connolly-cfrg-hpke-mlkem-00#name-encap-and-decap
// 🔥 this is ALL WRONG.... 🔥
const suite_id = Buffer.from('0xFFFF', 'hex') // unassigned kem id https://www.iana.org/assignments/hpke/hpke.xhtml
// should be:
// suite_id = concat(
Expand Down

0 comments on commit db11faa

Please sign in to comment.