SHA-3 hash
Loading...
Searching...
No Matches
constant.hh
Go to the documentation of this file.
1
8#ifndef CONSTANTS_SHA_3_HPP
9#define CONSTANTS_SHA_3_HPP
10
11#include <cstdint>
12
16alignas(32) constexpr uint64_t rc[] = {
17 0x0000000000000001, 0x0000000000008082, 0x800000000000808A, 0x8000000080008000, 0x000000000000808B,
18 0x0000000080000001, 0x8000000080008081, 0x8000000000008009, 0x000000000000008A, 0x0000000000000088,
19 0x0000000080008009, 0x000000008000000A, 0x000000008000808B, 0x800000000000008B, 0x8000000000008089,
20 0x8000000000008003, 0x8000000000008002, 0x8000000000000080, 0x000000000000800A, 0x800000008000000A,
21 0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008,
22};
23
27alignas(32) constexpr uint8_t rot[] = {0, 1, 62, 28, 27, 36, 44, 6, 55, 20, 3, 10, 43,
28 25, 39, 41, 45, 15, 21, 8, 18, 2, 61, 56, 14};
29
33alignas(32) constexpr uint8_t pi[] = {0, 6, 12, 18, 24, 3, 9, 10, 16, 22, 1, 7, 13, 19, 20, 4, 5, 11, 17, 23, 2, 8, 14, 15, 21};
34
35constexpr uint64_t nr = 24;
36constexpr uint64_t b = 1600;
37
38#endif // CONSTANTS_SHA_3_HPP
constexpr uint8_t pi[]
pi substitution array
Definition constant.hh:33
constexpr uint64_t rc[]
round constants
Definition constant.hh:16
constexpr uint8_t rot[]
rotate (permutation) array
Definition constant.hh:27
constexpr uint64_t nr
number of transform rounds (= 24 from standard)
Definition constant.hh:35
constexpr uint64_t b
internal register (state) bitwidth
Definition constant.hh:36