def block_rounds
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha.bend as Chachaimport Base
117# The same, entered through a match on the key's first cell. Both arms are
118# block_body; the match only keeps the proof checker from evaluating the
119# rounds on a symbolic key (it compares types by evaluating them).
120def block_rounds(+n: Nat, key: List<&2, U32>, counter: U32, +nonce: List<&2, U32>) -> List<&2, U32>:
121 match key:
122 case Nil{}: block_body(n, Nil{}, counter, nonce)
123 case b <> rest: block_body(n, b <> rest, counter, nonce)
Uses (4)
Used by (12)
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/involution:ks
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/stream:block_length
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/stream:block_rounds_correct
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha:block
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha:encrypt_blocks
- …