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