aboutsummaryrefslogtreecommitdiffstats
path: root/man3/libkeccak_spec_check.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-11 16:22:00 +0100
committerMattias Andrée <maandree@kth.se>2019-02-11 16:22:00 +0100
commit5ff4c5af715d098852d124de116d354ee10f4ea4 (patch)
tree5789ad5798f2dbf21d9406a2942e48b222f773ae /man3/libkeccak_spec_check.3
parentRemove old file (diff)
downloadlibkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.gz
libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.bz2
libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.xz
Split most .c files into one per function and flatten file hierarchy
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'man3/libkeccak_spec_check.3')
-rw-r--r--man3/libkeccak_spec_check.390
1 files changed, 0 insertions, 90 deletions
diff --git a/man3/libkeccak_spec_check.3 b/man3/libkeccak_spec_check.3
deleted file mode 100644
index 7dd19d8..0000000
--- a/man3/libkeccak_spec_check.3
+++ /dev/null
@@ -1,90 +0,0 @@
-.TH LIBKECCAK_SPEC_CHECK 3 LIBKECCAK
-.SH NAME
-libkeccak_spec_check - Validate hashing parameters
-.SH SYNOPSIS
-.nf
-#include <libkeccak.h>
-
-int libkeccak_spec_check(const libkeccak_spec_t *\fIspec\fP);
-.fi
-.PP
-Link with
-.IR -lkeccak .
-.SH DESCRIPTION
-The
-.BR libkeccak_spec_check ()
-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),
-.BR libkeccak_spec_rawshake (3),
-.BR libkeccak_spec_shake (3),
-or, especially, after settings the parameters
-manually for Keccak hashing.
-.PP
-.nf
-typedef struct libkeccak_spec {
- 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
-The
-.BR libkeccak_spec_check ()
-function returns 0 if the settings are usable. Otherwise
-it will return one of the following constants.
-.PP
-.TP
-.B LIBKECCAK_SPEC_ERROR_BITRATE_NONPOSITIVE
-The specified bitrate was non-positive.
-.TP
-.B LIBKECCAK_SPEC_ERROR_BITRATE_MOD_8
-The specified bitrate was not equivalent to 0
-modulus 8, that is, it was not in whole bytes.
-.TP
-.B LIBKECCAK_SPEC_ERROR_CAPACITY_NONPOSITIVE
-The specified capacity was non-positive.
-.TP
-.B LIBKECCAK_SPEC_ERROR_CAPACITY_MOD_8
-The specified capacity was not equivalent to 0
-modulus 8, that is, it was not in whole bytes.
-.TP
-.B LIBKECCAK_SPEC_ERROR_OUTPUT_NONPOSITIVE
-The specified output size was non-positive.
-.TP
-.B LIBKECCAK_SPEC_ERROR_STATE_TOO_LARGE
-The state size, that is the sum of the bitrate
-and the capacity, exceeded the supported limit
-(currently at 1600 bits.)
-.TP
-.B LIBKECCAK_SPEC_ERROR_STATE_MOD_25
-The state size, that is the sum of the bitrate
-and the capacity, in bits, was not equivalent
-to 0 modulus 25. Meaning the state size cannot
-cover all lanes equivalently.
-.TP
-.B LIBKECCAK_SPEC_ERROR_WORD_NON_2_POTENT
-The word size, that is the state size divided
-by 25, is not a power of 2.
-.TP
-.B LIBKECCAK_SPEC_ERROR_WORD_MOD_8
-The word size, that is the state size divided
-by 25, is not quivalent to 0 modulus 8, that
-is, it is not in whole bytes.
-.PP
-Note that there may be more than one error. Only the first
-detected is returned.
-.SH ERRORS
-The
-.BR libkeccak_spec_check ()
-function cannot fail.
-.fi
-.SH SEE ALSO
-.BR libkeccak_spec_sha3 (3),
-.BR libkeccak_spec_rawshake (3),
-.BR libkeccak_spec_shake (3),
-.BR libkeccak_generalised_spec_initialise (3),
-.BR libkeccak_state_initialise (3),
-.BR libkeccak_hmac_initialise (3)