]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Document hash compress functions, based on patch from Corentin Labbe.
authorNiels Möller <nisse@lysator.liu.se>
Sun, 7 Aug 2022 19:03:56 +0000 (21:03 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 7 Aug 2022 19:03:56 +0000 (21:03 +0200)
ChangeLog
nettle.texinfo

index f7654a8206cd6ef3c86aaeb04093c59ce567b33f..b545f7ff58752f082f5826934bb821b65bed1221 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2022-08-07  Niels Möller  <nisse@lysator.liu.se>
 
+       Based on patch from Corentin Labbe:
+       * nettle.texinfo: Document sha256_compress, sha512_compress,
+       md5_compress and sha1_compress.
+
        * configure.ac: Refer to nettle-types.h, rather than arcfour.c,
        for AC_CONFIG_SRCDIR.
 
index 69f9bcaf99f26d24a40681ffadc9be59bc463eee..49c986d17f23970c406252a298b91b1a7b89c691 100644 (file)
@@ -442,6 +442,14 @@ This function also resets the context in the same way as
 @code{sha256_init}.
 @end deftypefun
 
+@deftypefun void sha256_compress (const uint32_t *@var{state}, uint8_t *@var{input})
+Perform a raw SHA256 compress on SHA256_BLOCK_SIZE bytes from@var{input}
+using @var{state} as IV (an array of 8 uint32_t). The output is stored in @var{state}.
+This function provides access to the underlying compression function,
+for the rare applications that need that (e.g., using different IV from
+standard SHA256).
+@end deftypefun
+
 Earlier versions of nettle defined SHA256 in the header file
 @file{<nettle/sha.h>}, which is now deprecated, but kept for
 compatibility.
@@ -522,6 +530,14 @@ This function also resets the context in the same way as
 @code{sha512_init}.
 @end deftypefun
 
+@deftypefun void sha512_compress (const uint64_t *@var{state}, uint8_t *@var{input})
+Perform a raw SHA512 compress on SHA512_BLOCK_SIZE bytes from
+@var{input} using @var{state} as IV (an array of 8 uint64_t). The output is stored in @var{state}.
+This function provides access to the underlying compression function,
+for the rare applications that need that (e.g., using different IV from
+standard SHA512).
+@end deftypefun
+
 @subsubsection @acronym{SHA384 and other variants of SHA512}
 
 Several variants of SHA512 have been defined, with a different initial
@@ -929,6 +945,14 @@ This function also resets the context in the same way as
 @code{md5_init}.
 @end deftypefun
 
+@deftypefun void md5_compress (const uint32_t *@var{state}, uint8_t *@var{input})
+Perform a raw MD5 compress on MD5_BLOCK_SIZE bytes from @var{input}
+using @var{state} as IV (an array of 4 uint32_t). The output is stored in @var{state}.
+This function provides access to the underlying compression function,
+for the rare applications that need that (e.g., using different IV from
+standard MD5).
+@end deftypefun
+
 The normal way to use MD5 is to call the functions in order: First
 @code{md5_init}, then @code{md5_update} zero or more times, and finally
 @code{md5_digest}. After @code{md5_digest}, the context is reset to
@@ -1083,6 +1107,13 @@ This function also resets the context in the same way as
 @code{sha1_init}.
 @end deftypefun
 
+@deftypefun void sha1_compress (const uint32_t *@var{state}, uint8_t *@var{input})
+Perform a raw SHA1 compress on SHA1_BLOCK_SIZE bytes from @var{input}
+using @var{state} as IV (an array of 5 uint32_t). The output is stored in @var{state}.
+This function provides access to the underlying compression function,
+for the rare applications that need that (e.g., using different IV from
+standard SHA1).
+@end deftypefun
 
 @subsubsection @acronym{GOSTHASH94 and GOSTHASH94CP}
 @cindex GOST hash