#include <sstream>
#include <iomanip>
#include <string.h>
Go to the source code of this file.
Namespaces | |
icl_core | |
icl_core::crypt | |
Contains cryptographic functions. | |
Macros | |
#define | bswaparr(buf, T, i) |
#define | bswaparr64(buf, T, i) |
#define | Ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) |
FIPS PUB 180-3 "Ch" operation. More... | |
#define | CLASSM Sha2Impl<T, t_h0, t_h1, t_h2, t_h3, t_h4, t_h5, t_h6, t_h7, t_len> |
#define | CLASSM Sha2Impl<uint64_t, t_h0, t_h1, t_h2, t_h3, t_h4, t_h5, t_h6, t_h7, t_len> |
#define | Maj(x, y, z) (((x) & (y)) | ((z) & ((x) ^ (y)))) |
FIPS PUB 180-3 "Maj" operation. More... | |
#define | Rotr(x, n, nbits) (((x) >> (n)) | ((x) << ((nbits)-(n)))) |
Right rotation. More... | |
#define | round_0_15(a, b, c, d, e, f, g, h, K, W, t) |
#define | round_0_15(a, b, c, d, e, f, g, h, K, W, t) |
#define | round_16_63(a, b, c, d, e, f, g, h, K, W, t) |
#define | round_16_79(a, b, c, d, e, f, g, h, K, W, t) |
#define | Shr(x, n) ((x) >> (n)) |
Right shift. More... | |
#define | Sigma0_256(x) (Rotr((x), 2, 32) ^ Rotr((x), 13, 32) ^ Rotr((x), 22, 32)) |
#define | sigma0_256(x) (Rotr((x), 7, 32) ^ Rotr((x), 18, 32) ^ Shr((x), 3)) |
#define | Sigma0_512(x) (Rotr((x), 28, 64) ^ Rotr((x), 34, 64) ^ Rotr((x), 39, 64)) |
#define | sigma0_512(x) (Rotr((x), 1, 64) ^ Rotr((x), 8, 64) ^ Shr((x), 7)) |
#define | Sigma1_256(x) (Rotr((x), 6, 32) ^ Rotr((x), 11, 32) ^ Rotr((x), 25, 32)) |
#define | sigma1_256(x) (Rotr((x), 17, 32) ^ Rotr((x), 19, 32) ^ Shr((x), 10)) |
#define | Sigma1_512(x) (Rotr((x), 14, 64) ^ Rotr((x), 18, 64) ^ Rotr((x), 41, 64)) |
#define | sigma1_512(x) (Rotr((x), 19, 64) ^ Rotr((x), 61, 64) ^ Shr((x), 6)) |
#define | TEMPLATEM template <typename T, T t_h0, T t_h1, T t_h2, T t_h3, T t_h4, T t_h5, T t_h6, T t_h7, size_t t_len> |
#define | TEMPLATEM template <uint64_t t_h0, uint64_t t_h1, uint64_t t_h2, uint64_t t_h3, uint64_t t_h4, uint64_t t_h5, uint64_t t_h6, uint64_t t_h7, size_t t_len> |
#define | wv(i) v##i |
Flexible variable mapping to avoid unnecessary copying. More... | |
Variables | |
static const uint32_t | icl_core::crypt::k256 [64] |
static const uint64_t | icl_core::crypt::k512 [80] |
Definition in file Sha2Impl.hpp.
#define bswaparr | ( | buf, | |
T, | |||
i | |||
) |
Definition at line 68 of file Sha2Impl.hpp.
#define bswaparr64 | ( | buf, | |
T, | |||
i | |||
) |
Definition at line 73 of file Sha2Impl.hpp.
#define Ch | ( | x, | |
y, | |||
z | |||
) | ((z) ^ ((x) & ((y) ^ (z)))) |
FIPS PUB 180-3 "Ch" operation.
Definition at line 83 of file Sha2Impl.hpp.
#define CLASSM Sha2Impl<T, t_h0, t_h1, t_h2, t_h3, t_h4, t_h5, t_h6, t_h7, t_len> |
Definition at line 266 of file Sha2Impl.hpp.
#define CLASSM Sha2Impl<uint64_t, t_h0, t_h1, t_h2, t_h3, t_h4, t_h5, t_h6, t_h7, t_len> |
Definition at line 266 of file Sha2Impl.hpp.
#define Maj | ( | x, | |
y, | |||
z | |||
) | (((x) & (y)) | ((z) & ((x) ^ (y)))) |
FIPS PUB 180-3 "Maj" operation.
Definition at line 85 of file Sha2Impl.hpp.
#define Rotr | ( | x, | |
n, | |||
nbits | |||
) | (((x) >> (n)) | ((x) << ((nbits)-(n)))) |
Right rotation.
Definition at line 87 of file Sha2Impl.hpp.
#define round_0_15 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
K, | |||
W, | |||
t | |||
) |
Definition at line 305 of file Sha2Impl.hpp.
#define round_0_15 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
K, | |||
W, | |||
t | |||
) |
Definition at line 305 of file Sha2Impl.hpp.
#define round_16_63 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
K, | |||
W, | |||
t | |||
) |
Definition at line 119 of file Sha2Impl.hpp.
#define round_16_79 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
K, | |||
W, | |||
t | |||
) |
Definition at line 311 of file Sha2Impl.hpp.
#define Shr | ( | x, | |
n | |||
) | ((x) >> (n)) |
Right shift.
Definition at line 89 of file Sha2Impl.hpp.
Definition at line 93 of file Sha2Impl.hpp.
Definition at line 95 of file Sha2Impl.hpp.
Definition at line 268 of file Sha2Impl.hpp.
Definition at line 270 of file Sha2Impl.hpp.
Definition at line 94 of file Sha2Impl.hpp.
Definition at line 96 of file Sha2Impl.hpp.
Definition at line 269 of file Sha2Impl.hpp.
Definition at line 271 of file Sha2Impl.hpp.
#define TEMPLATEM template <typename T, T t_h0, T t_h1, T t_h2, T t_h3, T t_h4, T t_h5, T t_h6, T t_h7, size_t t_len> |
Definition at line 265 of file Sha2Impl.hpp.
#define TEMPLATEM template <uint64_t t_h0, uint64_t t_h1, uint64_t t_h2, uint64_t t_h3, uint64_t t_h4, uint64_t t_h5, uint64_t t_h6, uint64_t t_h7, size_t t_len> |
Definition at line 265 of file Sha2Impl.hpp.
#define wv | ( | i | ) | v##i |
Flexible variable mapping to avoid unnecessary copying.
Definition at line 91 of file Sha2Impl.hpp.