]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix inaccurate comment about default nonce length in demos/cipher/aesccm.c
authorAlessandro Chitarrini <alessandro.chitarrini51@gmail.com>
Thu, 29 Aug 2024 10:59:54 +0000 (12:59 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 5 Sep 2024 15:25:13 +0000 (17:25 +0200)
Fixes #25270

CLA: trivial

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25318)

(cherry picked from commit f2b7a00fbb372b0ea32f2cfea865ab407641b1fa)

demos/cipher/aesccm.c

index b70209be86caba182cab04dc156640bf40681f1a..6da6745baa8cac6d2af63b612e7c732fc80866c4 100644 (file)
@@ -94,7 +94,7 @@ int aes_ccm_encrypt(void)
     if ((cipher = EVP_CIPHER_fetch(libctx, "AES-192-CCM", propq)) == NULL)
         goto err;
 
-    /* Set nonce length if default 96 bits is not appropriate */
+    /* Default nonce length for AES-CCM is 7 bytes (56 bits). */
     params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_AEAD_IVLEN,
                                             &ccm_nonce_len);
     /* Set tag length */