pub fn AuthDecap(
alg: KEM,
enc: &ByteSeq,
skR: &PrivateKey,
pkS: &PublicKey
) -> Result<SharedSecret, HpkeError>
Expand description
def AuthDecap(enc, skR, pkS):
pkE = DeserializePublicKey(enc)
dh = concat(DH(skR, pkE), DH(skR, pkS))
pkRm = SerializePublicKey(pk(skR))
pkSm = SerializePublicKey(pkS)
kem_context = concat(enc, pkRm, pkSm)
shared_secret = ExtractAndExpand(dh, kem_context)
return shared_secret