#include "includes.h"
#include "common.h"
#include "crypto.h"
Go to the source code of this file.
Classes | |
struct | MD4Context |
Defines | |
#define | F1(x, y, z) (z ^ (x & (y ^ z))) |
#define | F2(x, y, z) ((x & y) | (x & z) | (y & z)) |
#define | F3(x, y, z) (x ^ y ^ z) |
#define | MD4_BLOCK_LENGTH 64 |
#define | MD4_DIGEST_LENGTH 16 |
#define | MD4_DIGEST_STRING_LENGTH (MD4_DIGEST_LENGTH * 2 + 1) |
#define | MD4STEP(f, w, x, y, z, data, s) ( w += f(x, y, z) + data, w = w<<s | w>>(32-s) ) |
#define | PUT_32BIT_LE(cp, value) |
#define | PUT_64BIT_LE(cp, value) |
Typedefs | |
typedef struct MD4Context | MD4_CTX |
Functions | |
int | md4_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
static void | MD4Final (unsigned char digest[MD4_DIGEST_LENGTH], MD4_CTX *ctx) |
static void | MD4Init (MD4_CTX *ctx) |
static void | MD4Pad (MD4_CTX *ctx) |
static void | MD4Transform (u32 state[4], const u8 block[MD4_BLOCK_LENGTH]) |
static void | MD4Update (MD4_CTX *ctx, const unsigned char *input, size_t len) |
Variables | |
static u8 | PADDING [MD4_BLOCK_LENGTH] |
#define F1 | ( | x, | |||
y, | |||||
z | ) | (z ^ (x & (y ^ z))) |
Definition at line 187 of file md4-internal.c.
#define F2 | ( | x, | |||
y, | |||||
z | ) | ((x & y) | (x & z) | (y & z)) |
Definition at line 188 of file md4-internal.c.
#define F3 | ( | x, | |||
y, | |||||
z | ) | (x ^ y ^ z) |
Definition at line 189 of file md4-internal.c.
#define MD4_BLOCK_LENGTH 64 |
Definition at line 20 of file md4-internal.c.
#define MD4_DIGEST_LENGTH 16 |
Definition at line 21 of file md4-internal.c.
#define MD4_DIGEST_STRING_LENGTH (MD4_DIGEST_LENGTH * 2 + 1) |
Definition at line 69 of file md4-internal.c.
#define MD4STEP | ( | f, | |||
w, | |||||
x, | |||||
y, | |||||
z, | |||||
data, | |||||
s | ) | ( w += f(x, y, z) + data, w = w<<s | w>>(32-s) ) |
Definition at line 192 of file md4-internal.c.
#define PUT_32BIT_LE | ( | cp, | |||
value | ) |
do { \ (cp)[3] = (value) >> 24; \ (cp)[2] = (value) >> 16; \ (cp)[1] = (value) >> 8; \ (cp)[0] = (value); } while (0)
Definition at line 85 of file md4-internal.c.
#define PUT_64BIT_LE | ( | cp, | |||
value | ) |
do { \ (cp)[7] = (value) >> 56; \ (cp)[6] = (value) >> 48; \ (cp)[5] = (value) >> 40; \ (cp)[4] = (value) >> 32; \ (cp)[3] = (value) >> 24; \ (cp)[2] = (value) >> 16; \ (cp)[1] = (value) >> 8; \ (cp)[0] = (value); } while (0)
Definition at line 75 of file md4-internal.c.
typedef struct MD4Context MD4_CTX |
md4_vector - MD4 hash for data vector : Number of elements in the data vector : Pointers to the data areas : Lengths of the data blocks : Buffer for the hash Returns: 0 on success, -1 on failure
Definition at line 35 of file md4-internal.c.
static void MD4Final | ( | unsigned char | digest[MD4_DIGEST_LENGTH], | |
MD4_CTX * | ctx | |||
) | [static] |
Definition at line 171 of file md4-internal.c.
static void MD4Init | ( | MD4_CTX * | ctx | ) | [static] |
Definition at line 101 of file md4-internal.c.
static void MD4Pad | ( | MD4_CTX * | ctx | ) | [static] |
Definition at line 151 of file md4-internal.c.
Definition at line 201 of file md4-internal.c.
static void MD4Update | ( | MD4_CTX * | ctx, | |
const unsigned char * | input, | |||
size_t | len | |||
) | [static] |
Definition at line 114 of file md4-internal.c.
{ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
Definition at line 91 of file md4-internal.c.