From: Niels Möller Date: Fri, 25 Apr 2025 18:58:57 +0000 (+0200) Subject: Minor fixes to ccm documentation. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=aaf0d23d894d851d9db675aedc1e3b979374a473;p=thirdparty%2Fnettle.git Minor fixes to ccm documentation. --- diff --git a/ccm.h b/ccm.h index 3bde665e..95d3bfe1 100644 --- a/ccm.h +++ b/ccm.h @@ -111,7 +111,7 @@ struct ccm_ctx { /* * CCM mode requires the adata and message lengths when building the IV, which - * prevents streaming processing and it incompatible with the AEAD API. + * prevents streaming processing and is incompatible with the AEAD API. */ void ccm_set_nonce(struct ccm_ctx *ctx, const void *cipher, nettle_cipher_func *f, @@ -120,7 +120,7 @@ ccm_set_nonce(struct ccm_ctx *ctx, const void *cipher, nettle_cipher_func *f, void ccm_update(struct ccm_ctx *ctx, const void *cipher, nettle_cipher_func *f, - size_t length, const uint8_t *data); + size_t length, const uint8_t *data); void ccm_encrypt(struct ccm_ctx *ctx, const void *cipher, nettle_cipher_func *f, diff --git a/nettle.texinfo b/nettle.texinfo index a52007e3..77451803 100644 --- a/nettle.texinfo +++ b/nettle.texinfo @@ -3418,10 +3418,8 @@ block size. @deftypefun void ccm_digest (struct ccm_ctx *@var{ctx}, const void *@var{cipher}, nettle_cipher_func *@var{f}, size_t @var{length}, uint8_t *@var{digest}) Extracts the message digest (also known ``authentication tag''). This is -the final operation when processing a message. @var{length} is usually +the final operation when processing a message. @var{length} should be equal to the @var{taglen} parameter supplied to @code{ccm_set_nonce}, -but if you provide a smaller value, only the first @var{length} octets -of the digest are written. @end deftypefun To encrypt a message using the general @acronym{CCM} interface, set the @@ -3439,7 +3437,7 @@ be identical to the @acronym{MAC} in the received message. @subsubsection @acronym{CCM} message interface -The @acronym{CCM} message fuctions provides a simple interface that will +The @acronym{CCM} message functions provides a simple interface that will perform authentication and message encryption in a single function call. The length of the cleartext is given by @var{mlength} and the length of the ciphertext is given by @var{clength}, always exactly @var{tlength} @@ -3505,7 +3503,7 @@ These are identical to @code{ccm_set_nonce}, except that @var{cipher}, @deftypefun void ccm_aes128_update (struct ccm_aes128_ctx *@var{ctx}, size_t @var{length}, const uint8_t *@var{data}) @deftypefunx void ccm_aes192_update (struct ccm_aes192_ctx *@var{ctx}, size_t @var{length}, const uint8_t *@var{data}) @deftypefunx void ccm_aes256_update (struct ccm_aes256_ctx *@var{ctx}, size_t @var{length}, const uint8_t *@var{data}) -These are identical to @code{ccm_set_update}, except that @var{cipher}, +These are identical to @code{ccm_update}, except that @var{cipher}, @var{f}, and @var{ctx} are replaced with a context structure. @end deftypefun @@ -3515,14 +3513,14 @@ These are identical to @code{ccm_set_update}, except that @var{cipher}, @deftypefunx void ccm_aes128_decrypt (struct ccm_aes128_ctx *@var{ctx}, size_t @var{length}, uint8_t *@var{dst}, const uint8_t *@var{src}) @deftypefunx void ccm_aes192_decrypt (struct ccm_aes192_ctx *@var{ctx}, size_t @var{length}, uint8_t *@var{dst}, const uint8_t *@var{src}) @deftypefunx void ccm_aes256_decrypt (struct ccm_aes256_ctx *@var{ctx}, size_t @var{length}, uint8_t *@var{dst}, const uint8_t *@var{src}) -These are identical to @code{ccm_set_encrypt} and @code{ccm_set_decrypt}, except +These are identical to @code{ccm_encrypt} and @code{ccm_decrypt}, except that @var{cipher}, @var{f}, and @var{ctx} are replaced with a context structure. @end deftypefun @deftypefun void ccm_aes128_digest (struct ccm_aes128_ctx *@var{ctx}, size_t @var{length}, uint8_t *@var{digest}) @deftypefunx void ccm_aes192_digest (struct ccm_aes192_ctx *@var{ctx}, size_t @var{length}, uint8_t *@var{digest}) @deftypefunx void ccm_aes256_digest (struct ccm_aes256_ctx *@var{ctx}, size_t @var{length}, uint8_t *@var{digest}) -These are identical to @code{ccm_set_digest}, except that @var{cipher}, +These are identical to @code{ccm_digest}, except that @var{cipher}, @var{f}, and @var{ctx} are replaced with a context structure. @end deftypefun