From fb1aeb3ffff2948edeb710e65aef261b589c7403 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 22 Jan 2026 21:34:42 +0100 Subject: lib: Fix allocation of IV and tags The packet buffer was allocating a fixed header for the IV, but did not account for the tag at all (remnant of the old hardcoded CBC mode-only proof-of-concept). Never ran into issues because we always reserved ample space. But it now properly reserves the correct space for IV and tag. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- include/ouroboros/crypt.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/ouroboros/crypt.h b/include/ouroboros/crypt.h index c463d9a8..20b3c262 100644 --- a/include/ouroboros/crypt.h +++ b/include/ouroboros/crypt.h @@ -284,6 +284,10 @@ int crypt_decrypt(struct crypt_ctx * ctx, buffer_t in, buffer_t * out); +int crypt_get_ivsz(struct crypt_ctx * ctx); + +int crypt_get_tagsz(struct crypt_ctx * ctx); + int crypt_load_crt_file(const char * path, void ** crt); -- cgit v1.2.3