aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--TODO5
-rw-r--r--dist/archlinux/stable/PKGBUILD2
-rw-r--r--doc/info/libkeccak.texinfo2
-rw-r--r--doc/man/libkeccak.75
-rw-r--r--doc/man/libkeccak_behex_lower.334
-rw-r--r--doc/man/libkeccak_behex_upper.334
-rw-r--r--doc/man/libkeccak_degeneralise_spec.339
-rw-r--r--doc/man/libkeccak_digest.386
-rw-r--r--doc/man/libkeccak_fast_digest.388
-rw-r--r--doc/man/libkeccak_fast_squeeze.318
-rw-r--r--doc/man/libkeccak_fast_update.329
-rw-r--r--doc/man/libkeccak_generalised_spec_initialise.323
-rw-r--r--doc/man/libkeccak_generalised_sum_fd.368
-rw-r--r--doc/man/libkeccak_hmac_copy.326
-rw-r--r--doc/man/libkeccak_hmac_create.336
-rw-r--r--doc/man/libkeccak_hmac_destroy.318
-rw-r--r--doc/man/libkeccak_hmac_digest.3103
-rw-r--r--doc/man/libkeccak_hmac_duplicate.332
-rw-r--r--doc/man/libkeccak_hmac_fast_destroy.318
-rw-r--r--doc/man/libkeccak_hmac_fast_digest.3104
-rw-r--r--doc/man/libkeccak_hmac_fast_free.317
-rw-r--r--doc/man/libkeccak_hmac_free.317
-rw-r--r--doc/man/libkeccak_hmac_initialise.332
-rw-r--r--doc/man/libkeccak_hmac_marshal.324
-rw-r--r--doc/man/libkeccak_hmac_marshal_size.314
-rw-r--r--doc/man/libkeccak_hmac_reset.351
-rw-r--r--doc/man/libkeccak_hmac_set_key.341
-rw-r--r--doc/man/libkeccak_hmac_unmarshal.321
-rw-r--r--doc/man/libkeccak_hmac_unmarshal_skip.314
-rw-r--r--doc/man/libkeccak_hmac_wipe.336
-rw-r--r--doc/man/libkeccak_keccaksum_fd.356
-rw-r--r--doc/man/libkeccak_rawshakesum_fd.366
-rw-r--r--doc/man/libkeccak_sha3sum_fd.358
-rw-r--r--doc/man/libkeccak_shakesum_fd.366
-rw-r--r--doc/man/libkeccak_simple_squeeze.318
-rw-r--r--doc/man/libkeccak_spec_check.320
-rw-r--r--doc/man/libkeccak_spec_rawshake.329
-rw-r--r--doc/man/libkeccak_spec_sha3.324
-rw-r--r--doc/man/libkeccak_spec_shake.328
-rw-r--r--doc/man/libkeccak_squeeze.325
-rw-r--r--doc/man/libkeccak_state_copy.325
-rw-r--r--doc/man/libkeccak_state_create.329
-rw-r--r--doc/man/libkeccak_state_destroy.318
-rw-r--r--doc/man/libkeccak_state_duplicate.332
-rw-r--r--doc/man/libkeccak_state_fast_destroy.318
-rw-r--r--doc/man/libkeccak_state_fast_free.317
-rw-r--r--doc/man/libkeccak_state_free.317
-rw-r--r--doc/man/libkeccak_state_initialise.325
-rw-r--r--doc/man/libkeccak_state_marshal.321
-rw-r--r--doc/man/libkeccak_state_marshal_size.314
-rw-r--r--doc/man/libkeccak_state_reset.315
-rw-r--r--doc/man/libkeccak_state_unmarshal.319
-rw-r--r--doc/man/libkeccak_state_unmarshal_skip.314
-rw-r--r--doc/man/libkeccak_state_wipe.311
-rw-r--r--doc/man/libkeccak_state_wipe_message.311
-rw-r--r--doc/man/libkeccak_state_wipe_sponge.311
-rw-r--r--doc/man/libkeccak_unhex.337
-rw-r--r--doc/man/libkeccak_update.329
58 files changed, 1189 insertions, 601 deletions
diff --git a/TODO b/TODO
index e278106..d8e11b3 100644
--- a/TODO
+++ b/TODO
@@ -12,11 +12,6 @@ Measure cycles per byte.
Fix todos in the texinfo file.
Add man pages:
- libkeccak_hmac_set_key
- libkeccak_hmac_reset
- libkeccak_hmac_wipe
libkeccak_hmac_fast_update
libkeccak_hmac_update
- libkeccak_hmac_fast_digest
- libkeccak_hmac_digest
diff --git a/dist/archlinux/stable/PKGBUILD b/dist/archlinux/stable/PKGBUILD
index 10a3cb9..d242573 100644
--- a/dist/archlinux/stable/PKGBUILD
+++ b/dist/archlinux/stable/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>
pkgname=libkeccak
-pkgver=1.2
+pkgver=1.1.1
pkgrel=1
pkgdesc="Keccak-family hashing library"
arch=(i686 x86_64)
diff --git a/doc/info/libkeccak.texinfo b/doc/info/libkeccak.texinfo
index ccb9308..089f06f 100644
--- a/doc/info/libkeccak.texinfo
+++ b/doc/info/libkeccak.texinfo
@@ -768,7 +768,7 @@ parameter, rather it returns one.
@item libkeccak_hmac_reset
@fnindex libkeccak_hmac_reset
Resets the sponge and the sets the key, by
-calling @code{libkeccak_hmac_set_key}. IT
+calling @code{libkeccak_hmac_set_key}. It
has three parameters: pointer to the
@code{libkeccak_hmac_state_t}, the binary key,
and the length of the key.
diff --git a/doc/man/libkeccak.7 b/doc/man/libkeccak.7
index 5bfc390..0a6ef04 100644
--- a/doc/man/libkeccak.7
+++ b/doc/man/libkeccak.7
@@ -1,4 +1,4 @@
-.TH LIBKECCAK 7 LIBKECCAK-%VERSION%
+.TH LIBKECCAK 7 LIBKECCAK
.SH NAME
libkeccak - Keccak-family hashing library
.SH DESCRIPTION
@@ -65,9 +65,6 @@ Keccak-3200 may be implemented in the future.
.BR libkeccak_hmac_update (3),
.BR libkeccak_hmac_fast_digest (3),
.BR libkeccak_hmac_digest (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the COPYING file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_behex_lower.3 b/doc/man/libkeccak_behex_lower.3
index f271269..6c06af9 100644
--- a/doc/man/libkeccak_behex_lower.3
+++ b/doc/man/libkeccak_behex_lower.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_BEHEX_LOWER 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_BEHEX_LOWER 3 LIBKECCAK
.SH NAME
libkeccak_behex_lower - Converts a binary hashsum to lowercase hexadecimal
.SH SYNOPSIS
@@ -6,25 +6,34 @@ libkeccak_behex_lower - Converts a binary hashsum to lowercase hexadecimal
.nf
#include <libkeccak.h>
.P
-void libkeccak_behex_lower(char *restrict \fIoutput\fP,
- const char *restrict \fIhashsum\fP,
- size_t \fIn\fP);
+void
+libkeccak_behex_lower(char *restrict \fIoutput\fP,
+ const char *restrict \fIhashsum\fP, size_t \fIn\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_behex_lower ()
function
-converts a binary hashsum, stored in \fIhashsum\fP,
+converts a binary hashsum, stored in
+.IR hashsum ,
to lowercase hexadecimal, and stores the
-hexadecimal representation in \fIoutput\fP.
+hexadecimal representation in
+.IR output .
.PP
-\fIoutput\fP will be terminated by a NUL-character.
+.I output
+will be terminated by a NUL-character.
.PP
-The \fIn\fP parameter specifies the number of bytes
-the binary hashsum is comprised. \fIoutput\fP needs
-an allocation size of (2 * \fIn\fP + 1).
+The
+.I In
+parameter specifies the number of bytes
+the binary hashsum is comprised.
+.I output
+needs an allocation size of (2 *
+.I n
++ 1).
.SH RETURN VALUES
The
.BR libkeccak_behex_lower ()
@@ -36,9 +45,6 @@ function cannot fail.
.SH SEE ALSO
.BR libkeccak_behex_upper (3),
.BR libkeccak_unhex (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_behex_upper.3 b/doc/man/libkeccak_behex_upper.3
index aad1cc9..7925efc 100644
--- a/doc/man/libkeccak_behex_upper.3
+++ b/doc/man/libkeccak_behex_upper.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_BEHEX_UPPER 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_BEHEX_UPPER 3 LIBKECCAK
.SH NAME
libkeccak_behex_upper - Converts a binary hashsum to uppercase hexadecimal
.SH SYNOPSIS
@@ -6,25 +6,34 @@ libkeccak_behex_upper - Converts a binary hashsum to uppercase hexadecimal
.nf
#include <libkeccak.h>
.P
-void libkeccak_behex_upper(char *restrict \fIoutput\fP,
- const char *restrict \fIhashsum\fP,
- size_t \fIn\fP);
+void
+libkeccak_behex_upper(char *restrict \fIoutput\fP,
+ const char *restrict \fIhashsum\fP, size_t \fIn\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_behex_upper ()
function
-converts a binary hashsum, stored in \fIhashsum\fP,
+converts a binary hashsum, stored in
+.IR hashsum ,
to uppercase hexadecimal, and stores the
-hexadecimal representation in \fIoutput\fP.
+hexadecimal representation in
+.IR output .
.PP
-\fIoutput\fP will be terminated by a NUL-character.
+.I output
+will be terminated by a NUL-character.
.PP
-The \fIn\fP parameter specifies the number of bytes
-the binary hashsum is comprised. \fIoutput\fP needs
-an allocation size of (2 * \fIn\fP + 1).
+The
+.I n
+parameter specifies the number of bytes
+the binary hashsum is comprised.
+.I output
+needs an allocation size of (2 *
+.I n
++ 1).
.SH RETURN VALUES
The
.BR libkeccak_behex_upper ()
@@ -36,9 +45,6 @@ function cannot fail.
.SH SEE ALSO
.BR libkeccak_behex_lower (3),
.BR libkeccak_unhex (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_degeneralise_spec.3 b/doc/man/libkeccak_degeneralise_spec.3
index 3b527d1..38a1b73 100644
--- a/doc/man/libkeccak_degeneralise_spec.3
+++ b/doc/man/libkeccak_degeneralise_spec.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_DEGENERALISE_SPEC 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_DEGENERALISE_SPEC 3 LIBKECCAK
.SH NAME
libkeccak_degeneralise_spec - Set all specification parameters to automatic
.SH SYNOPSIS
@@ -6,19 +6,26 @@ libkeccak_degeneralise_spec - Set all specification parameters to automatic
.nf
#include <libkeccak.h>
.P
-int libkeccak_degeneralise_spec(libkeccak_generalised_spec_t *\fIspec\fP,
- libkeccak_spec_t *\fIoutput_spec\fP);
+int
+libkeccak_degeneralise_spec(libkeccak_generalised_spec_t *\fIspec\fP,
+ libkeccak_spec_t *\fIoutput_spec\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_degeneralise_spec ()
-function will resolve automatic parameters in \fI*spec\fP
-and translates the parameters to \fI*output_spec\fP,
+function will resolve automatic parameters in
+.I *spec
+and translates the parameters to
+.IR *output_spec ,
so that it can be used for hashing.
.PP
-The function will modify both \fI*spec\fP and \fI*output_spec\fP.
+The function will modify both
+.I *spec
+and
+.IR *output_spec .
.PP
You should call the
.BR libkeccak_spec_check (3)
@@ -27,11 +34,11 @@ function after calling
.PP
.nf
typedef struct libkeccak_generalised_spec {
- long bitrate; /* bitrate (in bits) */
- long capacity; /* capacity (in bits) */
- long output; /* output size (in bits) */
- long state_size; /* state size (in bits) */
- long word_size; /* word size (in bits) */
+ long int bitrate; /* bitrate (in bits) */
+ long int capacity; /* capacity (in bits) */
+ long int output; /* output size (in bits) */
+ long int state_size; /* state size (in bits) */
+ long int word_size; /* word size (in bits) */
} libkeccak_generalised_spec_t;
.fi
.SH RETURN VALUES
@@ -89,8 +96,9 @@ The
function cannot fail.
.fi
.SH EXAMPLE
-This examples configure a \fBlibkeccak_spec_t\fP to specify
-settings for Keccak[c = 512]:
+This examples configure a
+.B libkeccak_spec_t
+to specify settings for Keccak[c = 512]:
.LP
.nf
int r;
@@ -111,9 +119,6 @@ if ((r = libkeccak_spec_check(&spec)));
.BR libkeccak_spec_shake (3),
.BR libkeccak_state_initialise (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_digest.3 b/doc/man/libkeccak_digest.3
index ac24e25..33b0479 100644
--- a/doc/man/libkeccak_digest.3
+++ b/doc/man/libkeccak_digest.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_DIGEST 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_DIGEST 3 LIBKECCAK
.SH NAME
libkeccak_digest - Complete the hashing of a message with erasure
.SH SYNOPSIS
@@ -6,46 +6,75 @@ libkeccak_digest - Complete the hashing of a message with erasure
.nf
#include <libkeccak.h>
.P
-int libkeccak_digest(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP, size_t \fImsglen\fP,
- size_t \fIbits\fP, const char *\fIsuffix\fP, char *\fIhashsum\fP);
+int
+libkeccak_digest(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP,
+ size_t \fImsglen\fP, size_t \fIbits\fP, const char *\fIsuffix\fP,
+ char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_digest ()
function absorbs the last part of (or all of) a message,
and returns the hash of the entire message. The last part
-of the message is specified by the \fImsg\fP parameter, and
-its byte-size is specified by the \fImsglen\fP parameter. If
-all of the message has already be processed by calls to the
+of the message is specified by the
+.I msg
+parameter, and its byte-size is specified by the
+.I msglen
+parameter. If all of the message has already be processed
+by calls to the
.BR libkeccak_update (3)
function or the
.BR libkeccak_fast_update (3)
-function (with the same pointer on \fIstate\fP,) \fImsg\fP
-and \fImsglen\fP should be set to \fINULL\fP and 0, respectively.
+function (with the same pointer on
+.IR state ,)
+.I msg
+and
+.I msglen
+should be set to
+.I NULL
+and 0, respectively.
.PP
If the message is not comprised a whole number of bytes,
the number of bits, modulus 8, in the message should be
-specified in the \fIbits\fP parameter. \fImsglen\fP must only
-count the number of whole bytes, that is, the floor of the
-number of bits in the message divided by 8.
+specified in the
+.I bits
+parameter.
+.I msglen
+must only count the number of whole bytes, that is, the
+floor of the number of bits in the message divided by 8.
.PP
-\fIsuffix\fP should be a NUL-terminated string of ASCII '1':s
+.I suffix
+should be a NUL-terminated string of ASCII '1':s
and '0':s, representing the bits that should be appended to
-the message. If this string is empty, \fINULL\fP may be used
-instead. This is used to select hash algorithm. For pure Keccak,
-\fINULL\fP or "" is used. For the other algorithms the constants
-\fBLIBKECCAK_SHA3_SUFFIX\fP (for SHA-3),
-\fBLIBKECCAK_RAWSHAKE_SUFFIX\fP (for RawSHAKE), and
-\fBLIBKECCAK_SHAKE_SUFFIX\fP (for SHAKE) are used.
+the message. If this string is empty,
+.I NULL
+may be used instead. This is used to select hash algorithm.
+For pure Keccak,
+.I NULL
+or "" is used. For the other algorithms the constants
+.B LIBKECCAK_SHA3_SUFFIX
+(for SHA-3),
+.B LIBKECCAK_RAWSHAKE_SUFFIX
+(for RawSHAKE), and
+.B LIBKECCAK_SHAKE_SUFFIX
+(for SHAKE) are used.
.PP
-The hash of the message will be stored to \fIhashsum\fP,
-unless \fIhashsum\fP is \fINULL\fP (which increases the
-performance of the call.) A total of ((\fIstate->n\fP + 7) / 8)
-bytes will be written to the beginning of \fIhashsum\fP.
-Therefore, \fIhashsum\fP needs at least an allocation size
-of that number of bytes.
+The hash of the message will be stored to
+.IR hashsum ,
+unless
+.I hashsum
+is
+.I NULL
+(which increases the performance of the call.) A total of
+.RI (( state->n
++ 7) / 8) bytes will be written to the beginning of
+.IR hashsum .
+Therefore,
+.I hashsum
+needs at least an allocation size of that number of bytes.
.PP
The
.BR libkeccak_digest ()
@@ -56,7 +85,9 @@ rather than as fast as possible.
The
.BR libkeccak_digest ()
function returns 0 upon successful completion. On error,
--1 is returned and \fIerrno\fP is set to describe the error.
+-1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_digest ()
@@ -109,9 +140,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_simple_squeeze (3),
.BR libkeccak_fast_squeeze (3),
.BR libkeccak_squeeze (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_fast_digest.3 b/doc/man/libkeccak_fast_digest.3
index 1feb9ef..d5c55a5 100644
--- a/doc/man/libkeccak_fast_digest.3
+++ b/doc/man/libkeccak_fast_digest.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_FAST_DIGEST 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_FAST_DIGEST 3 LIBKECCAK
.SH NAME
libkeccak_fast_digest - Complete the hashing of a message without erasure
.SH SYNOPSIS
@@ -6,46 +6,75 @@ libkeccak_fast_digest - Complete the hashing of a message without erasure
.nf
#include <libkeccak.h>
.P
-int libkeccak_fast_digest(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP, size_t \fImsglen\fP,
- size_t \fIbits\fP, const char *\fIsuffix\fP, char *\fIhashsum\fP);
+int
+libkeccak_fast_digest(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP,
+ size_t \fImsglen\fP, size_t \fIbits\fP, const char *\fIsuffix\fP,
+ char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_fast_digest ()
function absorbs the last part of (or all of) a message,
and returns the hash of the entire message. The last part
-of the message is specified by the \fImsg\fP parameter, and
-its byte-size is specified by the \fImsglen\fP parameter. If
-all of the message has already be processed by calls to the
+of the message is specified by the
+.I msg
+parameter, and its byte-size is specified by the
+.I msglen
+parameter. If all of the message has already be processed
+by calls to the
.BR libkeccak_update (3)
function or the
.BR libkeccak_fast_update (3)
-function (with the same pointer on \fIstate\fP,) \fImsg\fP
-and \fImsglen\fP should be set to \fINULL\fP and 0, respectively.
+function (with the same pointer on
+.IR state ,)
+.I msg
+and
+.I msglen
+should be set to
+.I NULL
+and 0, respectively.
.PP
If the message is not comprised a whole number of bytes,
the number of bits, modulus 8, in the message should be
-specified in the \fIbits\fP parameter. \fImsglen\fP must only
-count the number of whole bytes, that is, the floor of the
-number of bits in the message divided by 8.
+specified in the
+.I bits
+parameter.
+.I msglen
+must only count the number of whole bytes, that is, the
+floor of the number of bits in the message divided by 8.
.PP
-\fIsuffix\fP should be a NUL-terminated string of ASCII '1':s
-and '0':s, representing the bits that should be appended to
-the message. If this string is empty, \fINULL\fP may be used
-instead. This is used to select hash algorithm. For pure Keccak,
-\fINULL\fP or "" is used. For the other algorithms the constants
-\fBLIBKECCAK_SHA3_SUFFIX\fP (for SHA-3),
-\fBLIBKECCAK_RAWSHAKE_SUFFIX\fP (for RawSHAKE), and
-\fBLIBKECCAK_SHAKE_SUFFIX\fP (for SHAKE) are used.
+.I suffix
+should be a NUL-terminated string of ASCII '1':s and '0':s,
+representing the bits that should be appended to the
+message. If this string is empty,
+.I NULL
+may be used instead. This is used to select hash algorithm.
+For pure Keccak,
+.I NULL
+or "" is used. For the other algorithms the constants
+.B LIBKECCAK_SHA3_SUFFIX
+(for SHA-3),
+.B LIBKECCAK_RAWSHAKE_SUFFIX
+(for RawSHAKE), and
+.B LIBKECCAK_SHAKE_SUFFIX
+(for SHAKE) are used.
.PP
-The hash of the message will be stored to \fIhashsum\fP,
-unless \fIhashsum\fP is \fINULL\fP (which increases the
-performance of the call.) A total of ((\fIstate->n\fP + 7) / 8)
-bytes will be written to the beginning of \fIhashsum\fP.
-Therefore, \fIhashsum\fP needs at least an allocation size
-of that number of bytes.
+The hash of the message will be stored to
+.IR hashsum ,
+unless
+.IR hashsum
+is
+.IR NULL
+(which increases the performance of the call.) A total of
+.RI (( state->n
++ 7) / 8) bytes will be written to the beginning of
+.IR hashsum .
+Therefore,
+.I hashsum
+needs at least an allocation size of that number of bytes.
.PP
The
.BR libkeccak_fast_digest ()
@@ -57,7 +86,9 @@ allocation is securely removed if a new allocation is required.
The
.BR libkeccak_fast_digest ()
function returns 0 upon successful completion. On error,
--1 is returned and \fIerrno\fP is set to describe the error.
+-1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_fast_digest ()
@@ -110,9 +141,6 @@ libkeccak_state_fast_destroy(&state);
.BR libkeccak_simple_squeeze (3),
.BR libkeccak_fast_squeeze (3),
.BR libkeccak_squeeze (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_fast_squeeze.3 b/doc/man/libkeccak_fast_squeeze.3
index d631492..d782a95 100644
--- a/doc/man/libkeccak_fast_squeeze.3
+++ b/doc/man/libkeccak_fast_squeeze.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_FAST_SQUEEZE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_FAST_SQUEEZE 3 LIBKECCAK
.SH NAME
libkeccak_fast_squeeze - Runs the squeeze phase a number of times
.SH SYNOPSIS
@@ -6,16 +6,21 @@ libkeccak_fast_squeeze - Runs the squeeze phase a number of times
.nf
#include <libkeccak.h>
.P
-void libkeccak_fast_squeeze(libkeccak_state_t *\fIstate\fP, long \fItimes\fP);
+void
+libkeccak_fast_squeeze(libkeccak_state_t *\fIstate\fP, long int \fItimes\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_fast_squeeze ()
function runs the Keccak squeeze phase, on the the hash
-process described by \fI*state\fP, as many times are
-required to get \fItimes\fP additional digests.
+process described by
+.IR *state ,
+as many times are required to get
+.I times
+additional digests.
.SH RETURN VALUES
The
.BR libkeccak_fast_squeeze ()
@@ -29,9 +34,6 @@ function cannot fail.
.BR libkeccak_fast_digest (3),
.BR libkeccak_simple_squeeze (3),
.BR libkeccak_squeeze (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_fast_update.3 b/doc/man/libkeccak_fast_update.3
index 4847fbb..c619e7d 100644
--- a/doc/man/libkeccak_fast_update.3
+++ b/doc/man/libkeccak_fast_update.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_FAST_UPDATE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_FAST_UPDATE 3 LIBKECCAK
.SH NAME
libkeccak_fast_update - Partially hash a message without erasure
.SH SYNOPSIS
@@ -6,17 +6,23 @@ libkeccak_fast_update - Partially hash a message without erasure
.nf
#include <libkeccak.h>
.P
-int libkeccak_fast_update(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP, size_t \fImsglen\fP);
+int
+libkeccak_fast_update(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP,
+ size_t \fImsglen\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_fast_update ()
function continues (or starts) hashing a message.
-The current state of the hashing is stored in \fI*state\fP,
-and will be updated. The message specified by the \fImsg\fP
-parameter with the byte-size specified by the \fImsglen\fP
+The current state of the hashing is stored in
+.IR *state ,
+and will be updated. The message specified by the
+.I msg
+parameter with the byte-size specified by the
+.I msglen
parameter, will be hashed.
.PP
The
@@ -29,14 +35,18 @@ allocation is securely removed if a new allocation is required.
The
.BR libkeccak_fast_update ()
function returns 0 upon successful completion. On error,
--1 is returned and \fIerrno\fP is set to describe the error.
+-1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_fast_update ()
function may fail for any reason specified by the function
.BR realloc (3).
.SH NOTES
-Neither parameter by be \fINULL\fP or 0.
+Neither parameter by be
+.I NULL
+or 0.
.SH EXAMPLE
This example calculates the Keccak[b = 1024, c = 576, n = 256]
hash of the input from stdin, and prints the hash, in hexadecimal
@@ -81,9 +91,6 @@ libkeccak_state_fast_destroy(&state);
.BR libkeccak_update (3),
.BR libkeccak_fast_digest (3),
.BR libkeccak_digest (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_generalised_spec_initialise.3 b/doc/man/libkeccak_generalised_spec_initialise.3
index d975d92..42bd62f 100644
--- a/doc/man/libkeccak_generalised_spec_initialise.3
+++ b/doc/man/libkeccak_generalised_spec_initialise.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_GENERALISED_SPEC_INITIALISE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_GENERALISED_SPEC_INITIALISE 3 LIBKECCAK
.SH NAME
libkeccak_generalised_spec_initialise - Set all specification parameters to automatic
.SH SYNOPSIS
@@ -6,21 +6,27 @@ libkeccak_generalised_spec_initialise - Set all specification parameters to auto
.nf
#include <libkeccak.h>
.P
-void libkeccak_generalised_spec_initialise(libkeccak_generalised_spec_t *\fIspec\fP);
+void
+libkeccak_generalised_spec_initialise(libkeccak_generalised_spec_t *\fIspec\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_generalised_spec_initialise ()
-function initialises \fI*spec\fP, so that all
-parameters are configured to be automatically selected.
+function initialises
+.IR *spec ,
+so that all parameters are configured to be
+automatically selected.
.PP
Automatic selection means that value will be set
to the default, which depends on the other settings.
.PP
-Specifically, all members of \fI*spec\fP, will be
-set to \fBLIBKECCAK_GENERALISED_SPEC_AUTOMATIC\fP.
+Specifically, all members of
+.IR *spec ,
+will be set to
+.BR LIBKECCAK_GENERALISED_SPEC_AUTOMATIC .
.SH RETURN VALUES
The
.BR libkeccak_generalised_spec_initialise ()
@@ -35,9 +41,6 @@ function cannot fail.
.BR libkeccak_spec_sha3 (3),
.BR libkeccak_spec_rawshake (3),
.BR libkeccak_spec_shake (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_generalised_sum_fd.3 b/doc/man/libkeccak_generalised_sum_fd.3
index 68b25f2..98e6329 100644
--- a/doc/man/libkeccak_generalised_sum_fd.3
+++ b/doc/man/libkeccak_generalised_sum_fd.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_GENERALISED_SUM_FD 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_GENERALISED_SUM_FD 3 LIBKECCAK
.SH NAME
libkeccak_generalised_sum_fd - Calculate the hash of a file
.SH SYNOPSIS
@@ -6,41 +6,64 @@ libkeccak_generalised_sum_fd - Calculate the hash of a file
.nf
#include <libkeccak.h>
.P
-int libkeccak_generalised_sum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
- const libkeccak_spec_t *\fIspec\fP,
- const char *\fIsuffix\fP, char *\fIhashsum\fP);
+int
+libkeccak_generalised_sum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
+ const libkeccak_spec_t *\fIspec\fP,
+ const char *\fIsuffix\fP, char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_generalised_sum_fd ()
function calculates the hash of a file, whose file desriptor is
-specified by \fIfd\fP (and should be at the beginning of the file.)
-The hash algorithm is specified by \fI*spec\fP and \fIsuffix\fP,
-where \fI*spec\fP is the tuning of the algorithm and \fIsuffix\fP
-is the bits append to the message (or \fINULL\fP if none.)
+specified by
+.I fd
+(and should be at the beginning of the file.) The hash algorithm
+is specified by
+.I *spec
+and
+.IR suffix ,
+where
+.I *spec
+is the tuning of the algorithm and
+.I suffix
+is the bits append to the message (or
+.I NULL
+if none.)
.PP
-The hash is stored in binary form to \fIhashsum\fP. \fIhashsum\fP
+The hash is stored in binary form to
+.IR hashsum .
+.I hashsum
should have an allocation size of at least
-(((\fIspec->output\fP + 7) / 8) * sizeof(char)).
+.RI ((( spec->output
++ 7) / 8) * sizeof(char)).
.PP
-\fI*state\fP should not be initialised.
+.I *state
+should not be initialised.
.BR libkeccak_generalised_sum_fd ()
-initialises \fI*state\fP itself. Therefore there would be a
-memory leak if \fI*state\fP is already initialised.
+initialises
+.I *state
+itself. Therefore there would be a memory leak if
+.I *state
+is already initialised.
.SH RETURN VALUES
The
.BR libkeccak_generalised_sum_fd ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_generalised_sum_fd ()
function may fail for any reason, except those resulting
-in \fIerrno\fP being set to \fBEINTR\fP, specified for the
-functions
+in
+.I errno
+being set to
+.BR EINTR ,
+specified for the functions
.BR read (2),
.BR malloc (3),
and
@@ -59,8 +82,10 @@ hashing as this could limit what you can do, and make
the library more complex.
.PP
.BR libkeccak_generalised_sum_fd ()
-does not stop if interrupted (\fBread\fP(2) returns
-\fBEINTR\fP.)
+does not stop if interrupted
+.RB ( read (2)
+returns
+.BR EINTR .)
.PP
.BR libkeccak_generalised_sum_fd ()
assumes all information is non-sensitive, and will
@@ -102,9 +127,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_copy.3 b/doc/man/libkeccak_hmac_copy.3
index 742f528..f3939f5 100644
--- a/doc/man/libkeccak_hmac_copy.3
+++ b/doc/man/libkeccak_hmac_copy.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_COPY 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_COPY 3 LIBKECCAK
.SH NAME
libkeccak_hmac_copy - Copies an HMAC-hashing state
.SH SYNOPSIS
@@ -6,24 +6,31 @@ libkeccak_hmac_copy - Copies an HMAC-hashing state
.nf
#include <libkeccak.h>
.P
-int libkeccak_hmac_copy(libkeccak_hmac_state_t *\fIdest\fP,
- const libkeccak_hmac_state_t *\fIsrc\fP);
+int
+libkeccak_hmac_copy(libkeccak_hmac_state_t *\fIdest\fP,
+ const libkeccak_hmac_state_t *\fIsrc\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_copy ()
-function initialises \fI*dest\fP to be identical to \fI*src\fP.
-This includes all members of the \fBlibkeccak_hmac_state_t\fP
+function initialises
+.I *dest
+to be identical to
+.IR *src .
+This includes all members of the
+.B libkeccak_hmac_state_t
structure, including the state of the sponge and the
message chunk buffer.
.SH RETURN VALUES
The
.BR libkeccak_hmac_copy ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_hmac_copy ()
@@ -32,9 +39,6 @@ function may fail for any specified for the function
.SH SEE ALSO
.BR libkeccak_hmac_duplicate (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_create.3 b/doc/man/libkeccak_hmac_create.3
index 66f25d9..fcb99cb 100644
--- a/doc/man/libkeccak_hmac_create.3
+++ b/doc/man/libkeccak_hmac_create.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_CREATE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_CREATE 3 LIBKECCAK
.SH NAME
libkeccak_hmac_create - Allocate and initialise HMAC-hashing state
.SH SYNOPSIS
@@ -6,25 +6,36 @@ libkeccak_hmac_create - Allocate and initialise HMAC-hashing state
.nf
#include <libkeccak.h>
.P
-libkeccak_hmac_state_t *libkeccak_hmac_create(const libkeccak_spec_t *\fIspec\fP,
- const char *\fIkey\fP, size_t \fIkey_length\fP);
+libkeccak_hmac_state_t *
+libkeccak_hmac_create(const libkeccak_spec_t *\fIspec\fP, const char *\fIkey\fP,
+ size_t \fIkey_length\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_create ()
-function allocates a new \fIlibkeccak_hmac_state_t*\fP with one
-initialised element, and sets the algorithm tuning parameters to
-those specified by \fI*spec\fP, and the key to \fIkey\fP of
-length \fIkey_length\fP.
+function allocates a new
+.I libkeccak_hmac_state_t*
+with one initialised element, and sets the
+algorithm tuning parameters to those specified by
+.IR *spec ,
+and the key to
+.I key
+of length
+.IR key_length .
.SH RETURN VALUES
The
.BR libkeccak_hmac_create ()
-function returns a newly allocated \fIlibkeccak_hmac_state_t*\fP
+function returns a newly allocated
+.I libkeccak_hmac_state_t*
(of one initialised element) upon successful completion.
-On error, \fINULL\fP is returned and \fIerrno\fP is set to
-describe the error.
+On error,
+.I NULL
+is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_hmac_create ()
@@ -37,9 +48,6 @@ and
.BR libkeccak_hmac_free (3),
.BR libkeccak_hmac_fast_free (3),
.BR libkeccak_hmac_duplicate (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_destroy.3 b/doc/man/libkeccak_hmac_destroy.3
index 8960a3e..2f3bbf8 100644
--- a/doc/man/libkeccak_hmac_destroy.3
+++ b/doc/man/libkeccak_hmac_destroy.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_DESTROY 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_DESTROY 3 LIBKECCAK
.SH NAME
libkeccak_hmac_destroy - Destroys an HMAC-hashing state with erasure
.SH SYNOPSIS
@@ -6,15 +6,20 @@ libkeccak_hmac_destroy - Destroys an HMAC-hashing state with erasure
.nf
#include <libkeccak.h>
.P
-void libkeccak_hmac_destroy(libkeccak_hmac_state_t *\fIstate\fP);
+void
+libkeccak_hmac_destroy(libkeccak_hmac_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_destroy ()
-function releases the allocations stored in \fI*state\fP,
-without releasing the allocation of \fIstate\fP itself.
+function releases the allocations stored in
+.IR *state ,
+without releasing the allocation of
+.I state
+itself.
.PP
The
.BR libkeccak_hmac_destroy ()
@@ -33,9 +38,6 @@ function cannot fail.
.BR libkeccak_hmac_initialise (3),
.BR libkeccak_hmac_reset (3),
.BR libkeccak_hmac_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_digest.3 b/doc/man/libkeccak_hmac_digest.3
new file mode 100644
index 0000000..bd50b2c
--- /dev/null
+++ b/doc/man/libkeccak_hmac_digest.3
@@ -0,0 +1,103 @@
+.TH LIBKECCAK_HMAC_DIGEST 3 LIBKECCAK
+.SH NAME
+libkeccak_hmac_digest - Complete the HMAC-hashing of a message with erasure
+.SH SYNOPSIS
+.LP
+.nf
+#include <libkeccak.h>
+.P
+int
+libkeccak_hmac_digest(libkeccak_hmac_state_t *\fIstate\fP, const char *\fImsg\fP,
+ size_t \fImsglen\fP, size_t \fIbits\fP, const char *\fIsuffix\fP,
+ char *\fIhashsum\fP);
+.fi
+.P
+Link with
+.IR -lkeccak .
+.SH DESCRIPTION
+The
+.BR libkeccak_hmac_digest ()
+function absorbes the last part of (or all of) a message,
+and returns the HMAC hash of the entire message. The last
+part of the message is specified by the
+.I msg
+parameter, and its byte-size is specified by the
+.I msglen
+parameter. If all of the message has already be processed
+by calls to the
+.BR libkeccak_hmac_update (3)
+function or the
+.BR libkeccak_hmac_fast_update (3)
+function (with the same pointer on
+.IR state ,)
+.I msg
+and
+.I msglen
+should be set to
+.I NULL
+and 0, respectively.
+.PP
+If the message is not comprised a whole number of bytes,
+the number of bits, modulus 8, in the message should be
+specified in the
+.I bits
+parameter.
+.I msglen
+must only count the number of whole bytes, that is, the
+floor of the number of bits in the message divided by 8.
+.PP
+.I suffix
+should be a NUL-terminated string of ASCII '1':s
+and '0':s, representing the bits that should be appended
+to the message. If this string is empty,
+.I NULL
+may be used instead. This is used to select hash algorithm.
+For pure Keccak,
+.I NULL
+or "" is used. For the other algorithms the constants
+.B LIBKECCAK_SHA3_SUFFIX
+(for SHA-3),
+.B LIBKECCAK_RAWSHAKE_SUFFIX
+(for RawSHAKE), and
+.B LIBKECCAK_SHAKE_SUFFIX
+(for SHAKE) are used.
+.PP
+The hash of the message will be stored to
+.IR hashsum ,
+unless
+.I hashsum
+is
+.I NULL
+(which increases the performance of the call.) A total of
+.RI (( state->n
++ 7) / 8) bytes will be written to the beginning of
+.IR hashsum .
+Therefore,
+.I hashsum
+needs at least an allocation size of that number of bytes.
+.PP
+The
+.BR libkeccak_hmac_digest ()
+function may reallocate the state's message chunk buffer.
+When doing so, it attempts to do so as securely as possible,
+rather than as fast as possible.
+.SH RETURN VALUES
+The
+.BR libkeccak_hmac_digest ()
+function returns 0 upon successful completion. On error,
+-1 is returned and
+.I errno
+is set to describe the error.
+.SH ERRORS
+The
+.BR libkeccak_hmac_digest ()
+function may fail for any reason specified by the function
+.BR malloc (3).
+.SH SEE ALSO
+.BR libkeccak_hmac_create (3),
+.BR libkeccak_hmac_initialise (3),
+.BR libkeccak_hmac_update (3),
+.BR libkeccak_hmac_fast_digest (3),
+.SH BUGS
+Please report bugs to https://github.com/maandree/libkeccak/issues or to
+maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_duplicate.3 b/doc/man/libkeccak_hmac_duplicate.3
index 44fce71..70c994c 100644
--- a/doc/man/libkeccak_hmac_duplicate.3
+++ b/doc/man/libkeccak_hmac_duplicate.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_DUPLICATE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_DUPLICATE 3 LIBKECCAK
.SH NAME
libkeccak_hmac_duplicate - Allocate a duplicate an HMAC-hashing state
.SH SYNOPSIS
@@ -6,24 +6,33 @@ libkeccak_hmac_duplicate - Allocate a duplicate an HMAC-hashing state
.nf
#include <libkeccak.h>
.P
-libkeccak_hmac_state_t *libkeccak_hmac_duplicate(const libkeccak_hmac_state_t *\fIsrc\fP);
+libkeccak_hmac_state_t *
+libkeccak_hmac_duplicate(const libkeccak_hmac_state_t *\fIsrc\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_duplicate ()
-function allocates a new hash state and initialises it to be identical
-to \fI*src\fP. This includes all members of the \fBlibkeccak_hmac_state_t\fP
-structure, including the state of the sponge and the message
-chunk buffer.
+function allocates a new hash state and initialises
+it to be identical to
+.IR *src .
+This includes all members of the
+.B libkeccak_hmac_state_t
+structure, including the state of the sponge and the
+message chunk buffer.
.SH RETURN VALUES
The
.BR libkeccak_hmac_duplicate ()
-function returns a newly allocated \fIlibkeccak_hmac_t*\fP
+function returns a newly allocated
+.I libkeccak_hmac_t*
(of one initialised element) upon successful completion.
-On error, \fINULL\fP is returned and \fIerrno\fP is set to
-describe the error.
+On error,
+.I NULL
+is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_hmac_duplicate ()
@@ -32,9 +41,6 @@ function may fail for any specified for the function
.SH SEE ALSO
.BR libkeccak_hmac_copy (3),
.BR libkeccak_hmac_create (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_fast_destroy.3 b/doc/man/libkeccak_hmac_fast_destroy.3
index 2725c86..d2af66e 100644
--- a/doc/man/libkeccak_hmac_fast_destroy.3
+++ b/doc/man/libkeccak_hmac_fast_destroy.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_FAST_DESTROY 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_FAST_DESTROY 3 LIBKECCAK
.SH NAME
libkeccak_hmac_fast_destroy - Destroys an HMAC-hashing state without erasure
.SH SYNOPSIS
@@ -6,15 +6,20 @@ libkeccak_hmac_fast_destroy - Destroys an HMAC-hashing state without erasure
.nf
#include <libkeccak.h>
.P
-void libkeccak_hamc_fast_destroy(libkeccak_hmac_state_t *\fIstate\fP);
+void
+libkeccak_hamc_fast_destroy(libkeccak_hmac_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_fast_destroy ()
-function releases the allocations stored in \fI*state\fP,
-without releasing the allocation of \fIstate\fP itself.
+function releases the allocations stored in
+.IR *state ,
+without releasing the allocation of
+.I state
+itself.
.PP
The
.BR libkeccak_hmac_fast_destroy ()
@@ -33,9 +38,6 @@ function cannot fail.
.BR libkeccak_hmac_initialise (3),
.BR libkeccak_hmac_reset (3),
.BR libkeccak_hmac_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_fast_digest.3 b/doc/man/libkeccak_hmac_fast_digest.3
new file mode 100644
index 0000000..f717c4f
--- /dev/null
+++ b/doc/man/libkeccak_hmac_fast_digest.3
@@ -0,0 +1,104 @@
+.TH LIBKECCAK_HMAC_FAST_DIGEST 3 LIBKECCAK
+.SH NAME
+libkeccak_hmac_fast_digest - Complete the HMAC-hashing of a message without erasure
+.SH SYNOPSIS
+.LP
+.nf
+#include <libkeccak.h>
+.P
+int
+libkeccak_hmac_fast_digest(libkeccak_hmac_state_t *\fIstate\fP,
+ const char *\fImsg\fP, size_t \fImsglen\fP, size_t \fIbits\fP,
+ const char *\fIsuffix\fP, char *\fIhashsum\fP);
+.fi
+.P
+Link with
+.IR -lkeccak .
+.SH DESCRIPTION
+The
+.BR libkeccak_hmac_fast_digest ()
+function absorbes the last part of (or all of) a message,
+and returns the HMAC hash of the entire message. The last
+part of the message is specified by the
+.I msg
+parameter, and its byte-size is specified by the
+.I msglen
+parameter. If all of the message has already be processed
+by calls to the
+.BR libkeccak_hmac_update (3)
+function or the
+.BR libkeccak_hmac_fast_update (3)
+function (with the same pointer on
+.IR state ,)
+.I msg
+and
+.I msglen
+should be set to
+.I NULL
+and 0, respectively.
+.PP
+If the message is not comprised a whole number of bytes,
+the number of bits, modulus 8, in the message should be
+specified in the
+.I bits
+parameter.
+.I msglen
+must only count the number of whole bytes, that is, the
+floor of the number of bits in the message divided by 8.
+.PP
+.I suffix
+should be a NUL-terminated string of ASCII '1':s
+and '0':s, representing the bits that should be appended
+to the message. If this string is empty,
+.I NULL
+may be used instead. This is used to select hash algorithm.
+For pure Keccak,
+.I NULL
+or "" is used. For the other algorithms the constants
+.B LIBKECCAK_SHA3_SUFFIX
+(for SHA-3),
+.B LIBKECCAK_RAWSHAKE_SUFFIX
+(for RawSHAKE), and
+.B LIBKECCAK_SHAKE_SUFFIX
+(for SHAKE) are used.
+.PP
+The hash of the message will be stored to
+.IR hashsum ,
+unless
+.I hashsum
+is
+.I NULL
+(which increases the performance of the call.) A total of
+.RI (( state->n
++ 7) / 8) bytes will be written to the beginning of
+.IR hashsum .
+Therefore,
+.I hashsum
+needs at least an allocation size of that number of bytes.
+.PP
+The
+.BR libkeccak_hmac_fast_digest ()
+function may reallocate the state's message chunk buffer.
+When doing so, it attempts to do so as quickly as possible,
+rather than ensuring that the information in the old
+allocation is securely removed if a new allocation is required.
+.SH RETURN VALUES
+The
+.BR libkeccak_hmac_fast_digest ()
+function returns 0 upon successful completion. On error,
+-1 is returned and
+.I errno
+is set to describe the error.
+.SH ERRORS
+The
+.BR libkeccak_hmac_fast_digest ()
+function may fail for any reason specified by the function
+.BR realloc (3).
+.SH SEE ALSO
+.BR libkeccak_hmac_create (3),
+.BR libkeccak_hmac_initialise (3),
+.BR libkeccak_hmac_fast_update (3),
+.BR libkeccak_hmac_fast_digest (3),
+.SH BUGS
+Please report bugs to https://github.com/maandree/libkeccak/issues or to
+maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_fast_free.3 b/doc/man/libkeccak_hmac_fast_free.3
index 631d790..b4817ce 100644
--- a/doc/man/libkeccak_hmac_fast_free.3
+++ b/doc/man/libkeccak_hmac_fast_free.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_FAST_FREE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_FAST_FREE 3 LIBKECCAK
.SH NAME
libkeccak_hmac_fast_free - Destroys and deallocates an HMAC-hashing state without erasure
.SH SYNOPSIS
@@ -6,15 +6,19 @@ libkeccak_hmac_fast_free - Destroys and deallocates an HMAC-hashing state withou
.nf
#include <libkeccak.h>
.P
-void libkeccak_hmac_fast_free(libkeccak_hmac_state_t *\fIstate\fP);
+void
+libkeccak_hmac_fast_free(libkeccak_hmac_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_fast_free ()
-function releases the allocations stored in \fI*state\fP,
-and also released the allocation of \fIstate\fP.
+function releases the allocations stored in
+.IR *state ,
+and also released the allocation of
+.IR state .
.PP
The
.BR libkeccak_hmac_fast_free ()
@@ -42,9 +46,6 @@ to be freed, resulting in undefined behaviour.
.BR libkeccak_hmac_initialise (3),
.BR libkeccak_hmac_reset (3),
.BR libkeccak_hmac_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_free.3 b/doc/man/libkeccak_hmac_free.3
index 72a4b28..d1f9c84 100644
--- a/doc/man/libkeccak_hmac_free.3
+++ b/doc/man/libkeccak_hmac_free.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_FREE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_FREE 3 LIBKECCAK
.SH NAME
libkeccak_hmac_free - Destroys and deallocates an HMAC-hashing state with erasure
.SH SYNOPSIS
@@ -6,15 +6,19 @@ libkeccak_hmac_free - Destroys and deallocates an HMAC-hashing state with erasur
.nf
#include <libkeccak.h>
.P
-void libkeccak_hmac_free(libkeccak_hmac_state_t *\fIstate\fP);
+void
+libkeccak_hmac_free(libkeccak_hmac_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_free ()
-function releases the allocations stored in \fI*state\fP,
-and also release the allocation of \fIstate\fP.
+function releases the allocations stored in
+.IR *state ,
+and also release the allocation of
+.IR state .
.PP
The
.BR libkeccak_hmac_free ()
@@ -42,9 +46,6 @@ to be freed, resulting in undefined behaviour.
.BR libkeccak_hmac_initialise (3),
.BR libkeccak_hmac_reset (3),
.BR libkeccak_hmac_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_initialise.3 b/doc/man/libkeccak_hmac_initialise.3
index 4029ba0..de514e9 100644
--- a/doc/man/libkeccak_hmac_initialise.3
+++ b/doc/man/libkeccak_hmac_initialise.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_INITIALISE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_INITIALISE 3 LIBKECCAK
.SH NAME
libkeccak_hmac_initialise - Initialise HMAC-hashing state
.SH SYNOPSIS
@@ -6,24 +6,33 @@ libkeccak_hmac_initialise - Initialise HMAC-hashing state
.nf
#include <libkeccak.h>
.P
-int libkeccak_hmac_initialise(libkeccak_hmac_state_t *\fIstate\fP,
- const libkeccak_spec_t *\fIspec\fP,
- const char *\fIkey\fP, size_t \fIkey_length\fP);
+int
+libkeccak_hmac_initialise(libkeccak_hmac_state_t *\fIstate\fP,
+ const libkeccak_spec_t *\fIspec\fP,
+ const char *\fIkey\fP, size_t \fIkey_length\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_initialise ()
-function initialises \fI*state\fP and sets the algorithm
-tuning parameters to those specified by \fI*spec\fP,
-and the key to \fIkey\fP of length \fIkey_length\fP.
+function initialises
+.I *state
+and sets the algorithm tuning parameters to
+those specified by
+.IR *spec ,
+and the key to
+.I key
+of length
+.IR key_length .
.SH RETURN VALUES
The
.BR libkeccak_hmac_initialise ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_hmac_initialise ()
@@ -43,9 +52,6 @@ and
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_marshal.3 b/doc/man/libkeccak_hmac_marshal.3
index b5dbb27..b7270f6 100644
--- a/doc/man/libkeccak_hmac_marshal.3
+++ b/doc/man/libkeccak_hmac_marshal.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_MARSHAL 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_MARSHAL 3 LIBKECCAK
.SH NAME
libkeccak_hmac_marshal - Marshals an HMAC-hashing state
.SH SYNOPSIS
@@ -6,24 +6,31 @@ libkeccak_hmac_marshal - Marshals an HMAC-hashing state
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_hmac_marshal(const libkeccak_hmac_state_t *\fIstate\fP, char *\fIdata\fP);
+size_t
+libkeccak_hmac_marshal(const libkeccak_hmac_state_t *\fIstate\fP,
+ char *\fIdata\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_marshal ()
-function marshals \fI*state\fP into the beginning
-of \fIdata\fP.
+function marshals
+.I *state
+into the beginning of
+.IR data .
.PP
Use the
.BR libkeccak_hmac_marshal_size (3)
function to get minimum usable allocation size
-for \fIdata\fP.
+for
+.IR data .
.SH RETURN VALUES
The
.BR libkeccak_hmac_marshal ()
-returns the number of bytes written to \fIdata\fP.
+returns the number of bytes written to
+.IR data .
.SH ERRORS
The
.BR libkeccak_hmac_marshal ()
@@ -32,9 +39,6 @@ function cannot fail.
.BR libkeccak_hmac_marshal_size (3),
.BR libkeccak_hmac_unmarshal (3),
.BR libkeccak_hmac_unmarshal_skip (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_marshal_size.3 b/doc/man/libkeccak_hmac_marshal_size.3
index 527a79d..5195b81 100644
--- a/doc/man/libkeccak_hmac_marshal_size.3
+++ b/doc/man/libkeccak_hmac_marshal_size.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_MARSHAL_SIZE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_MARSHAL_SIZE 3 LIBKECCAK
.SH NAME
libkeccak_hmac_marshal_size - Calculates the marshal-size of an HMAC-hashing state
.SH SYNOPSIS
@@ -6,15 +6,18 @@ libkeccak_hmac_marshal_size - Calculates the marshal-size of an HMAC-hashing sta
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_hmac_marshal_size(const libkeccak_hmac_state_t *\fIstate\fP);
+size_t
+libkeccak_hmac_marshal_size(const libkeccak_hmac_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_marshal_size ()
function calculates the number of bytes required
-to marshal \fI*state\fP.
+to marshal
+.IR *state .
.SH RETURN VALUES
The
.BR libkeccak_hmac_marshal_size ()
@@ -28,9 +31,6 @@ function cannot fail.
.BR libkeccak_hmac_marshal (3),
.BR libkeccak_hmac_unmarshal (3),
.BR libkeccak_hmac_unmarshal_skip (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_reset.3 b/doc/man/libkeccak_hmac_reset.3
new file mode 100644
index 0000000..d5634d9
--- /dev/null
+++ b/doc/man/libkeccak_hmac_reset.3
@@ -0,0 +1,51 @@
+.TH LIBKECCAK_HMAC_RESET 3 LIBKECCAK
+.SH NAME
+libkeccak_hmac_reset - Reinitialise a HMAC-hashing state
+.SH SYNOPSIS
+.LP
+.nf
+#include <libkeccak.h>
+.P
+int
+libkeccak_hmac_reset(libkeccak_hmac_state_t *\fIstate\fP, const char *\fIkey\fP,
+ size_t \fIkey_length\fP);
+.fi
+.P
+Link with
+.IR -lkeccak .
+.SH DESCRIPTION
+The
+.BR libkeccak_hmac_reset ()
+function reinitialises an HMAC-hashing state with a new key.
+.I key_length
+is the length of the key in bits. If
+.I key
+is
+.IR NULL ,
+the key remains unchanged.
+.SH RETURN VALUES
+The
+.BR libkeccak_hmac_reset ()
+function returns 0 successful completion.
+On error -1 is returned and
+.I errno
+is set to describe the error.
+.SH ERRORS
+The
+.BR libkeccak_hmac_reset ()
+function may fail for any specified for the functions
+.BR malloc (3)
+and
+.BR realloc (3).
+.SH SEE ALSO
+.BR libkeccak_hmac_create (3),
+.BR libkeccak_hmac_initialise (3),
+.BR libkeccak_hmac_set_key (3),
+.BR libkeccak_hmac_wipe (3),
+.BR libkeccak_hmac_fast_free (3),
+.BR libkeccak_hmac_free (3),
+.BR libkeccak_hmac_fast_destroy (3),
+.BR libkeccak_hmac_destroy (3)
+.SH BUGS
+Please report bugs to https://github.com/maandree/libkeccak/issues or to
+maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_set_key.3 b/doc/man/libkeccak_hmac_set_key.3
new file mode 100644
index 0000000..2f4682d
--- /dev/null
+++ b/doc/man/libkeccak_hmac_set_key.3
@@ -0,0 +1,41 @@
+.TH LIBKECCAK_HMAC_SET_KEY 3 LIBKECCAK
+.SH NAME
+libkeccak_hmac_set_key - Changes key for a the HMAC-hashing state
+.SH SYNOPSIS
+.LP
+.nf
+#include <libkeccak.h>
+.P
+int
+libkeccak_hmac_set_key(libkeccak_hmac_state_t *\fIstate\fP, const char *\fIkey\fP,
+ size_t \fIkey_length\fP);
+.fi
+.P
+Link with
+.IR -lkeccak .
+.SH DESCRIPTION
+The
+.BR libkeccak_hmac_set_key ()
+function sets the key for a HMAC-hashing state without reseting
+the state of the underlaying hashing-algorithm.
+.I key_length
+is the length of the key in bits.
+.SH RETURN VALUES
+The
+.BR libkeccak_hmac_set_key ()
+function returns 0 successful completion.
+On error -1 is returned and
+.I errno
+is set to describe the error.
+.SH ERRORS
+The
+.BR libkeccak_hmac_set_key ()
+function may fail for any specified for the function
+.BR realloc (3).
+.SH SEE ALSO
+.BR libkeccak_hmac_create (3),
+.BR libkeccak_hmac_initialise (3),
+.BR libkeccak_hmac_reset (3)
+.SH BUGS
+Please report bugs to https://github.com/maandree/libkeccak/issues or to
+maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_unmarshal.3 b/doc/man/libkeccak_hmac_unmarshal.3
index 5848b5f..64e8f24 100644
--- a/doc/man/libkeccak_hmac_unmarshal.3
+++ b/doc/man/libkeccak_hmac_unmarshal.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_UNMARSHAL 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_UNMARSHAL 3 LIBKECCAK
.SH NAME
libkeccak_hmac_unmarshal - Unharshals an HMAC-hashing state
.SH SYNOPSIS
@@ -6,19 +6,25 @@ libkeccak_hmac_unmarshal - Unharshals an HMAC-hashing state
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_hmac_unmarshal(libkeccak_hmac_state_t *\fIstate\fP, const char *\fIdata\fP);
+size_t
+libkeccak_hmac_unmarshal(libkeccak_hmac_state_t *\fIstate\fP,
+ const char *\fIdata\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_unmarshal ()
-function unmarshals an HMAC-hashing state from the beginning
-of \fIdata\fP. and stores it in \fI*state\fP.
+function unmarshals an HMAC-hashing state from the beginning of
+.IR data .
+and stores it in
+.IR *state .
.SH RETURN VALUES
The
.BR libkeccak_hmac_unmarshal ()
-returns the number of bytes reads from \fIdata\fP.
+returns the number of bytes reads from
+.IR data x.
.SH ERRORS
The
.BR libkeccak_hmac_unmarshal ()
@@ -28,9 +34,6 @@ function may fail for any specified for the function
.BR libkeccak_hmac_marshal_size (3),
.BR libkeccak_hmac_marshal (3),
.BR libkeccak_hmac_unmarshal_skip (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_unmarshal_skip.3 b/doc/man/libkeccak_hmac_unmarshal_skip.3
index 552797f..30e7ccf 100644
--- a/doc/man/libkeccak_hmac_unmarshal_skip.3
+++ b/doc/man/libkeccak_hmac_unmarshal_skip.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_HMAC_UNMARSHAL_SKIP 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_HMAC_UNMARSHAL_SKIP 3 LIBKECCAK
.SH NAME
libkeccak_hmac_unmarshal_skip - Calculates the marshal-size of a marshalled HMAC-hashing state
.SH SYNOPSIS
@@ -6,15 +6,18 @@ libkeccak_hmac_unmarshal_skip - Calculates the marshal-size of a marshalled HMAC
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_hmac_unmarshal_skip(const char *\fIdata\fP);
+size_t
+libkeccak_hmac_unmarshal_skip(const char *\fIdata\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_hmac_unmarshal_skip ()
function gets the number of bytes with which
-the HMAC-hashing state in the beginning of \fIdata\fP
+the HMAC-hashing state in the beginning of
+.I data
is store stored. This is useful if you do not
want to unmarshal the state.
.SH RETURN VALUES
@@ -32,9 +35,6 @@ function cannot fail.
.BR libkeccak_hmac_marshal_size (3),
.BR libkeccak_hmac_marshal (3),
.BR libkeccak_hmac_unmarshal (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_hmac_wipe.3 b/doc/man/libkeccak_hmac_wipe.3
new file mode 100644
index 0000000..bad351b
--- /dev/null
+++ b/doc/man/libkeccak_hmac_wipe.3
@@ -0,0 +1,36 @@
+.TH LIBKECCAK_HMAC_WIPE 3 LIBKECCAK
+.SH NAME
+libkeccak_hmac_wipe - Securely erase sensitive data from a HMAC-hashing state
+.SH SYNOPSIS
+.LP
+.nf
+#include <libkeccak.h>
+.P
+int
+libkeccak_hmac_wipe(libkeccak_hmac_state_t *\fIstate\fP);
+.fi
+.P
+Link with
+.IR -lkeccak .
+.SH DESCRIPTION
+The
+.BR libkeccak_hmac_wipe ()
+function securely erases data that may be
+sensitive: the buffer and the state of the
+underlaying hash-algorithm.
+.SH RETURN VALUES
+The
+.BR libkeccak_hmac_wipe ()
+function does not return any value.
+.SH ERRORS
+The
+.BR libkeccak_hmac_wipe ()
+function cannot fail.
+.SH SEE ALSO
+.BR libkeccak_hmac_fast_free (3),
+.BR libkeccak_hmac_free (3),
+.BR libkeccak_hmac_fast_destroy (3),
+.BR libkeccak_hmac_destroy (3)
+.SH BUGS
+Please report bugs to https://github.com/maandree/libkeccak/issues or to
+maandree@kth.se
diff --git a/doc/man/libkeccak_keccaksum_fd.3 b/doc/man/libkeccak_keccaksum_fd.3
index 64b3379..2fc1b21 100644
--- a/doc/man/libkeccak_keccaksum_fd.3
+++ b/doc/man/libkeccak_keccaksum_fd.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_KECCAKSUM_FD 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_KECCAKSUM_FD 3 LIBKECCAK
.SH NAME
libkeccak_keccaksum_fd - Calculate a Keccak hashsum of a file
.SH SYNOPSIS
@@ -6,39 +6,54 @@ libkeccak_keccaksum_fd - Calculate a Keccak hashsum of a file
.nf
#include <libkeccak.h>
.P
-int libkeccak_keccaksum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
- const libkeccak_spec_t *\fIspec\fP, char *\fIhashsum\fP);
+int
+libkeccak_keccaksum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
+ const libkeccak_spec_t *\fIspec\fP, char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_keccaksum_fd ()
function calculates a Keccak hashsum of a file, whose file
-desriptor is specified by \fIfd\fP (and should be at the
-beginning of the file.) The hash algorithm tuning is
-specified by \fI*spec\fP.
+desriptor is specified by
+.I fd
+(and should be at the beginning of the file.) The hash
+algorithm tuning is specified by
+.IR *spec .
.PP
-The hash is stored in binary form to \fIhashsum\fP. \fIhashsum\fP
+The hash is stored in binary form to
+.IR hashsum .
+.I hashsum
should have an allocation size of at least
-(((\fIspec->output\fP + 7) / 8) * sizeof(char)).
+.RI ((( spec->output
++ 7) / 8) * sizeof(char)).
.PP
-\fI*state\fP should not be initialised.
+.I *state
+should not be initialised.
.BR libkeccak_keccaksum_fd ()
-initialises \fI*state\fP itself. Therefore there would be a
-memory leak if \fI*state\fP is already initialised.
+initialises
+.I *state
+itself. Therefore there would be a memory leak if
+.I *state
+is already initialised.
.SH RETURN VALUES
The
.BR libkeccak_keccaksum_fd ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_keccaksum_fd ()
function may fail for any reason, except those resulting
-in \fIerrno\fP being set to \fBEINTR\fP, specified for the
-functions
+in
+.I errno
+being set to
+.BR EINTR ,
+specified for the functions
.BR read (2),
.BR malloc (3),
and
@@ -57,8 +72,10 @@ hashing as this could limit what you can do, and make
the library more complex.
.PP
.BR libkeccak_keccaksum_fd ()
-does not stop if interrupted (\fBread\fP(2) returns
-\fBEINTR\fP.)
+does not stop if interrupted
+.RI ( read (2)
+returns
+.BR EINTR .)
.PP
.BR libkeccak_keccaksum_fd ()
assumes all information is non-sensitive, and will
@@ -97,9 +114,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_rawshakesum_fd.3 b/doc/man/libkeccak_rawshakesum_fd.3
index 18c841e..27c4f45 100644
--- a/doc/man/libkeccak_rawshakesum_fd.3
+++ b/doc/man/libkeccak_rawshakesum_fd.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_RAWSHAKESUM_FD 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_RAWSHAKESUM_FD 3 LIBKECCAK
.SH NAME
libkeccak_rawshakesum_fd - Calculate a RawSHAKE hashsum of a file
.SH SYNOPSIS
@@ -6,41 +6,58 @@ libkeccak_rawshakesum_fd - Calculate a RawSHAKE hashsum of a file
.nf
#include <libkeccak.h>
.P
-int libkeccak_rawshakesum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
- long \fIsemicapacity\fP, long \fIoutput\fP,
- char *\fIhashsum\fP);
+int
+libkeccak_rawshakesum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
+ long int \fIsemicapacity\fP, long int \fIoutput\fP,
+ char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_rawshakesum_fd ()
-function calculates a RawSHAKE hashsum of a file, whose file desriptor
-is specified by \fIfd\fP (and should be at the beginning of the file.)
-The hash algorithm is tuned by the \fIsemicapacity\fP and \fIoutput\fP
-parameters; they specify the half of the capacity and the output size,
-respectively, in bits.
+function calculates a RawSHAKE hashsum of a file, whose
+file desriptor is specified by
+.I fd
+(and should be at the beginning of the file.) The hash
+algorithm is tuned by the
+.I semicapacity
+and
+.I output
+parameters; they specify the half of the capacity and
+the output size, respectively, in bits.
.PP
-The hash is stored in binary form to \fIhashsum\fP. \fIhashsum\fP
+The hash is stored in binary form to
+.IR hashsum .
+.I hashsum
should have an allocation size of at least
-(((\fIoutput\fP + 7) / 8) * sizeof(char)).
+.RI ((( output
++ 7) / 8) * sizeof(char)).
.PP
-\fI*state\fP should not be initialised.
+.I *state
+should not be initialised.
.BR libkeccak_rawshakesum_fd ()
-initialises \fI*state\fP itself. Therefore there would be a
-memory leak if \fI*state\fP is already initialised.
+initialises
+.I *state
+itself. Therefore there would be a memory leak if
+.I *state
+is already initialised.
.SH RETURN VALUES
The
.BR libkeccak_rawshakesum_fd ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_rawshakesum_fd ()
-function may fail for any reason, except those resulting
-in \fIerrno\fP being set to \fBEINTR\fP, specified for the
-functions
+function may fail for any reason, except those resulting in
+.I errno
+being set to
+.BR EINTR ,
+specified for the functions
.BR read (2),
.BR malloc (3),
and
@@ -59,8 +76,10 @@ hashing as this could limit what you can do, and make
the library more complex.
.PP
.BR libkeccak_rawshakesum_fd ()
-does not stop if interrupted (\fBread\fP(2) returns
-\fBEINTR\fP.)
+does not stop if interrupted
+.RB ( read (2)
+returns
+.BR EINTR .)
.PP
.BR libkeccak_rawshakesum_fd ()
assumes all information is non-sensitive, and will
@@ -91,9 +110,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_sha3sum_fd.3 b/doc/man/libkeccak_sha3sum_fd.3
index 1dab281..e8c4fc0 100644
--- a/doc/man/libkeccak_sha3sum_fd.3
+++ b/doc/man/libkeccak_sha3sum_fd.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SHA3SUM_FD 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SHA3SUM_FD 3 LIBKECCAK
.SH NAME
libkeccak_sha3sum_fd - Calculate a SHA-3 hashsum of a file
.SH SYNOPSIS
@@ -6,39 +6,54 @@ libkeccak_sha3sum_fd - Calculate a SHA-3 hashsum of a file
.nf
#include <libkeccak.h>
.P
-int libkeccak_sha3sum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
- long \fIoutput\fP, char *\fIhashsum\fP);
+int
+libkeccak_sha3sum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP, long int \fIoutput\fP,
+ char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_sha3sum_fd ()
function calculates a SHA-3 hashsum of a file, whose file
-desriptor is specified by \fIfd\fP (and should be at the
-beginning of the file.) The hash algorithm is tuned by the
-\fIoutput\fP parameter; it specifies the output size, in bits.
+desriptor is specified by
+.I fd
+(and should be at the beginning of the file.) The hash
+algorithm is tuned by the
+.I output
+parameter; it specifies the output size, in bits.
.PP
-The hash is stored in binary form to \fIhashsum\fP. \fIhashsum\fP
+The hash is stored in binary form to
+.IR hashsum .
+.I hashsum
should have an allocation size of at least
-(((\fIoutput\fP + 7) / 8) * sizeof(char)).
+.RI ((( output
++ 7) / 8) * sizeof(char)).
.PP
-\fI*state\fP should not be initialised.
+.I *state
+should not be initialised.
.BR libkeccak_sha3sum_fd ()
-initialises \fI*state\fP itself. Therefore there would be a
-memory leak if \fI*state\fP is already initialised.
+initialises
+.I *state
+itself. Therefore there would be a memory leak if
+.I *state
+is already initialised.
.SH RETURN VALUES
The
.BR libkeccak_sha3sum_fd ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_sha3sum_fd ()
-function may fail for any reason, except those resulting
-in \fIerrno\fP being set to \fBEINTR\fP, specified for the
-functions
+function may fail for any reason, except those resulting in
+.I errno
+being set to
+.BR EINTR ,
+specified for the functions
.BR read (2),
.BR malloc (3),
and
@@ -57,8 +72,10 @@ hashing as this could limit what you can do, and make
the library more complex.
.PP
.BR libkeccak_sha3sum_fd ()
-does not stop if interrupted (\fBread\fP(2) returns
-\fBEINTR\fP.)
+does not stop if interrupted
+.RB ( read (2)
+returns
+.BR EINTR .)
.PP
.BR libkeccak_sha3sum_fd ()
assumes all information is non-sensitive, and will
@@ -89,9 +106,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_shakesum_fd.3 b/doc/man/libkeccak_shakesum_fd.3
index 21c3ced..0d89f39 100644
--- a/doc/man/libkeccak_shakesum_fd.3
+++ b/doc/man/libkeccak_shakesum_fd.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SHAKESUM_FD 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SHAKESUM_FD 3 LIBKECCAK
.SH NAME
libkeccak_shakesum_fd - Calculate a SHAKE hashsum of a file
.SH SYNOPSIS
@@ -6,41 +6,58 @@ libkeccak_shakesum_fd - Calculate a SHAKE hashsum of a file
.nf
#include <libkeccak.h>
.P
-int libkeccak_shakesum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
- long \fIsemicapacity\fP, long \fIoutput\fP,
- char *\fIhashsum\fP);
+int
+libkeccak_shakesum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
+ long int \fIsemicapacity\fP, long int \fIoutput\fP,
+ char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_shakesum_fd ()
-function calculates a SHAKE hashsum of a file, whose file desriptor is
-specified by \fIfd\fP (and should be at the beginning of the file.)
-The hash algorithm is tuned by the \fIsemicapacity\fP and \fIoutput\fP
-parameters; they specify the half of the capacity and the output size,
-respectively, in bits.
+function calculates a SHAKE hashsum of a file, whose file
+desriptor is specified by
+.I fd
+(and should be at the beginning of the file.) The hash
+algorithm is tuned by the
+.I semicapacity
+and
+.I output
+parameters; they specify the half of the capacity and the
+output size, respectively, in bits.
.PP
-The hash is stored in binary form to \fIhashsum\fP. \fIhashsum\fP
+The hash is stored in binary form to
+.IR hashsum .
+.I hashsum
should have an allocation size of at least
-(((\fIoutput\fP + 7) / 8) * sizeof(char)).
+.RI ((( output
++ 7) / 8) * sizeof(char)).
.PP
-\fI*state\fP should not be initialised.
+.I *state
+should not be initialised.
.BR libkeccak_shakesum_fd ()
-initialises \fI*state\fP itself. Therefore there would be a
-memory leak if \fI*state\fP is already initialised.
+initialises
+.I *state
+itself. Therefore there would be a memory leak if
+.I *state
+is already initialised.
.SH RETURN VALUES
The
.BR libkeccak_shakesum_fd ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_shakesum_fd ()
-function may fail for any reason, except those resulting
-in \fIerrno\fP being set to \fBEINTR\fP, specified for the
-functions
+function may fail for any reason, except those resulting in
+.I errno
+being set to
+.BR EINTR ,
+specified for the functions
.BR read (2),
.BR malloc (3),
and
@@ -59,8 +76,10 @@ hashing as this could limit what you can do, and make
the library more complex.
.PP
.BR libkeccak_shakesum_fd ()
-does not stop if interrupted (\fBread\fP(2) returns
-\fBEINTR\fP.)
+does not stop if interrupted
+.RB ( read (2)
+returns
+.BR EINTR .)
.PP
.BR libkeccak_shakesum_fd ()
assumes all information is non-sensitive, and will
@@ -91,9 +110,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_simple_squeeze.3 b/doc/man/libkeccak_simple_squeeze.3
index 8c7ec62..52605ed 100644
--- a/doc/man/libkeccak_simple_squeeze.3
+++ b/doc/man/libkeccak_simple_squeeze.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SIMPLE_SQUEEZE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SIMPLE_SQUEEZE 3 LIBKECCAK
.SH NAME
libkeccak_simple_squeeze - Runs Keccak-f a number of times
.SH SYNOPSIS
@@ -6,15 +6,20 @@ libkeccak_simple_squeeze - Runs Keccak-f a number of times
.nf
#include <libkeccak.h>
.P
-void libkeccak_simple_squeeze(libkeccak_state_t *\fIstate\fP, long \fItimes\fP);
+void
+libkeccak_simple_squeeze(libkeccak_state_t *\fIstate\fP, long int \fItimes\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_simple_squeeze ()
-function runs Keccak-f \fItimes\fP times on the hashing
-process described by \fI*state\fP.
+function runs Keccak-f
+.I times
+times on the hashing
+process described by
+.IR *state .
.SH RETURN VALUES
The
.BR libkeccak_simple_squeeze ()
@@ -28,9 +33,6 @@ function cannot fail.
.BR libkeccak_fast_digest (3),
.BR libkeccak_fast_squeeze (3),
.BR libkeccak_squeeze (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_spec_check.3 b/doc/man/libkeccak_spec_check.3
index cfdb580..9fc70f6 100644
--- a/doc/man/libkeccak_spec_check.3
+++ b/doc/man/libkeccak_spec_check.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SPEC_CHECK 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SPEC_CHECK 3 LIBKECCAK
.SH NAME
libkeccak_spec_check - Validate hashing parameters
.SH SYNOPSIS
@@ -6,14 +6,17 @@ libkeccak_spec_check - Validate hashing parameters
.nf
#include <libkeccak.h>
.P
-int libkeccak_spec_check(const libkeccak_spec_t *\fIspec\fP);
+int
+libkeccak_spec_check(const libkeccak_spec_t *\fIspec\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_spec_check ()
-function validates the parameters of \fI*spec\fP,
+function validates the parameters of
+.IR *spec ,
so that unusable configurations can be detected.
It is recommended to call this function after calling
.BR libkeccak_spec_sha3 (3),
@@ -24,9 +27,9 @@ manually for Keccak hashing.
.PP
.nf
typedef struct libkeccak_spec {
- long bitrate; /* bitrate (in bits) */
- long capacity; /* capacity (in bits) */
- long output; /* output size (in bits) */
+ long int bitrate; /* bitrate (in bits) */
+ long int capacity; /* capacity (in bits) */
+ long int output; /* output size (in bits) */
} libkeccak_spec_t;
.fi
.SH RETURN VALUES
@@ -87,9 +90,6 @@ function cannot fail.
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_spec_rawshake.3 b/doc/man/libkeccak_spec_rawshake.3
index e9429f1..a7c7fce 100644
--- a/doc/man/libkeccak_spec_rawshake.3
+++ b/doc/man/libkeccak_spec_rawshake.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SPEC_RAWSHAKE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SPEC_RAWSHAKE 3 LIBKECCAK
.SH NAME
libkeccak_spec_rawshake - Configure RawSHAKE hashing parameters
.SH SYNOPSIS
@@ -6,17 +6,24 @@ libkeccak_spec_rawshake - Configure RawSHAKE hashing parameters
.nf
#include <libkeccak.h>
.P
-void libkeccak_spec_rawshake(libkeccak_spec_t *\fIspec\fP, long \fIx\fP, long \fId\fP);
+void
+libkeccak_spec_rawshake(libkeccak_spec_t *\fIspec\fP, long int \fIx\fP,
+ long int \fId\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_spec_rawshake ()
-function sets \fI*spec\fP to specify the Keccak parameters
-used for RawSHAKE hashing with the semicapacity specified,
-in bits, via the \fIx\fP parameter, and the output size
-specified, in bits, via the \fId\fP parameter.
+function sets
+.I *spec
+to specify the Keccak parameters used for RawSHAKE hashing
+with the semicapacity specified, in bits, via the
+.I x
+parameter, and the output size specified, in bits, via the
+.I d
+parameter.
.SH RETURN VALUES
The
.BR libkeccak_spec_rawshake ()
@@ -26,8 +33,9 @@ The
.BR libkeccak_spec_rawshake ()
function cannot fail.
.SH EXAMPLE
-This examples configure a \fBlibkeccak_spec_t\fP to specify
-the Keccak parameters used for RawSHAKE256(, 512):
+This examples configure a
+.B libkeccak_spec_t
+to specify the Keccak parameters used for RawSHAKE256(, 512):
.LP
.nf
libkeccak_spec_t spec;
@@ -40,9 +48,6 @@ libkeccak_spec_rawshake(&spec, 256, 512);
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_spec_sha3.3 b/doc/man/libkeccak_spec_sha3.3
index 95d4437..7978e6e 100644
--- a/doc/man/libkeccak_spec_sha3.3
+++ b/doc/man/libkeccak_spec_sha3.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SPEC_SHA3 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SPEC_SHA3 3 LIBKECCAK
.SH NAME
libkeccak_spec_sha3 - Configure SHA-3 hashing parameters
.SH SYNOPSIS
@@ -6,16 +6,22 @@ libkeccak_spec_sha3 - Configure SHA-3 hashing parameters
.nf
#include <libkeccak.h>
.P
-void libkeccak_spec_sha3(libkeccak_spec_t *\fIspec\fP, long \fIx\fP);
+void
+libkeccak_spec_sha3(libkeccak_spec_t *\fIspec\fP, long int \fIx\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_spec_sha3 ()
-function sets \fI*spec\fP to specify the Keccak parameters
+function sets
+.I *spec
+to specify the Keccak parameters
used for SHA-3 hashing with the output size specified,
-in bits, via the \fIx\fP parameter.
+in bits, via the
+.I x
+parameter.
.SH RETURN VALUES
The
.BR libkeccak_spec_sha3 ()
@@ -25,8 +31,9 @@ The
.BR libkeccak_spec_sha3 ()
function cannot fail.
.SH EXAMPLE
-This examples configure a \fBlibkeccak_spec_t\fP to specify
-the Keccak parameters used for SHA3-256:
+This examples configure a
+.B Blibkeccak_spec_t
+to specify the Keccak parameters used for SHA3-256:
.LP
.nf
libkeccak_spec_t spec;
@@ -39,9 +46,6 @@ libkeccak_spec_sha3(&spec, 256);
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_spec_shake.3 b/doc/man/libkeccak_spec_shake.3
index c07704f..692897f 100644
--- a/doc/man/libkeccak_spec_shake.3
+++ b/doc/man/libkeccak_spec_shake.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SPEC_SHAKE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SPEC_SHAKE 3 LIBKECCAK
.SH NAME
libkeccak_spec_shake - Configure SHAKE hashing parameters
.SH SYNOPSIS
@@ -6,17 +6,23 @@ libkeccak_spec_shake - Configure SHAKE hashing parameters
.nf
#include <libkeccak.h>
.P
-void libkeccak_spec_shake(libkeccak_spec_t *\fIspec\fP, long \fIx\fP, long \fId\fP);
+void
+libkeccak_spec_shake(libkeccak_spec_t *\fIspec\fP, long int \fIx\fP, long int \fId\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_spec_shake ()
-function sets \fI*spec\fP to specify the Keccak parameters
-used for SHAKE hashing with the semicapacity specified,
-in bits, via the \fIx\fP parameter, and the output size
-specified, in bits, via the \fId\fP parameter.
+function sets
+.I *spec
+to specify the Keccak parameters used for SHAKE hashing
+with the semicapacity specified, in bits, via the
+.I x
+parameter, and the output size specified, in bits, via the
+.I d
+parameter.
.SH RETURN VALUES
The
.BR libkeccak_spec_shake ()
@@ -26,8 +32,9 @@ The
.BR libkeccak_spec_shake ()
function cannot fail.
.SH EXAMPLE
-This examples configure a \fBlibkeccak_spec_t\fP to specify
-the Keccak parameters used for SHAKE256(, 512):
+This examples configure a
+.B libkeccak_spec_t
+to specify the Keccak parameters used for SHAKE256(, 512):
.LP
.nf
libkeccak_spec_t spec;
@@ -40,9 +47,6 @@ libkeccak_spec_shake(&spec, 256, 512);
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_squeeze.3 b/doc/man/libkeccak_squeeze.3
index cc5fcf7..eafbc65 100644
--- a/doc/man/libkeccak_squeeze.3
+++ b/doc/man/libkeccak_squeeze.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_FAST_SQUEEZE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_FAST_SQUEEZE 3 LIBKECCAK
.SH NAME
libkeccak_squeeze - Runs the squeeze phase
.SH SYNOPSIS
@@ -6,24 +6,30 @@ libkeccak_squeeze - Runs the squeeze phase
.nf
#include <libkeccak.h>
.P
-void libkeccak_squeeze(libkeccak_state_t *\fIstate\fP, char *\fIhashsum\fP);
+void
+libkeccak_squeeze(libkeccak_state_t *\fIstate\fP, char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_squeeze ()
function runs the Keccak squeeze phase, on the the hash
-process described by \fI*state\fP, on stores a new digest,
-in binary form, in \fIhashsum\fP.
+process described by
+.IR *state ,
+on stores a new digest, in binary form, in
+.IR hashsum .
.PP
-\fIhashsum\fP has the same requirement as for the
+.I hashsum
+has the same requirement as for the
.BR libkeccak_digest (3)
and
.BR libkeccak_fast_digest (3)
functions: it must have an allocation size of at least
-((\fIstate->n\fP + 7) / 8) bytes. However, it may not
-be \fINULL\fP.
+.RI (( Istate->n
++ 7) / 8) bytes. However, it may not be
+.IR NULL .
.SH RETURN VALUES
The
.BR libkeccak_squeeze ()
@@ -37,9 +43,6 @@ function cannot fail.
.BR libkeccak_fast_digest (3),
.BR libkeccak_simple_squeeze (3),
.BR libkeccak_fast_squeeze (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_copy.3 b/doc/man/libkeccak_state_copy.3
index c127062..c9283ca 100644
--- a/doc/man/libkeccak_state_copy.3
+++ b/doc/man/libkeccak_state_copy.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_COPY 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_COPY 3 LIBKECCAK
.SH NAME
libkeccak_state_copy - Copies hash state
.SH SYNOPSIS
@@ -6,23 +6,31 @@ libkeccak_state_copy - Copies hash state
.nf
#include <libkeccak.h>
.P
-int libkeccak_state_copy(libkeccak_state_t *\fIdest\fP, const libkeccak_state_t *\fIsrc\fP);
+int
+libkeccak_state_copy(libkeccak_state_t *\fIdest\fP,
+ const libkeccak_state_t *\fIsrc\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_copy ()
-function initialises \fI*dest\fP to be identical to \fI*src\fP.
-This includes all members of the \fBlibkeccak_state_t\fP
+function initialises
+.I *dest
+to be identical to
+.IR *src .
+This includes all members of the
+.B libkeccak_state_t
structure, including the state of the sponge and the
message chunk buffer.
.SH RETURN VALUES
The
.BR libkeccak_state_copy ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_state_copy ()
@@ -31,9 +39,6 @@ function may fail for any specified for the function
.SH SEE ALSO
.BR libkeccak_state_duplicate (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_create.3 b/doc/man/libkeccak_state_create.3
index f94ebe8..77880a3 100644
--- a/doc/man/libkeccak_state_create.3
+++ b/doc/man/libkeccak_state_create.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_CREATE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_CREATE 3 LIBKECCAK
.SH NAME
libkeccak_state_create - Allocate and initialise hash state
.SH SYNOPSIS
@@ -6,23 +6,31 @@ libkeccak_state_create - Allocate and initialise hash state
.nf
#include <libkeccak.h>
.P
-libkeccak_state_t *libkeccak_state_create(const libkeccak_spec_t *\fIspec\fP);
+libkeccak_state_t *
+libkeccak_state_create(const libkeccak_spec_t *\fIspec\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_create ()
-function allocates a new \fIlibkeccak_state_t*\fP with one
-initialised element, and sets the algorithm tuning parameters
-to those specified by \fI*spec\fP.
+function allocates a new
+.I libkeccak_state_t*
+with one initialised element, and sets the algorithm
+tuning parameters to those specified by
+.IR *spec .
.SH RETURN VALUES
The
.BR libkeccak_state_create ()
-function returns a newly allocated \fIlibkeccak_state_t*\fP
+function returns a newly allocated
+.I libkeccak_state_t*
(of one initialised element) upon successful completion.
-On error, \fINULL\fP is returned and \fIerrno\fP is set to
-describe the error.
+On error,
+.I NULL
+is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_state_create ()
@@ -33,9 +41,6 @@ function may fail for any specified for the function
.BR libkeccak_state_free (3),
.BR libkeccak_state_fast_free (3)
.BR libkeccak_state_duplicate (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_destroy.3 b/doc/man/libkeccak_state_destroy.3
index 781d835..0a78215 100644
--- a/doc/man/libkeccak_state_destroy.3
+++ b/doc/man/libkeccak_state_destroy.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_DESTROY 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_DESTROY 3 LIBKECCAK
.SH NAME
libkeccak_state_destroy - Destroys a hash state with erasure
.SH SYNOPSIS
@@ -6,15 +6,20 @@ libkeccak_state_destroy - Destroys a hash state with erasure
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_destroy(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_destroy(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_destroy ()
-function releases the allocations stored in \fI*state\fP,
-without releasing the allocation of \fIstate\fP itself.
+function releases the allocations stored in
+.IR *state ,
+without releasing the allocation of
+.I state
+itself.
.PP
The
.BR libkeccak_state_destroy ()
@@ -33,9 +38,6 @@ function cannot fail.
.BR libkeccak_state_initialise (3),
.BR libkeccak_state_reset (3),
.BR libkeccak_state_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_duplicate.3 b/doc/man/libkeccak_state_duplicate.3
index c579adc..54c9be3 100644
--- a/doc/man/libkeccak_state_duplicate.3
+++ b/doc/man/libkeccak_state_duplicate.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_DUPLICATE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_DUPLICATE 3 LIBKECCAK
.SH NAME
libkeccak_state_duplicate - Allocate a duplicate hash state
.SH SYNOPSIS
@@ -6,24 +6,33 @@ libkeccak_state_duplicate - Allocate a duplicate hash state
.nf
#include <libkeccak.h>
.P
-libkeccak_state_t *libkeccak_state_duplicate(const libkeccak_state_t *\fIsrc\fP);
+libkeccak_state_t *
+libkeccak_state_duplicate(const libkeccak_state_t *\fIsrc\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak P.
.SH DESCRIPTION
The
.BR libkeccak_state_duplicate ()
-function allocates a new hash state and initialises it to be identical
-to \fI*src\fP. This includes all members of the \fBlibkeccak_state_t\fP
-structure, including the state of the sponge and the message
-chunk buffer.
+function allocates a new hash state and initialises it
+to be identical to
+.IR *src .
+This includes all members of the
+.B libkeccak_state_t
+structure, including the state of the sponge and the
+message chunk buffer.
.SH RETURN VALUES
The
.BR libkeccak_state_duplicate ()
-function returns a newly allocated \fIlibkeccak_state_t*\fP
+function returns a newly allocated
+.I libkeccak_state_t*
(of one initialised element) upon successful completion.
-On error, \fINULL\fP is returned and \fIerrno\fP is set to
-describe the error.
+On error,
+.I NULL
+is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_state_duplicate ()
@@ -32,9 +41,6 @@ function may fail for any specified for the function
.SH SEE ALSO
.BR libkeccak_state_copy (3),
.BR libkeccak_state_create (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_fast_destroy.3 b/doc/man/libkeccak_state_fast_destroy.3
index 07e06ed..e04ca86 100644
--- a/doc/man/libkeccak_state_fast_destroy.3
+++ b/doc/man/libkeccak_state_fast_destroy.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_FAST_DESTROY 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_FAST_DESTROY 3 LIBKECCAK
.SH NAME
libkeccak_state_fast_destroy - Destroys a hash state without erasure
.SH SYNOPSIS
@@ -6,15 +6,20 @@ libkeccak_state_fast_destroy - Destroys a hash state without erasure
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_fast_destroy(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_fast_destroy(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_fast_destroy ()
-function releases the allocations stored in \fI*state\fP,
-without releasing the allocation of \fIstate\fP itself.
+function releases the allocations stored in
+.IR *state ,
+without releasing the allocation of
+.I state
+itself.
.PP
The
.BR libkeccak_state_fast_destroy ()
@@ -33,9 +38,6 @@ function cannot fail.
.BR libkeccak_state_initialise (3),
.BR libkeccak_state_reset (3),
.BR libkeccak_state_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_fast_free.3 b/doc/man/libkeccak_state_fast_free.3
index 981a898..e617e21 100644
--- a/doc/man/libkeccak_state_fast_free.3
+++ b/doc/man/libkeccak_state_fast_free.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_FAST_FREE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_FAST_FREE 3 LIBKECCAK
.SH NAME
libkeccak_state_fast_free - Destroys and deallocates a hash state without erasure
.SH SYNOPSIS
@@ -6,15 +6,19 @@ libkeccak_state_fast_free - Destroys and deallocates a hash state without erasur
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_fast_free(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_fast_free(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_fast_free ()
-function releases the allocations stored in \fI*state\fP,
-and also released the allocation of \fIstate\fP.
+function releases the allocations stored in
+.IR *state ,
+and also released the allocation of
+.IR state .
.PP
The
.BR libkeccak_state_fast_free ()
@@ -42,9 +46,6 @@ to be freed, resulting in undefined behaviour.
.BR libkeccak_state_initialise (3),
.BR libkeccak_state_reset (3),
.BR libkeccak_state_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_free.3 b/doc/man/libkeccak_state_free.3
index f96c547..e6dd3f8 100644
--- a/doc/man/libkeccak_state_free.3
+++ b/doc/man/libkeccak_state_free.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_FREE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_FREE 3 LIBKECCAK
.SH NAME
libkeccak_state_free - Destroys and deallocates a hash state with erasure
.SH SYNOPSIS
@@ -6,15 +6,19 @@ libkeccak_state_free - Destroys and deallocates a hash state with erasure
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_free(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_free(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_free ()
-function releases the allocations stored in \fI*state\fP,
-and also release the allocation of \fIstate\fP.
+function releases the allocations stored in
+.IR *state ,
+and also release the allocation of
+.IR state .
.PP
The
.BR libkeccak_state_free ()
@@ -42,9 +46,6 @@ to be freed, resulting in undefined behaviour.
.BR libkeccak_state_initialise (3),
.BR libkeccak_state_reset (3),
.BR libkeccak_state_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_initialise.3 b/doc/man/libkeccak_state_initialise.3
index bb0f90a..2620686 100644
--- a/doc/man/libkeccak_state_initialise.3
+++ b/doc/man/libkeccak_state_initialise.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_INITIALISE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_INITIALISE 3 LIBKECCAK
.SH NAME
libkeccak_state_initialise - Initialise hash state
.SH SYNOPSIS
@@ -6,22 +6,28 @@ libkeccak_state_initialise - Initialise hash state
.nf
#include <libkeccak.h>
.P
-int libkeccak_state_initialise(libkeccak_state_t *\fIstate\fP,
- const libkeccak_spec_t *\fIspec\fP);
+int
+libkeccak_state_initialise(libkeccak_state_t *\fIstate\fP,
+ const libkeccak_spec_t *\fIspec\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_initialise ()
-function initialises \fI*state\fP and sets the algorithm
-tuning parameters to those specified by \fI*spec\fP.
+function initialises
+.I *state
+and sets the algorithm tuning parameters to those
+specified by
+.IR *spec .
.SH RETURN VALUES
The
.BR libkeccak_state_initialise ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_state_initialise ()
@@ -49,9 +55,6 @@ function may fail for any specified for the function
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_marshal_size (3),
.BR libkeccak_hmac_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_marshal.3 b/doc/man/libkeccak_state_marshal.3
index d0f1780..f5d5e05 100644
--- a/doc/man/libkeccak_state_marshal.3
+++ b/doc/man/libkeccak_state_marshal.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_MARSHAL 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_MARSHAL 3 LIBKECCAK
.SH NAME
libkeccak_state_marshal - Marshals a hash state
.SH SYNOPSIS
@@ -6,24 +6,28 @@ libkeccak_state_marshal - Marshals a hash state
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_state_marshal(const libkeccak_state_t *\fIstate\fP, char *\fIdata\fP);
+size_t
+libkeccak_state_marshal(const libkeccak_state_t *\fIstate\fP, char *\fIdata\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_marshal ()
-function marshals \fI*state\fP into the beginning
-of \fIdata\fP.
+function marshals \fI*state\fP into the beginning of
+.IR data .
.PP
Use the
.BR libkeccak_state_marshal_size (3)
function to get minimum usable allocation size
-for \fIdata\fP.
+for
+.IR data .
.SH RETURN VALUES
The
.BR libkeccak_state_marshal ()
-returns the number of bytes written to \fIdata\fP.
+returns the number of bytes written to
+.IR data .
.SH ERRORS
The
.BR libkeccak_state_marshal ()
@@ -32,9 +36,6 @@ function cannot fail.
.BR libkeccak_state_marshal_size (3),
.BR libkeccak_state_unmarshal (3),
.BR libkeccak_state_unmarshal_skip (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_marshal_size.3 b/doc/man/libkeccak_state_marshal_size.3
index a3123b8..8ebb16a 100644
--- a/doc/man/libkeccak_state_marshal_size.3
+++ b/doc/man/libkeccak_state_marshal_size.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_MARSHAL_SIZE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_MARSHAL_SIZE 3 LIBKECCAK
.SH NAME
libkeccak_state_marshal_size - Calculates the marshal-size of a hash state
.SH SYNOPSIS
@@ -6,15 +6,18 @@ libkeccak_state_marshal_size - Calculates the marshal-size of a hash state
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_state_marshal_size(const libkeccak_state_t *\fIstate\fP);
+size_t
+libkeccak_state_marshal_size(const libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_marshal_size ()
function calculates the number of bytes required
-to marshal \fI*state\fP.
+to marshal
+.IR *state .
.SH RETURN VALUES
The
.BR libkeccak_state_marshal_size ()
@@ -28,9 +31,6 @@ function cannot fail.
.BR libkeccak_state_marshal (3),
.BR libkeccak_state_unmarshal (3),
.BR libkeccak_state_unmarshal_skip (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_reset.3 b/doc/man/libkeccak_state_reset.3
index d2c3061..60bb778 100644
--- a/doc/man/libkeccak_state_reset.3
+++ b/doc/man/libkeccak_state_reset.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_RESET 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_RESET 3 LIBKECCAK
.SH NAME
libkeccak_state_reset - Reinitialise hash state
.SH SYNOPSIS
@@ -6,14 +6,18 @@ libkeccak_state_reset - Reinitialise hash state
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_reset(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_reset(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_reset ()
-function reinitialises \fI*state\fP, but keeps the
+function reinitialises
+.IR *state ,
+but keeps the
tuning, so it can be used to hash another message.
.SH RETURN VALUES
The
@@ -28,9 +32,6 @@ function cannot fail.
.BR libkeccak_state_destroy (3),
.BR libkeccak_state_fast_destroy (3),
.BR libkeccak_state_wipe (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_unmarshal.3 b/doc/man/libkeccak_state_unmarshal.3
index 8373f0c..5a9e59b 100644
--- a/doc/man/libkeccak_state_unmarshal.3
+++ b/doc/man/libkeccak_state_unmarshal.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_UNMARSHAL 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_UNMARSHAL 3 LIBKECCAK
.SH NAME
libkeccak_state_unmarshal - Unharshals a hash state
.SH SYNOPSIS
@@ -6,19 +6,25 @@ libkeccak_state_unmarshal - Unharshals a hash state
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_state_unmarshal(libkeccak_state_t *\fIstate\fP, const char *\fIdata\fP);
+size_t
+libkeccak_state_unmarshal(libkeccak_state_t *\fIstate\fP, const char *\fIdata\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_unmarshal ()
function unmarshals a hash state from the beginning
-of \fIdata\fP. and stores it in \fI*state\fP.
+of
+.IR data .
+and stores it in
+.IR *state .
.SH RETURN VALUES
The
.BR libkeccak_state_unmarshal ()
-returns the number of bytes reads from \fIdata\fP.
+returns the number of bytes reads from
+.IR data .
.SH ERRORS
The
.BR libkeccak_state_unmarshal ()
@@ -28,9 +34,6 @@ function may fail for any specified for the function
.BR libkeccak_state_marshal_size (3),
.BR libkeccak_state_marshal (3),
.BR libkeccak_state_unmarshal_skip (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_unmarshal_skip.3 b/doc/man/libkeccak_state_unmarshal_skip.3
index d939285..b87386c 100644
--- a/doc/man/libkeccak_state_unmarshal_skip.3
+++ b/doc/man/libkeccak_state_unmarshal_skip.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_UNMARSHAL_SKIP 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_UNMARSHAL_SKIP 3 LIBKECCAK
.SH NAME
libkeccak_state_unmarshal_skip - Calculates the marshal-size of a marshalled hash state
.SH SYNOPSIS
@@ -6,15 +6,18 @@ libkeccak_state_unmarshal_skip - Calculates the marshal-size of a marshalled has
.nf
#include <libkeccak.h>
.P
-size_t libkeccak_state_unmarshal_skip(const char *\fIdata\fP);
+size_t
+libkeccak_state_unmarshal_skip(const char *\fIdata\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_unmarshal_skip ()
function gets the number of bytes with which
-the hash state in the beginning of \fIdata\fP
+the hash state in the beginning of
+.I data
is store stored. This is useful if you do not
want to unmarshal the state.
.SH RETURN VALUES
@@ -32,9 +35,6 @@ function cannot fail.
.BR libkeccak_state_marshal_size (3),
.BR libkeccak_state_marshal (3),
.BR libkeccak_state_unmarshal (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_wipe.3 b/doc/man/libkeccak_state_wipe.3
index 8d7309f..664cd51 100644
--- a/doc/man/libkeccak_state_wipe.3
+++ b/doc/man/libkeccak_state_wipe.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_WIPE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_WIPE 3 LIBKECCAK
.SH NAME
libkeccak_state_wipe - Securely erase sensitive data
.SH SYNOPSIS
@@ -6,10 +6,12 @@ libkeccak_state_wipe - Securely erase sensitive data
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_wipe(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_wipe(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_wipe ()
@@ -30,9 +32,6 @@ function cannot fail.
.BR libkeccak_state_fast_destroy (3),
.BR libkeccak_state_destroy (3),
.BR libkeccak_state_reset (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_wipe_message.3 b/doc/man/libkeccak_state_wipe_message.3
index 7be344f..c734560 100644
--- a/doc/man/libkeccak_state_wipe_message.3
+++ b/doc/man/libkeccak_state_wipe_message.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_WIPE_MESSAGE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_WIPE_MESSAGE 3 LIBKECCAK
.SH NAME
libkeccak_state_wipe_message - Securely erase the message chunk buffer
.SH SYNOPSIS
@@ -6,10 +6,12 @@ libkeccak_state_wipe_message - Securely erase the message chunk buffer
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_wipe_message(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_wipe_message(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_wipe_message ()
@@ -28,9 +30,6 @@ function cannot fail.
.BR libkeccak_state_fast_destroy (3),
.BR libkeccak_state_destroy (3),
.BR libkeccak_state_reset (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_state_wipe_sponge.3 b/doc/man/libkeccak_state_wipe_sponge.3
index 618187d..4651fc0 100644
--- a/doc/man/libkeccak_state_wipe_sponge.3
+++ b/doc/man/libkeccak_state_wipe_sponge.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_STATE_WIPE_SPONGE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_STATE_WIPE_SPONGE 3 LIBKECCAK
.SH NAME
libkeccak_state_wipe_sponge - Securely erase the Keccak sponge state
.SH SYNOPSIS
@@ -6,10 +6,12 @@ libkeccak_state_wipe_sponge - Securely erase the Keccak sponge state
.nf
#include <libkeccak.h>
.P
-void libkeccak_state_wipe_sponge(libkeccak_state_t *\fIstate\fP);
+void
+libkeccak_state_wipe_sponge(libkeccak_state_t *\fIstate\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_state_wipe_sponge ()
@@ -28,9 +30,6 @@ function cannot fail.
.BR libkeccak_state_fast_destroy (3),
.BR libkeccak_state_destroy (3),
.BR libkeccak_state_reset (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_unhex.3 b/doc/man/libkeccak_unhex.3
index 33e091a..93cde63 100644
--- a/doc/man/libkeccak_unhex.3
+++ b/doc/man/libkeccak_unhex.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_UNHEX 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_UNHEX 3 LIBKECCAK
.SH NAME
libkeccak_unhex - Converts a hexadecimal hashsum to binary
.SH SYNOPSIS
@@ -6,26 +6,33 @@ libkeccak_unhex - Converts a hexadecimal hashsum to binary
.nf
#include <libkeccak.h>
.P
-void libkeccak_unhex(char *restrict \fIoutput\fP,
- const char *restrict \fIhashsum\fP);
+void
+libkeccak_unhex(char *restrict \fIoutput\fP, const char *restrict \fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_unhex ()
function
-converts a hexadecimal hashsum, stored in \fIhashsum\fP,
+converts a hexadecimal hashsum, stored in
+.IR hashsum ,
to binary, and stores the binary representation in
-\fIoutput\fP.
+.IR output .
.PP
-\fIhashsum\fP must be terminated by a NUL-character.
-It may be in either lowercase or uppercase, or a mixture
-thereof. \fIoutput\fP will not be terminated.
+.I hashsum
+must be terminated by a NUL-character. It may be
+in either lowercase or uppercase, or a mixture
+thereof.
+.I output
+will not be terminated.
.PP
-(\fBstrlen\fP(\fIhashsum\fP) / 2) bytes will be written to
-the beginning of \fIoutput\fP. It should therefore have
-an allocation of at least that number of bytes.
+(\fBstrlen\fP(\fIhashsum\fP) / 2) bytes will be
+written to the beginning of
+.IR Ioutput .
+It should therefore have an allocation of at least
+that number of bytes.
.SH RETURN VALUES
The
.BR libkeccak_unhex ()
@@ -35,14 +42,12 @@ The
.BR libkeccak_unhex ()
function cannot fail.
.SH NOTES
-\fIhashsum\fP must have an even number of digits
+.I hashsum
+must have an even number of digits
(characters excluding the terminating NUL-character.)
.SH SEE ALSO
.BR libkeccak_behex_lower (3),
.BR libkeccak_behex_upper (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se
diff --git a/doc/man/libkeccak_update.3 b/doc/man/libkeccak_update.3
index 2c68c73..c291ed9 100644
--- a/doc/man/libkeccak_update.3
+++ b/doc/man/libkeccak_update.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_UPDATE 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_UPDATE 3 LIBKECCAK
.SH NAME
libkeccak_update - Partially hash a message with erasure
.SH SYNOPSIS
@@ -6,17 +6,23 @@ libkeccak_update - Partially hash a message with erasure
.nf
#include <libkeccak.h>
.P
-int libkeccak_update(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP, size_t \fImsglen\fP);
+int
+libkeccak_update(libkeccak_state_t *\fIstate\fP, const char *\fImsg\fP,
+ size_t \fImsglen\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_update ()
function continues (or starts) hashing a message.
-The current state of the hashing is stored in \fI*state\fP,
-and will be updated. The message specified by the \fImsg\fP
-parameter with the byte-size specified by the \fImsglen\fP
+The current state of the hashing is stored in
+.IR *state ,
+and will be updated. The message specified by the
+.I msg
+parameter with the byte-size specified by the
+.I msglen
parameter, will be hashed.
.PP
The
@@ -28,14 +34,18 @@ rather than as fast as possible.
The
.BR libkeccak_update ()
function returns 0 upon successful completion. On error,
--1 is returned and \fIerrno\fP is set to describe the error.
+-1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_update ()
function may fail for any reason specified by the function
.BR malloc (3).
.SH NOTES
-Neither parameter by be \fINULL\fP or 0.
+Neither parameter by be
+.O NULL
+or 0.
.SH EXAMPLE
This example calculates the Keccak[b = 1024, c = 576, n = 256]
hash of the input from stdin, and prints the hash, in hexadecimal
@@ -80,9 +90,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_fast_update (3),
.BR libkeccak_fast_digest (3),
.BR libkeccak_digest (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se