def poly_key
import bend-collections@1.0.0.0/src/crypto/aead/chacha20poly1305.bend as Chacha20poly1305import Base
import bend-collections@1.0.0.0/src/crypto/chacha/chacha20.bend as CH
21# poly1305_key_gen: the first 32 bytes of the block with counter 0.
22def poly_key(key: List<&2, U32>, nonce: List<&2, U32>) -> List<&2, U32>:
23 CH.take(32n, CH.block_rounds(10n, key, 0, nonce))