-.\" $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 <reyk@openbsd.org>
+.\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" 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
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
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
.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.