Monero
Loading...
Searching...
No Matches
sha512-blocks.c File Reference

Macros

#define SHR(x, c)
#define ROTR(x, c)
#define Ch(x, y, z)
#define Maj(x, y, z)
#define Sigma0(x)
#define Sigma1(x)
#define sigma0(x)
#define sigma1(x)
#define M(w0, w14, w9, w1)
#define EXPAND
#define F(w, k)

Typedefs

typedef unsigned long long uint64

Functions

static uint64 load_bigendian (const unsigned char *x)
static void store_bigendian (unsigned char *x, uint64 u)
int crypto_hashblocks (unsigned char *statebytes, const unsigned char *in, unsigned long long inlen)

Macro Definition Documentation

◆ Ch

#define Ch ( x,
y,
z )
Value:
((x & y) ^ (~x & z))

◆ EXPAND

#define EXPAND
Value:
M(w0 ,w14,w9 ,w1 ) \
M(w1 ,w15,w10,w2 ) \
M(w2 ,w0 ,w11,w3 ) \
M(w3 ,w1 ,w12,w4 ) \
M(w4 ,w2 ,w13,w5 ) \
M(w5 ,w3 ,w14,w6 ) \
M(w6 ,w4 ,w15,w7 ) \
M(w7 ,w5 ,w0 ,w8 ) \
M(w8 ,w6 ,w1 ,w9 ) \
M(w9 ,w7 ,w2 ,w10) \
M(w10,w8 ,w3 ,w11) \
M(w11,w9 ,w4 ,w12) \
M(w12,w10,w5 ,w13) \
M(w13,w11,w6 ,w14) \
M(w14,w12,w7 ,w15) \
M(w15,w13,w8 ,w0 )
#define w1(p)
Definition aesb.c:107
#define w0(p)
Definition aesb.c:106
#define w3(p)
Definition aesb.c:109
#define w2(p)
Definition aesb.c:108
#define M(w0, w14, w9, w1)
Definition sha512-blocks.c:41

◆ F

#define F ( w,
k )
Value:
T1 = h + Sigma1(e) + Ch(e,f,g) + k + w; \
T2 = Sigma0(a) + Maj(a,b,c); \
h = g; \
g = f; \
f = e; \
e = d + T1; \
d = c; \
c = b; \
b = a; \
a = T1 + T2;
cryptonote::block b
Definition block.cpp:40
static uint64_t h
Definition blockchain_stats.cpp:55
Definition d.py:1
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1124
#define Maj(x, y, z)
Definition sha512-blocks.c:35
#define Sigma0(x)
Definition sha512-blocks.c:36
#define Sigma1(x)
Definition sha512-blocks.c:37
#define Ch(x, y, z)
Definition sha512-blocks.c:34

◆ M

#define M ( w0,
w14,
w9,
w1 )
Value:
w0 = sigma1(w14) + w9 + sigma0(w1) + w0;
#define sigma1(x)
Definition sha512-blocks.c:39
#define sigma0(x)
Definition sha512-blocks.c:38

◆ Maj

#define Maj ( x,
y,
z )
Value:
((x & y) ^ (x & z) ^ (y & z))

◆ ROTR

#define ROTR ( x,
c )
Value:
(((x) >> (c)) | ((x) << (64 - (c))))

◆ SHR

#define SHR ( x,
c )
Value:
((x) >> (c))

◆ Sigma0

#define Sigma0 ( x)
Value:
(ROTR(x,28) ^ ROTR(x,34) ^ ROTR(x,39))
#define ROTR(x, c)
Definition sha512-blocks.c:32

◆ sigma0

#define sigma0 ( x)
Value:
(ROTR(x, 1) ^ ROTR(x, 8) ^ SHR(x,7))
#define SHR(x, c)
Definition sha512-blocks.c:31

◆ Sigma1

#define Sigma1 ( x)
Value:
(ROTR(x,14) ^ ROTR(x,18) ^ ROTR(x,41))

◆ sigma1

#define sigma1 ( x)
Value:
(ROTR(x,19) ^ ROTR(x,61) ^ SHR(x,6))

Typedef Documentation

◆ uint64

typedef unsigned long long uint64

Function Documentation

◆ crypto_hashblocks()

int crypto_hashblocks ( unsigned char * statebytes,
const unsigned char * in,
unsigned long long inlen )

◆ load_bigendian()

uint64 load_bigendian ( const unsigned char * x)
static

◆ store_bigendian()

void store_bigendian ( unsigned char * x,
uint64 u )
static