law Api128.bad_key

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

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

285# A key of another length is rejected.
286law Api128.bad_key:
287  for +key: List<&2, U32>
288  for +h: {Nat.is_eq(List.length(&2, U32, key), 16n) == False{} : Bool}
289  for +nonce: List<&2, U32>
290  for +aad: List<&2, U32>
291  for +pt: List<&2, U32>
292  {GCM.aes128_gcm_encrypt(key, nonce, aad, pt) == None{} : Maybe<&2, List<&2, U32>>}

Uses (10)

Used by (0)

No other definition uses this definition.