#include <string.h>
#include "config.h"
#include "attributes.h"
#include "bswap.h"
#include "error.h"
#include "sha512.h"
#include "intreadwrite.h"
#include "mem.h"
Go to the source code of this file.
|
| #define | ror(value, bits) |
| |
| #define | Ch(x, y, z) |
| |
| #define | Maj(z, y, x) |
| |
| #define | Sigma0_512(x) |
| |
| #define | Sigma1_512(x) |
| |
| #define | sigma0_512(x) |
| |
| #define | sigma1_512(x) |
| |
| #define | blk0(i) |
| |
| #define | blk(i) |
| |
| #define | ROUND512(a, b, c, d, e, f, g, h) |
| |
| #define | ROUND512_0_TO_15(a, b, c, d, e, f, g, h) |
| |
| #define | ROUND512_16_TO_80(a, b, c, d, e, f, g, h) |
| |
| #define | R512_0 |
| |
| #define | R512_16 |
| |
◆ ror
Value:
static const uint8_t bits[8]
Definition at line 92 of file sha512.c.
◆ Ch
◆ Maj
◆ Sigma0_512
◆ Sigma1_512
◆ sigma0_512
Value:(
ror((x), 1) ^
ror((x), 8) ^ ((x) >> 7))
Definition at line 99 of file sha512.c.
◆ sigma1_512
Value:(
ror((x), 19) ^
ror((x), 61) ^ ((x) >> 6))
Definition at line 100 of file sha512.c.
◆ blk0
◆ blk
◆ ROUND512
| #define ROUND512 |
( |
| a, |
|
|
| b, |
|
|
| c, |
|
|
| d, |
|
|
| e, |
|
|
| f, |
|
|
| g, |
|
|
| h ) |
Value:
(d) += T1; \
static const uint64_t K512[80]
Definition at line 106 of file sha512.c.
◆ ROUND512_0_TO_15
| #define ROUND512_0_TO_15 |
( |
| a, |
|
|
| b, |
|
|
| c, |
|
|
| d, |
|
|
| e, |
|
|
| f, |
|
|
| g, |
|
|
| h ) |
◆ ROUND512_16_TO_80
| #define ROUND512_16_TO_80 |
( |
| a, |
|
|
| b, |
|
|
| c, |
|
|
| d, |
|
|
| e, |
|
|
| f, |
|
|
| g, |
|
|
| h ) |
◆ R512_0
Value:
ROUND512_0_TO_15(
h,
a,
b,
c, d, e,
f,
g); \
ROUND512_0_TO_15(
g,
h,
a,
b,
c, d, e,
f); \
ROUND512_0_TO_15(
f,
g,
h,
a,
b,
c, d, e); \
ROUND512_0_TO_15(e,
f,
g,
h,
a,
b,
c, d); \
ROUND512_0_TO_15(d, e,
f,
g,
h,
a,
b,
c); \
ROUND512_0_TO_15(
c, d, e,
f,
g,
h,
a,
b); \
ROUND512_0_TO_15(
b,
c, d, e,
f,
g,
h,
a)
#define ROUND512_0_TO_15(a, b, c, d, e, f, g, h)
Referenced by sha512_transform().
◆ R512_16
Value:
ROUND512_16_TO_80(
h,
a,
b,
c, d, e,
f,
g); \
ROUND512_16_TO_80(
g,
h,
a,
b,
c, d, e,
f); \
ROUND512_16_TO_80(
f,
g,
h,
a,
b,
c, d, e); \
ROUND512_16_TO_80(e,
f,
g,
h,
a,
b,
c, d); \
ROUND512_16_TO_80(d, e,
f,
g,
h,
a,
b,
c); \
ROUND512_16_TO_80(
c, d, e,
f,
g,
h,
a,
b); \
ROUND512_16_TO_80(
b,
c, d, e,
f,
g,
h,
a)
#define ROUND512_16_TO_80(a, b, c, d, e, f, g, h)
Referenced by sha512_transform().
◆ sha512_transform()
| static void sha512_transform |
( |
uint64_t * | state, |
|
|
const uint8_t | buffer[128] ) |
|
static |
◆ K512