webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
sha512.c File Reference
#include <openssl/sha.h>
#include <string.h>
#include <openssl/mem.h>

Macros

#define B(x, j)   (((uint64_t)(*(((const uint8_t *)(&x)) + j))) << ((7 - j) * 8))
 
#define PULL64(x)
 
#define ROTR(x, s)   (((x) >> s) | (x) << (64 - s))
 
#define Sigma0(x)   (ROTR((x), 28) ^ ROTR((x), 34) ^ ROTR((x), 39))
 
#define Sigma1(x)   (ROTR((x), 14) ^ ROTR((x), 18) ^ ROTR((x), 41))
 
#define sigma0(x)   (ROTR((x), 1) ^ ROTR((x), 8) ^ ((x) >> 7))
 
#define sigma1(x)   (ROTR((x), 19) ^ ROTR((x), 61) ^ ((x) >> 6))
 
#define Ch(x, y, z)   (((x) & (y)) ^ ((~(x)) & (z)))
 
#define Maj(x, y, z)   (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
 
#define ROUND_00_15(i, a, b, c, d, e, f, g, h)
 
#define ROUND_16_80(i, j, a, b, c, d, e, f, g, h, X)
 

Functions

int SHA384_Init (SHA512_CTX *sha)
 
int SHA512_Init (SHA512_CTX *sha)
 
uint8_tSHA384 (const uint8_t *data, size_t len, uint8_t *out)
 
uint8_tSHA512 (const uint8_t *data, size_t len, uint8_t *out)
 
int SHA384_Final (uint8_t *md, SHA512_CTX *sha)
 
int SHA384_Update (SHA512_CTX *sha, const void *data, size_t len)
 
void SHA512_Transform (SHA512_CTX *c, const uint8_t *block)
 
int SHA512_Update (SHA512_CTX *c, const void *in_data, size_t len)
 
int SHA512_Final (uint8_t *md, SHA512_CTX *sha)
 

Macro Definition Documentation

◆ B

#define B (   x,
  j 
)    (((uint64_t)(*(((const uint8_t *)(&x)) + j))) << ((7 - j) * 8))

◆ Ch

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

◆ Maj

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

◆ PULL64

#define PULL64 (   x)
Value:
(B(x, 0) | B(x, 1) | B(x, 2) | B(x, 3) | B(x, 4) | B(x, 5) | B(x, 6) | \
B(x, 7))
#define B(x, j)
Definition: sha512.c:425
EGLSurface EGLint x
Definition: eglext.h:950

◆ ROTR

#define ROTR (   x,
  s 
)    (((x) >> s) | (x) << (64 - s))

◆ ROUND_00_15

#define ROUND_00_15 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h 
)
Value:
do { \
T1 += h + Sigma1(e) + Ch(e, f, g) + K512[i]; \
h = Sigma0(a) + Maj(a, b, c); \
d += T1; \
h += T1; \
} while (0)
GLboolean GLboolean g
Definition: gl2ext.h:306
int c
Definition: cpp_unittests.cpp:275
#define Ch(x, y, z)
Definition: sha512.c:441
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
#define Sigma0(x)
Definition: sha512.c:436
GLfloat f
Definition: gl2.h:417
GLfloat GLfloat GLfloat GLfloat h
Definition: gl2ext.h:3060
for i
Definition: complexityMeasures.m:24
DOMString e
Definition: WebCryptoAPI.idl:115
#define Sigma1(x)
Definition: sha512.c:437
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
#define Maj(x, y, z)
Definition: sha512.c:442

◆ ROUND_16_80

#define ROUND_16_80 (   i,
  j,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  X 
)
Value:
do { \
s0 = X[(j + 1) & 0x0f]; \
s0 = sigma0(s0); \
s1 = X[(j + 14) & 0x0f]; \
s1 = sigma1(s1); \
T1 = X[(j) & 0x0f] += s0 + s1 + X[(j + 9) & 0x0f]; \
ROUND_00_15(i + j, a, b, c, d, e, f, g, h); \
} while (0)
#define sigma1(x)
Definition: sha512.c:439
GLboolean GLboolean g
Definition: gl2ext.h:306
int c
Definition: cpp_unittests.cpp:275
#define sigma0(x)
Definition: sha512.c:438
#define X(sym)
Definition: alsasymboltable_linux.h:139
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
GLfloat f
Definition: gl2.h:417
GLfloat GLfloat GLfloat GLfloat h
Definition: gl2ext.h:3060
for i
Definition: complexityMeasures.m:24
DOMString e
Definition: WebCryptoAPI.idl:115
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
for for j
Definition: complexityMeasures.m:25
#define d
Definition: float-mm.c:30

◆ Sigma0

#define Sigma0 (   x)    (ROTR((x), 28) ^ ROTR((x), 34) ^ ROTR((x), 39))

◆ sigma0

#define sigma0 (   x)    (ROTR((x), 1) ^ ROTR((x), 8) ^ ((x) >> 7))

◆ Sigma1

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

◆ sigma1

#define sigma1 (   x)    (ROTR((x), 19) ^ ROTR((x), 61) ^ ((x) >> 6))

Function Documentation

◆ SHA384()

uint8_t* SHA384 ( const uint8_t data,
size_t  len,
uint8_t out 
)

◆ SHA384_Final()

int SHA384_Final ( uint8_t md,
SHA512_CTX sha 
)

◆ SHA384_Init()

int SHA384_Init ( SHA512_CTX sha)

◆ SHA384_Update()

int SHA384_Update ( SHA512_CTX sha,
const void data,
size_t  len 
)

◆ SHA512()

uint8_t* SHA512 ( const uint8_t data,
size_t  len,
uint8_t out 
)

◆ SHA512_Final()

int SHA512_Final ( uint8_t md,
SHA512_CTX sha 
)

◆ SHA512_Init()

int SHA512_Init ( SHA512_CTX sha)

◆ SHA512_Transform()

void SHA512_Transform ( SHA512_CTX c,
const uint8_t block 
)

◆ SHA512_Update()

int SHA512_Update ( SHA512_CTX c,
const void in_data,
size_t  len 
)