law open_append

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

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aead/chacha20poly1305.bend as Chacha20poly1305
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha20poly1305.bend as R

233# Opening ct || t with a 16-byte t checks t against the tag of ct.
234law open_append:
235  for +key: List<&2, U32>
236  for +nonce: List<&2, U32>
237  for +aad: List<&2, U32>
238  for +ct: List<&2, U32>
239  for +t: List<&2, U32>
240  for +ht: {List.length(&2, U32, t) == 16n : Nat}
241  {R.open(key, nonce, aad, List.append(&2, U32, ct, t)) == R.open_split(key, nonce, aad, ct, t) : Maybe<&2, List<&2, U32>>}

Uses (23)

Used by (2)