Skip to main content

auth_enc

Function auth_enc 

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

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

  • sk = (skS1, skS2): sender’s SD-APKE private key
  • pk = (pkR1, pkR2): recipient’s SD-APKE public key
  • ad: associated data
  • info: caller-supplied info (spec prepends c2 internally: info = c2 + info)

§Errors

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