From c60e6d91ed5a820e0c910be8b67eadc7c2d41aed Mon Sep 17 00:00:00 2001 From: erbsland-dev Date: Tue, 10 Sep 2024 19:20:17 +0200 Subject: [PATCH] Clarify Tag Length Setting in OCB Mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes #8331: Updated the description for setting the tag length in OCB mode to remove the misleading “when encrypting” and “during encryption” phrasing. This change emphasizes that setting a custom tag length requires a call with NULL, applicable to both encryption and decryption contexts. Reviewed-by: Frederik Wedel-Heinen Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25424) (cherry picked from commit 1299699a90967c3a0b236e552d92dc307d0d6da3) --- doc/man3/EVP_EncryptInit.pod | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index fe63051d4d1..845d8c93ad6 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -1434,10 +1434,9 @@ For GCM, this call is only valid when decrypting data. For OCB, this call is valid when decrypting data to set the expected tag, and when encrypting to set the desired tag length. -In OCB mode, calling this when encrypting with C set to C sets the -tag length. The tag length can only be set before specifying an IV. If this is -not called prior to setting the IV during encryption, then a default tag length -is used. +In OCB mode, calling this with C set to C sets the tag length. +The tag length can only be set before specifying an IV. If this is not called +prior to setting the IV, then a default tag length is used. For OCB AES, the default tag length is 16 (i.e. 128 bits). It is also the maximum tag length for OCB. -- 2.47.2