def poly_key
import bend-collections@1.0.0.0/spec/crypto/chacha20poly1305.bend as Chacha20poly1305import Base
import bend-collections@1.0.0.0/spec/crypto/chacha.bend as CH
14# 2.6 poly1305_key_gen: the first 32 bytes of the block with counter 0.
15def poly_key(+key: List<&2, U32>, +nonce: List<&2, U32>) -> List<&2, U32>:
16 CH.prefix(32n, CH.block(key, 0, nonce))