Signed-off-by: Dmitry Eremin-Solenikov <dbarysh...@gmail.com>
---
 nettle.texinfo | 38 ++++++++++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/nettle.texinfo b/nettle.texinfo
index b8579a6ed59b..57e6345f78df 100644
--- a/nettle.texinfo
+++ b/nettle.texinfo
@@ -3718,14 +3718,21 @@ as described above, the new value is used unless you 
call the
 @node CMAC,, UMAC, Keyed hash functions
 @subsection @acronym{CMAC}
 @cindex CMAC
+@cindex CMAC-128
+@cindex CMAC-64
 
 @acronym{CMAC} is a message authentication code based on CBC encryption
 mode. It is suitable for systems where block ciphers are preferrable
-and perform better than hash functions. @acronym{CMAC} is specified in
+and perform better than hash functions. @acronym{CMAC-128} is specified in
 @cite{RFC4493}. The block size is always 128 bits (16 octets).
+@acronym{CMAC-64} is specified by
+@uref{https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38B.pdf,
+NIST Special Publication 800-38B}. The block size is always 64 bits
+(8 octets).
 
-Nettle provides helper functions for @acronym{CMAC } with
-the @acronym{AES} block cipher.
+Nettle provides helper functions for @acronym{CMAC-128} with
+the @acronym{AES} block cipher and for @acronym{CMAC-64} with
+the @acronym{Tripple-DES} block cipher.
 
 Nettle defines @acronym{CMAC} in @file{<nettle/cmac.h>}.
 
@@ -3734,7 +3741,7 @@ Nettle defines @acronym{CMAC} in @file{<nettle/cmac.h>}.
 @end deftp
 
 @defvr Constant CMAC128_DIGEST_SIZE
-The size of an CMAC digest, 16.
+The size of an CMAC-128 digest, 16.
 @end defvr
 
 @deftypefun void cmac_aes128_set_key (struct cmac_aes128_ctx *@var{ctx}, const 
uint8_t *@var{key})
@@ -3769,6 +3776,29 @@ provide a smaller value, only the first @var{length} 
octets of the
 processing of a new message with the same key.
 @end deftypefun
 
+@deftp {Context struct} {struct cmac_des3_ctx}
+@end deftp
+
+@defvr Constant CMAC64_DIGEST_SIZE
+The size of an CMAC-64 digest, 8.
+@end defvr
+
+@deftypefun void cmac_des3_set_key (struct cmac_des3_ctx *@var{ctx}, const 
uint8_t *@var{key})
+This function initializes the @acronym{CMAC} context struct for 
@acronym{Tripple-DES}.
+@end deftypefun
+
+@deftypefun void cmac_des3_update (struct cmac_des3_ctx *@var{ctx}, size_t 
@var{length}, const uint8_t *@var{data})
+This function is called zero or more times to process the message.
+@end deftypefun
+
+@deftypefun void cmac_des3_digest (struct cmac_des3_ctx *@var{ctx}, size_t 
@var{length}, uint8_t *@var{digest})
+Extracts the @acronym{MAC} of the message, writing it to @var{digest}.
+@var{length} is usually equal to the specified output size, but if you
+provide a smaller value, only the first @var{length} octets of the
+@acronym{MAC} are written. This function resets the context for
+processing of a new message with the same key.
+@end deftypefun
+
 @node Poly1305,, CMAC, Keyed hash functions
 @comment  node-name,  next,  previous,  up
 @subsection Poly1305
-- 
2.20.1

_______________________________________________
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to