law Api256.bad_nonce

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/aes/laws.bend:433

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/laws.bend as Laws
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/aesgcm.bend as GCM

433# A nonce other than 12 bytes is rejected.
434law Api256.bad_nonce:
435  for +key: List<&2, U32>
436  for +nonce: List<&2, U32>
437  for +h: {Nat.is_eq(List.length(&2, U32, nonce), 12n) == False{} : Bool}
438  for +aad: List<&2, U32>
439  for +pt: List<&2, U32>
440  {GCM.aes256_gcm_encrypt(key, nonce, aad, pt) == None{} : Maybe<&2, List<&2, U32>>}

Uses (9)

Used by (0)

No other definition uses this definition.