law c_tag
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/aead/sound.bend:69
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aead/sound.bend as Sound
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha20poly1305.bend as R
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/subtle.bend as RS
69law c_tag:
70 for +ok: Bool
71 for +key: List<&2, U32>
72 for +nonce: List<&2, U32>
73 for +aad: List<&2, U32>
74 for +ct: List<&2, U32>
75 for +t: List<&2, U32>
76 for +p: List<&2, U32>
77 for +hok: {RS.equal(t, R.tag(key, nonce, aad, ct)) == ok : Bool}
78 for +h: {R.open_tag(ok, key, nonce, ct) == Some{p} : Maybe<&2, List<&2, U32>>}
79 {R.seal(key, nonce, aad, p) == List.append(&2, U32, ct, t) : List<&2, U32>}