Commit Graph

13 Commits

Author SHA1 Message Date
Lucas Gabriel Vuotto 79ce4400dd params struct member shouldn't be const 2024-06-07 21:09:26 +00:00
Lucas Gabriel Vuotto 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
Lucas Gabriel Vuotto 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
Lucas Gabriel Vuotto 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
Lucas Gabriel Vuotto 23735c2902 cipher/chacha20: rename *_IVLEN to *_NONCELEN 2024-06-07 18:40:14 +00:00
Lucas Gabriel Vuotto 67d4de1657 Move all inout parameters to the front of the arguments list 2024-06-07 17:47:42 +00:00
Lucas Gabriel Vuotto 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
Lucas Gabriel Vuotto 0605d10bb3 Implement XChaCha20 and XChaCha20-Poly1305 2024-06-07 02:18:50 +00:00
Lucas Gabriel Vuotto 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
Lucas Gabriel Vuotto 216ef8f940 Add hash interface and SHA-{384,512} implementations 2024-06-06 12:40:38 +00:00
Lucas Gabriel Vuotto f0b5d01017 util: add hexdump function 2024-05-31 21:54:10 +00:00
Lucas Gabriel Vuotto f3667cfe05 util: make lc_scrub public 2024-05-31 21:51:37 +00:00
Lucas Gabriel Vuotto 7bc527c769 initial import 2024-05-31 10:59:58 +00:00