MCPcopy Create free account
hub / github.com/ElementsProject/lightning / xor_cipher_stream

Function xor_cipher_stream

common/sphinx.c:216–221  ·  view source on GitHub ↗

xor cipher stream into dst */

Source from the content-addressed store, hash-verified

214
215/* xor cipher stream into dst */
216static void xor_cipher_stream(void *dst, const struct secret *k, size_t dstlen)
217{
218 const u8 nonce[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
219
220 crypto_stream_chacha20_xor(dst, dst, dstlen, nonce, k->data);
221}
222
223#define CHACHA20_BLOCK_BYTES 64
224

Callers 4

create_onionpacketFunction · 0.85
process_onionpacketFunction · 0.85
wrap_onionreplyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected