Line data Source code
1 : #ifndef HEADER_fd_src_ballet_chacha20_fd_chacha20_h 2 : #define HEADER_fd_src_ballet_chacha20_fd_chacha20_h 3 : 4 : #include "../fd_ballet_base.h" 5 : 6 : /* FD_CHACHA20_BLOCK_SZ is the output size of the ChaCha20 block function. */ 7 : 8 79762047 : #define FD_CHACHA20_BLOCK_SZ (64UL) 9 : 10 : /* FD_CHACHA20_KEY_SZ is the size of the ChaCha20 encryption key */ 11 : 12 4513698 : #define FD_CHACHA20_KEY_SZ (32UL) 13 : 14 : FD_PROTOTYPES_BEGIN 15 : 16 : /* fd_chacha20_block is the ChaCha20 block function. 17 : 18 : - block points to the output block (64 byte size, 32 byte align) 19 : - key points to the encryption key (32 byte size, 32 byte align) 20 : - idx_nonce points to the block index and block nonce 21 : (first byte is 32-bit index, rest is 96-bit nonce) 22 : (16 byte size, 16 byte align) 23 : 24 : FIXME this should probably do multiple blocks */ 25 : 26 : void * 27 : fd_chacha20_block( void * block, 28 : void const * key, 29 : void const * idx_nonce ); 30 : 31 : /* Encryption/decryption functions not implemented for now 32 : as they are not yet required. */ 33 : 34 : FD_PROTOTYPES_END 35 : 36 : #endif /* HEADER_fd_src_ballet_chacha20_fd_chacha20_h */