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

Function xor_cipher_stream

common/sphinx.c:244–249  ·  view source on GitHub ↗

xor cipher stream into dst */

Source from the content-addressed store, hash-verified

242
243/* xor cipher stream into dst */
244static void xor_cipher_stream(void *dst, const struct secret *k, size_t dstlen)
245{
246 const u8 nonce[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
247
248 crypto_stream_chacha20_xor(dst, dst, dstlen, nonce, k->data);
249}
250
251#define CHACHA20_BLOCK_BYTES 64
252

Callers 4

create_onionpacketFunction · 0.85
process_onionpacketFunction · 0.85
wrap_onionreplyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected