Chacha.xsubkey: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/chacha.bend as Chacha Lines 196-199 of bend-collections@1.0.0.0/spec/crypto/chacha.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/chacha.bend&start_line=196&end_line=199 import Base # Section 2.3: XChaCha20 is ChaCha20 under the HChaCha20 subkey of the # first 16 nonce bytes, with the nonce 0x00000000 || nonce[16..24]. def xsubkey(+key: List<&2, U32>, +nonce: List<&2, U32>) -> List<&2, U32>: hchacha20(key, prefix(16n, nonce)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/chacha.bend&name=hchacha20 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/chacha.bend&name=prefix