OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
sha_locl.h File Reference
#include <stdlib.h>
#include <string.h>
#include <openssl/opensslconf.h>
#include <openssl/sha.h>
#include "md32_common.h"

Go to the source code of this file.

Macros

#define DATA_ORDER_IS_BIG_ENDIAN
 
#define HASH_LONG   SHA_LONG
 
#define HASH_CTX   SHA_CTX
 
#define HASH_CBLOCK   SHA_CBLOCK
 
#define HASH_MAKE_STRING(c, s)
 
#define INIT_DATA_h0   0x67452301UL
 
#define INIT_DATA_h1   0xefcdab89UL
 
#define INIT_DATA_h2   0x98badcfeUL
 
#define INIT_DATA_h3   0x10325476UL
 
#define INIT_DATA_h4   0xc3d2e1f0UL
 
#define K_00_19   0x5a827999UL
 
#define K_20_39   0x6ed9eba1UL
 
#define K_40_59   0x8f1bbcdcUL
 
#define K_60_79   0xca62c1d6UL
 
#define F_00_19(b, c, d)   ((((c) ^ (d)) & (b)) ^ (d))
 
#define F_20_39(b, c, d)   ((b) ^ (c) ^ (d))
 
#define F_40_59(b, c, d)   (((b) & (c)) | (((b)|(c)) & (d)))
 
#define F_60_79(b, c, d)   F_20_39(b,c,d)
 
#define BODY_00_15(i, a, b, c, d, e, f, xi)
 
#define BODY_16_19(i, a, b, c, d, e, f, xi, xa, xb, xc, xd)
 
#define BODY_20_31(i, a, b, c, d, e, f, xi, xa, xb, xc, xd)
 
#define BODY_32_39(i, a, b, c, d, e, f, xa, xb, xc, xd)
 
#define BODY_40_59(i, a, b, c, d, e, f, xa, xb, xc, xd)
 
#define BODY_60_79(i, a, b, c, d, e, f, xa, xb, xc, xd)
 
#define X(i)   XX##i
 

Functions

 fips_md_init_ctx (SHA1, SHA)
 

Macro Definition Documentation

#define BODY_00_15 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  xi 
)
Value:
(f)=xi+(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \
(b)=ROTATE((b),30);

Definition at line 159 of file sha_locl.h.

#define BODY_16_19 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  xi,
  xa,
  xb,
  xc,
  xd 
)
Value:
Xupdate(f,xi,xa,xb,xc,xd); \
(f)+=(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \
(b)=ROTATE((b),30);

Definition at line 163 of file sha_locl.h.

#define BODY_20_31 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  xi,
  xa,
  xb,
  xc,
  xd 
)
Value:
Xupdate(f,xi,xa,xb,xc,xd); \
(f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \
(b)=ROTATE((b),30);

Definition at line 168 of file sha_locl.h.

#define BODY_32_39 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  xa,
  xb,
  xc,
  xd 
)
Value:
Xupdate(f,xa,xa,xb,xc,xd); \
(f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \
(b)=ROTATE((b),30);

Definition at line 173 of file sha_locl.h.

#define BODY_40_59 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  xa,
  xb,
  xc,
  xd 
)
Value:
Xupdate(f,xa,xa,xb,xc,xd); \
(f)+=(e)+K_40_59+ROTATE((a),5)+F_40_59((b),(c),(d)); \
(b)=ROTATE((b),30);

Definition at line 178 of file sha_locl.h.

#define BODY_60_79 (   i,
  a,
  b,
  c,
  d,
  e,
  f,
  xa,
  xb,
  xc,
  xd 
)
Value:
Xupdate(f,xa,xa,xb,xc,xd); \
(f)=xa+(e)+K_60_79+ROTATE((a),5)+F_60_79((b),(c),(d)); \
(b)=ROTATE((b),30);

Definition at line 183 of file sha_locl.h.

#define DATA_ORDER_IS_BIG_ENDIAN

Definition at line 65 of file sha_locl.h.

#define F_00_19 (   b,
  c,
 
)    ((((c) ^ (d)) & (b)) ^ (d))

Definition at line 152 of file sha_locl.h.

#define F_20_39 (   b,
  c,
 
)    ((b) ^ (c) ^ (d))

Definition at line 153 of file sha_locl.h.

#define F_40_59 (   b,
  c,
 
)    (((b) & (c)) | (((b)|(c)) & (d)))

Definition at line 154 of file sha_locl.h.

#define F_60_79 (   b,
  c,
 
)    F_20_39(b,c,d)

Definition at line 155 of file sha_locl.h.

#define HASH_CBLOCK   SHA_CBLOCK

Definition at line 69 of file sha_locl.h.

#define HASH_CTX   SHA_CTX

Definition at line 68 of file sha_locl.h.

#define HASH_LONG   SHA_LONG

Definition at line 67 of file sha_locl.h.

#define HASH_MAKE_STRING (   c,
 
)
Value:
do { \
unsigned long ll; \
ll=(c)->h0; HOST_l2c(ll,(s)); \
ll=(c)->h1; HOST_l2c(ll,(s)); \
ll=(c)->h2; HOST_l2c(ll,(s)); \
ll=(c)->h3; HOST_l2c(ll,(s)); \
ll=(c)->h4; HOST_l2c(ll,(s)); \
} while (0)

Definition at line 70 of file sha_locl.h.

#define INIT_DATA_h0   0x67452301UL

Definition at line 119 of file sha_locl.h.

#define INIT_DATA_h1   0xefcdab89UL

Definition at line 120 of file sha_locl.h.

#define INIT_DATA_h2   0x98badcfeUL

Definition at line 121 of file sha_locl.h.

#define INIT_DATA_h3   0x10325476UL

Definition at line 122 of file sha_locl.h.

#define INIT_DATA_h4   0xc3d2e1f0UL

Definition at line 123 of file sha_locl.h.

#define K_00_19   0x5a827999UL

Definition at line 140 of file sha_locl.h.

#define K_20_39   0x6ed9eba1UL

Definition at line 141 of file sha_locl.h.

#define K_40_59   0x8f1bbcdcUL

Definition at line 142 of file sha_locl.h.

#define K_60_79   0xca62c1d6UL

Definition at line 143 of file sha_locl.h.

#define X (   i)    XX##i

Definition at line 201 of file sha_locl.h.

Function Documentation

fips_md_init_ctx ( SHA1  ,
SHA   
)

Definition at line 128 of file sha_locl.h.