Compounds |
union | _mendian |
struct | DIGEST_CTX_s |
| MD5/SHA1 digest private data. More...
|
Defines |
#define | f1(x, y, z) ( z ^ ( x & ( y ^ z ) ) ) |
| The SHA f()-functions. More...
|
#define | f2(x, y, z) ( x ^ y ^ z ) |
#define | f3(x, y, z) ( ( x & y ) | ( z & ( x | y ) ) ) |
#define | f4(x, y, z) ( x ^ y ^ z ) |
#define | K1 0x5A827999L |
| The SHA Mysterious Constants.
|
#define | K2 0x6ED9EBA1L |
#define | K3 0x8F1BBCDCL |
#define | K4 0xCA62C1D6L |
#define | ROTL(n, X) ( ( (X) << (n) ) | ( (X) >> ( 32 - (n) ) ) ) |
| 32-bit rotate left - kludged with shifts.
|
#define | expand(W, i) |
| The initial expanding function. More...
|
#define | subRound(a, b, c, d, e, f, k, data) |
| The prototype SHA sub-round. More...
|
#define | F1(x, y, z) (z ^ (x & (y ^ z))) |
| The four core functions used in MD5 - F1 is optimized somewhat.
|
#define | F2(x, y, z) F1(z, x, y) |
#define | F3(x, y, z) (x ^ y ^ z) |
#define | F4(x, y, z) (y ^ (x | ~z)) |
#define | MD5STEP(f, w, x, y, z, data, s) |
| The central step in the MD5 algorithm. More...
|
#define | IS_BIG_ENDIAN() (_endian->b[0] == '\x44') |
#define | IS_LITTLE_ENDIAN() (_endian->b[0] == '\x11') |
Typedefs |
typedef unsigned int | uint32 |
typedef unsigned char | byte |
Functions |
void | SHA1Transform (DIGEST_CTX ctx) |
| The core of the SHA algorithm. More...
|
void | MD5Transform (DIGEST_CTX ctx) |
| The core of the MD5 algorithm. More...
|
void | byteReverse (byte *buf, unsigned nbytes) |
DIGEST_CTX | rpmDigestInit (rpmDigestFlags flags) |
void | rpmDigestUpdate (DIGEST_CTX ctx, const void *data, size_t len) |
void | rpmDigestFinal (DIGEST_CTX ctx, void **datap, size_t *lenp, int asAscii) |
Variables |
int | _ie = 0x44332211 |
union _mendian * | _endian |
|
Value: ( e += ROTL( 5, a ) + f( b, c, d ) + k + data, b = ROTL( 30, b ) )
The prototype SHA sub-round.
The fundamental sub-round is:
* a' = e + ROTL( 5, a ) + f( b, c, d ) + k + data;
* b' = a;
* c' = ROTL( 30, b );
* d' = c;
* e' = d;
*
but this is implemented by unrolling the loop 5 times and renaming the variables ( e, a, b, c, d ) = ( a', b', c', d', e' ) each iteration. This code is then replicated 20 times for each of the 4 functions, using the next 20 values from the W[] array each time.
Definition at line 118 of file digest.c.
Referenced by SHA1Transform(). |