def xkey
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
69# XChaCha20-Poly1305: the HChaCha20 subkey of nonce[0..16] and the nonce
70# 0x00000000 || nonce[16..24].
71def xkey(key: List<&2, U32>, nonce: List<&2, U32>) -> List<&2, U32>:
72 CH.hchacha20_unchecked(key, CH.take(16n, nonce))