crypto-openssl: fixed tag and aad lengths for chacha-poly 67/42167/5
authorDamjan Marion <[email protected]>
Fri, 17 Jan 2025 11:45:41 +0000 (11:45 +0000)
committerAndrew Yourtchenko <[email protected]>
Tue, 21 Jan 2025 11:56:20 +0000 (11:56 +0000)
Type: improvement
Change-Id: I6162b45875566cc705917a51b3f06e1490607c8b
Signed-off-by: Damjan Marion <[email protected]>
src/crypto_engines/openssl/main.c

index 1710e4d..f6c2229 100644 (file)
@@ -50,7 +50,13 @@ static u32 num_threads;
   _ (null_gmac, AES_256_NULL_GMAC, EVP_aes_256_gcm, 0, 0)
 
 #define foreach_openssl_chacha20_evp_op                                       \
-  _ (chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305, 0, 0)
+  _ (chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305, 0, 0)       \
+  _ (chacha20_poly1305, CHACHA20_POLY1305_TAG16_AAD0, EVP_chacha20_poly1305,  \
+     1, 0)                                                                    \
+  _ (chacha20_poly1305, CHACHA20_POLY1305_TAG16_AAD8, EVP_chacha20_poly1305,  \
+     1, 8)                                                                    \
+  _ (chacha20_poly1305, CHACHA20_POLY1305_TAG16_AAD12, EVP_chacha20_poly1305, \
+     1, 12)
 
 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
 #define foreach_openssl_evp_op foreach_openssl_aes_evp_op \