The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
chacha20.h File Reference

the ChaCha20 block function (RFC 8439 section 2.3). More...

#include "common/stdint.h"

Go to the source code of this file.

Macros

#define CHACHA20_KEY_SIZE   32
#define CHACHA20_BLOCK_SIZE   64

Functions

void chacha20_block (const uint8_t key[CHACHA20_KEY_SIZE], uint32_t counter, const uint8_t nonce[12], uint8_t out[CHACHA20_BLOCK_SIZE])
 make one 64-byte block of key stream.

Detailed Description

the ChaCha20 block function (RFC 8439 section 2.3).

Macro Definition Documentation

◆ CHACHA20_KEY_SIZE

#define CHACHA20_KEY_SIZE   32

◆ CHACHA20_BLOCK_SIZE

#define CHACHA20_BLOCK_SIZE   64

Function Documentation

◆ chacha20_block()

void chacha20_block ( const uint8_t key[CHACHA20_KEY_SIZE],
uint32_t counter,
const uint8_t nonce[12],
uint8_t out[CHACHA20_BLOCK_SIZE] )

make one 64-byte block of key stream.

Parameters
key32 bytes.
counterthe block counter.
nonce12 bytes.
outreceives 64 bytes.