mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-08-02 03:46:11 -04:00
drop 128-bit keys from ChaCha implementation
This commit is contained in:
parent
b52d9ca831
commit
433af6d4ba
3 changed files with 16 additions and 25 deletions
5
chacha.h
5
chacha.h
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#define CHACHA_KEY_SIZE 32
|
||||
#define CHACHA_IV_SIZE 8
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint32_t u32;
|
||||
|
||||
|
@ -11,7 +14,7 @@ typedef struct
|
|||
u32 input[16];
|
||||
} chacha_ctx;
|
||||
|
||||
void chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits);
|
||||
void chacha_keysetup(chacha_ctx *x,const u8 *k);
|
||||
void chacha_ivsetup(chacha_ctx *x,const u8 *iv);
|
||||
void chacha_keystream_bytes(chacha_ctx *x,u8 *c,u32 bytes);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue