Commit Graph

7 Commits

Author SHA1 Message Date
Lucas Gabriel Vuotto 5c1325ed11 aead: rewrite api
Decouple the authentication tag from the ciphertext and add streaming
interfaces.

Tests will be fixed in the next commit.
2024-06-20 15:52:58 +00:00
Lucas Gabriel Vuotto cef67c9f09 Merge most of internal headers into internal.h
Fix the includes accordingly and get rid of some unused ones.
2024-06-17 21:52:07 +00:00
Lucas Gabriel Vuotto 2b3e390bbf Make params struct non-const
Upcoming changes will push lc_*_ctx into the params struct for higher
order constructions like HMAC or HKDF.
2024-06-09 15:09:15 +00:00
Lucas Gabriel Vuotto fdcba8bcf7 aead: rename argparams to initparams for consistency 2024-06-09 02:05:10 +00:00
Lucas Gabriel Vuotto 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
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 7bc527c769 initial import 2024-05-31 10:59:58 +00:00