From ac2a6719f074fa43d79b31a3994549f2af55efd6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 27 Feb 2022 18:27:08 +0100 Subject: Add cSHAKE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libkeccak_digest.3 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libkeccak_digest.3') diff --git a/libkeccak_digest.3 b/libkeccak_digest.3 index 726c02e..90c76c5 100644 --- a/libkeccak_digest.3 +++ b/libkeccak_digest.3 @@ -58,7 +58,9 @@ or \(dq\(dq is used. For the other algorithms the constants .B LIBKECCAK_RAWSHAKE_SUFFIX (for RawSHAKE), and .B LIBKECCAK_SHAKE_SUFFIX -(for SHAKE) are used. +(for SHAKE), or the return of the +.BR libkeccak_cshake_suffix (3) +function (for cSHAKE), are used. .PP The hash of the message will be stored to .IR hashsum , @@ -130,10 +132,24 @@ libkeccak_behex_lower(hexhash, binhash, sizeof(binhash)); printf(\(dq%s\en\(dq, hexhash); libkeccak_state_destroy(&state); .fi +.SH NOTES +For cSHAKE, the +.BR libkeccak_cshake_initialise (3), +must be called, once, immediately after +state initialisation; before the first +call to any of the +.BR libkeccak_fast_update (), +.BR libkeccak_zerocopy_update (), +.BR libkeccak_update (), +and +.BR libkeccak_digest () +functions. .SH SEE ALSO .BR libkeccak_state_initialise (3), +.BR libkeccak_cshake_initialise (3), .BR libkeccak_fast_update (3), .BR libkeccak_update (3), +.BR libkeccak_cshake_suffix (3), .BR libkeccak_fast_digest (3), .BR libkeccak_zerocopy_digest (3), .BR libkeccak_simple_squeeze (3), -- cgit v1.2.3-70-g09d2