law roundtrip

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/aead/laws.bend:164

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aead/laws.bend as Laws
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/aead.bend as A

164# decrypt(encrypt(x)) == Some(x).
165law roundtrip:
166  for +alg: A.Alg
167  for +key: List<&2, U32>
168  for +nonce: List<&2, U32>
169  for +aad: List<&2, U32>
170  for +pt: List<&2, U32>
171  for +hk: {List.length(&2, U32, key) == A.key_size(alg) : Nat}
172  for +hn: {List.length(&2, U32, nonce) == A.nonce_size(alg) : Nat}
173  {decrypt_sealed(alg, key, nonce, aad, A.encrypt(alg, key, nonce, aad, pt)) == Some{pt} : Maybe<&2, List<&2, U32>>}

Uses (17)

Used by (0)

No other definition uses this definition.