def initial
import bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand.bend as Chacha8randimport Base
100# RFC 8439 2.3: constants, key (eight words), block counter, nonce (here zero)
101def initial(key: List<&2, U32>, +ctr: U32) -> List<&2, U32>:
102 match key:
103 case [k0, k1, k2, k3, k4, k5, k6, k7]:
104 [1634760805, 857760878, 2036477234, 1797285236, k0, k1, k2, k3, k4, k5, k6, k7, ctr, 0, 0, 0]
105 case _:
106 []
Uses (2)
Used by (4)
- bend-collections-laws-math@1.0.0.0/proofs/math/random/chacha8/rounds:init_correct
- bend-collections-laws-math@1.0.0.0/proofs/math/random/chacha8/block:block_correct
- bend-collections-laws-math@1.0.0.0/proofs/math/random/chacha8/block:rounds_correct
- bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand:chacha8