Skip to main content

auth_enc

Function auth_enc 

Source
pub fn auth_enc<R: RngCore + CryptoRng>(
    rng: &mut R,
    kp: &MessageKeyPair,
    pk: &MessagePublicKey,
    m: &[u8],
    ad: &[u8],
    info_incl: &DHPublicKey,
) -> Result<MessageCiphertext, Error>
Expand description

SD-APKE.AuthEnc: encrypt message m from sender to recipient.

  • kp = ((skS1, skS2), (pkS1, pkS2)): sender’s SD-APKE keypair
  • pk = (pkR1, pkR2): recipient’s SD-APKE public key
  • ad: associated data
  • info_incl: additional opaque bytes to include in info param, currently receiver’s fetch key.

§Errors

Returns an error if ML-KEM encapsulation or HPKE sealing fails.