Function hpke::ContextR_Open
source · [−]pub fn ContextR_Open(
aead_id: AEAD,
context: (Key, Nonce, u32, ByteSeq),
aad: &ByteSeq,
ct: &ByteSeq
) -> Result<(ByteSeq, (Key, Nonce, u32, ByteSeq)), HpkeError>
Expand description
Stateful open.
See ContextR.Open for more details.
The recipient’s context can decrypt a ciphertext ct
with associated
data aad
as follows:
def ContextR.Open(aad, ct):
pt = Open(self.key, self.ComputeNonce(self.seq), aad, ct)
if pt == OpenError:
raise OpenError
self.IncrementSeq()
return pt