From fa5c8891fa6dadf092c40ad84cc74b2c7c96af44 Mon Sep 17 00:00:00 2001 From: schwarze Date: Tue, 12 Sep 2023 13:29:38 +0000 Subject: [PATCH] Document EVP_AEAD_DEFAULT_TAG_LENGTH and EVP_AEAD_MAX_TAG_LENGTH, making some adjacent wordings slightly more precise. --- lib/libcrypto/man/EVP_AEAD_CTX_init.3 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/man/EVP_AEAD_CTX_init.3 b/lib/libcrypto/man/EVP_AEAD_CTX_init.3 index ad37842cc88..02f6e275d1f 100644 --- a/lib/libcrypto/man/EVP_AEAD_CTX_init.3 +++ b/lib/libcrypto/man/EVP_AEAD_CTX_init.3 @@ -1,8 +1,9 @@ -.\" $OpenBSD: EVP_AEAD_CTX_init.3,v 1.13 2023/08/24 04:33:08 tb Exp $ +.\" $OpenBSD: EVP_AEAD_CTX_init.3,v 1.14 2023/09/12 13:29:38 schwarze Exp $ .\" .\" Copyright (c) 2014, Google Inc. .\" Parts of the text were written by Adam Langley and David Benjamin. .\" Copyright (c) 2015 Reyk Floeter +.\" Copyright (c) 2023 Ingo Schwarze .\" .\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -16,7 +17,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 24 2023 $ +.Dd $Mdocdate: September 12 2023 $ .Dt EVP_AEAD_CTX_INIT 3 .Os .Sh NAME @@ -147,7 +148,11 @@ argument must be for the default implementation; other values are currently not supported. Authentication tags may be truncated by passing a tag length. -A tag length of zero indicates the default tag length should be used. +A +.Fa tag_len +argument of +.Dv EVP_AEAD_DEFAULT_TAG_LENGTH , +which has the value 0, causes the default tag length to be used. .Pp .Fn EVP_AEAD_CTX_cleanup frees any data allocated for the context @@ -241,6 +246,18 @@ and provide information about the AEAD algorithm .Fa aead . .Pp +.Fn EVP_AEAD_max_tag_len +returns the maximum tag length that can be used with the given +.Fa aead . +This is the largest value that can be passed as the +.Fa tag_len +argument to +.Fn EVP_AEAD_CTX_init . +No built-in +.Vt EVP_AEAD +object has a maximum tag length larger than the constant +.Dv EVP_AEAD_MAX_TAG_LENGTH . +.Pp All cipher algorithms have a fixed key length unless otherwise stated. The following ciphers are available: .Bl -tag -width Ds -offset indent @@ -310,8 +327,6 @@ sealing data with the AEAD. .Pp .Fn EVP_AEAD_max_tag_len returns the maximum tag length when using this AEAD. -This is the largest value that can be passed as a tag length to -.Fn EVP_AEAD_CTX_init . .Pp .Fn EVP_AEAD_nonce_length returns the length of the per-message nonce. -- 2.20.1