summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2024-11-12 00:42:28 +0000
committerschwarze <>2024-11-12 00:42:28 +0000
commitca342fb6c81c80bf14c0c3b773d2916eb135cdcd (patch)
tree20573a20cc2fcbba4329dcc84629c7a23123badf /src
parent4a2f98c12c8b8ffbfb725a6edb8ff4342f85a567 (diff)
downloadopenbsd-ca342fb6c81c80bf14c0c3b773d2916eb135cdcd.tar.gz
openbsd-ca342fb6c81c80bf14c0c3b773d2916eb135cdcd.tar.bz2
openbsd-ca342fb6c81c80bf14c0c3b773d2916eb135cdcd.zip
Fix a brainfart that happened to me in 2020:
It is impossible to use EVP_DigestInit_ex(3) for CMAC. Besides, EVP_PKEY_CTX_new_id(3) does not produce an EVP_MD_CTX object. Instead, mention the easiest way to actually get the job done using EVP_PKEY_new_CMAC_key(3) and EVP_DigestSignInit(3). OK tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/CMAC_Init.316
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/libcrypto/man/CMAC_Init.3 b/src/lib/libcrypto/man/CMAC_Init.3
index 29818be354..fd32ca085a 100644
--- a/src/lib/libcrypto/man/CMAC_Init.3
+++ b/src/lib/libcrypto/man/CMAC_Init.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: CMAC_Init.3,v 1.8 2024/11/08 16:05:09 schwarze Exp $ 1.\" $OpenBSD: CMAC_Init.3,v 1.9 2024/11/12 00:42:28 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: November 8 2024 $ 17.Dd $Mdocdate: November 12 2024 $
18.Dt CMAC_INIT 3 18.Dt CMAC_INIT 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -69,13 +69,11 @@ arbitrary block cipher using a symmetric key.
69The present manual page describes low-level functions implementing CMAC. 69The present manual page describes low-level functions implementing CMAC.
70Instead of using these functions directly, 70Instead of using these functions directly,
71application programs normally call 71application programs normally call
72.Xr EVP_PKEY_CTX_new_id 3 72.Xr EVP_PKEY_new_CMAC_key 3
73with an argument of
74.Dv EVP_PKEY_CMAC
75and then pass the resulting 73and then pass the resulting
76.Vt EVP_MD_CTX 74.Vt EVP_PKEY
77object to 75object to
78.Xr EVP_DigestInit_ex 3 . 76.Xr EVP_DigestSignInit 3 .
79.Pp 77.Pp
80The CMAC API is object-oriented. 78The CMAC API is object-oriented.
81Calculating a message authentication code requires a 79Calculating a message authentication code requires a
@@ -254,9 +252,9 @@ functions are used internally, entries may still get pushed onto
254the error stack in some cases of failure. 252the error stack in some cases of failure.
255.Sh SEE ALSO 253.Sh SEE ALSO
256.Xr EVP_aes_128_cbc 3 , 254.Xr EVP_aes_128_cbc 3 ,
257.Xr EVP_DigestInit 3 , 255.Xr EVP_DigestSignInit 3 ,
258.Xr EVP_EncryptInit 3 , 256.Xr EVP_EncryptInit 3 ,
259.Xr EVP_PKEY_CTX_new_id 3 , 257.Xr EVP_PKEY_new_CMAC_key 3 ,
260.Xr HMAC 3 258.Xr HMAC 3
261.Sh STANDARDS 259.Sh STANDARDS
262.Rs 260.Rs