pub fn AuthEncap(
alg: KEM,
pkR: &PublicKey,
skS: &PrivateKey,
randomness: Randomness
) -> EncapResult
Expand description
def AuthEncap(pkR, skS):
skE, pkE = GenerateKeyPair()
dh = concat(DH(skE, pkR), DH(skS, pkR))
enc = SerializePublicKey(pkE)
pkRm = SerializePublicKey(pkR)
pkSm = SerializePublicKey(pk(skS))
kem_context = concat(enc, pkRm, pkSm)
shared_secret = ExtractAndExpand(dh, kem_context)
return shared_secret, enc