cryptlib
3.4.1
|
#include <stdlib.h>
#include <string.h>
#include "crypt/osconfig.h"
#include "crypt/sha.h"
#include "crypt/md32com.h"
Go to the source code of this file.
Macros | |
#define | SHA_LONG_LOG2 2 /* default to 32 bits */ |
#define | DATA_ORDER_IS_BIG_ENDIAN |
#define | HASH_LONG SHA_LONG |
#define | HASH_LONG_LOG2 SHA_LONG_LOG2 |
#define | HASH_CTX SHA_CTX |
#define | HASH_CBLOCK SHA_CBLOCK |
#define | HASH_LBLOCK SHA_LBLOCK |
#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 | |
void | HASH_INIT (SHA_CTX *c) |
void | HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, int num) |
void | HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, int num) |
#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 DATA_ORDER_IS_BIG_ENDIAN |
Definition at line 74 of file sha1locl.h.
#define F_00_19 | ( | b, | |
c, | |||
d | |||
) | ((((c) ^ (d)) & (b)) ^ (d)) |
Definition at line 174 of file sha1locl.h.
#define F_20_39 | ( | b, | |
c, | |||
d | |||
) | ((b) ^ (c) ^ (d)) |
Definition at line 175 of file sha1locl.h.
#define F_40_59 | ( | b, | |
c, | |||
d | |||
) | (((b) & (c)) | (((b)|(c)) & (d))) |
Definition at line 176 of file sha1locl.h.
#define F_60_79 | ( | b, | |
c, | |||
d | |||
) | F_20_39(b,c,d) |
Definition at line 177 of file sha1locl.h.
#define HASH_CBLOCK SHA_CBLOCK |
Definition at line 79 of file sha1locl.h.
#define HASH_CTX SHA_CTX |
Definition at line 78 of file sha1locl.h.
#define HASH_LBLOCK SHA_LBLOCK |
Definition at line 80 of file sha1locl.h.
#define HASH_LONG SHA_LONG |
Definition at line 76 of file sha1locl.h.
#define HASH_LONG_LOG2 SHA_LONG_LOG2 |
Definition at line 77 of file sha1locl.h.
#define HASH_MAKE_STRING | ( | c, | |
s | |||
) |
#define INIT_DATA_h0 0x67452301UL |
Definition at line 144 of file sha1locl.h.
#define INIT_DATA_h1 0xefcdab89UL |
Definition at line 145 of file sha1locl.h.
#define INIT_DATA_h2 0x98badcfeUL |
Definition at line 146 of file sha1locl.h.
#define INIT_DATA_h3 0x10325476UL |
Definition at line 147 of file sha1locl.h.
#define INIT_DATA_h4 0xc3d2e1f0UL |
Definition at line 148 of file sha1locl.h.
#define K_00_19 0x5a827999UL |
Definition at line 162 of file sha1locl.h.
#define K_20_39 0x6ed9eba1UL |
Definition at line 163 of file sha1locl.h.
#define K_40_59 0x8f1bbcdcUL |
Definition at line 164 of file sha1locl.h.
#define K_60_79 0xca62c1d6UL |
Definition at line 165 of file sha1locl.h.
#define SHA_LONG_LOG2 2 /* default to 32 bits */ |
Definition at line 71 of file sha1locl.h.
#define X | ( | i | ) | XX##i |
Definition at line 221 of file sha1locl.h.
Definition at line 357 of file sha1locl.h.
Definition at line 232 of file sha1locl.h.
void HASH_INIT | ( | SHA_CTX * | c | ) |
Definition at line 150 of file sha1locl.h.