Commit Graph

14 Commits

Author SHA1 Message Date
a6208487e4 aead: replace init args with implementation-specific params struct
This unbreaks {,X}ChaCha20-Poly1305. Thanks to the use of params, the
{,X}ChaCha20-Poly1305 doesn't need to reach into the guts of ChaCha20
state. Move {en,de}cryption and key setup into its own functions.

This breaks the tests, which will be fixed in the following commit.
2024-06-07 23:29:29 +00:00
79ce4400dd params struct member shouldn't be const 2024-06-07 21:09:26 +00:00
623dd16dc2 cipher: replace init args with a implementation-specific params struct
This allows for more flexibility in the future. While at it, do note
that the RFC and draft implementations are followed. In particular, in
XChaCha20, hardcode the high word of the counter to 0.

This commit breaks ChaCha20-Poly1305. It'll be fixed in a subsequent
commit.
stash
2024-06-07 18:52:46 +00:00
b26a9c7274 auth: replace init args with a implementation-specific params struct
This allows for more flexibility in the future.

This commit breaks ChaCha20-Poly1305. It'll be fixed in a subsequent
commit.
2024-06-07 18:40:14 +00:00
ccc2836fa8 Introduce params structs
This will allow for greater flexibility in the future and a big refactor
in ChaCha20-Poly1305.
2024-06-07 18:40:14 +00:00
23735c2902 cipher/chacha20: rename *_IVLEN to *_NONCELEN 2024-06-07 18:40:14 +00:00
67d4de1657 Move all inout parameters to the front of the arguments list 2024-06-07 17:47:42 +00:00
1a8f813442 hash: implement SHA-{224,256}
Add the HMAC and Wycheproof bits for HMAC while at it.
2024-06-07 03:14:21 +00:00
0605d10bb3 Implement XChaCha20 and XChaCha20-Poly1305 2024-06-07 02:18:50 +00:00
ad42d99e0b auth: add HMAC implementation
This allows for checking the SHA-512 implementation against Wycheproof
via the HMAC tests.
2024-06-06 12:41:44 +00:00
216ef8f940 Add hash interface and SHA-{384,512} implementations 2024-06-06 12:40:38 +00:00
f0b5d01017 util: add hexdump function 2024-05-31 21:54:10 +00:00
f3667cfe05 util: make lc_scrub public 2024-05-31 21:51:37 +00:00
7bc527c769 initial import 2024-05-31 10:59:58 +00:00