md4-internal.c File Reference

MD4 hash implementation. More...

#include "includes.h"
#include "common.h"
#include "crypto.h"
Include dependency graph for md4-internal.c:

Go to the source code of this file.

Data Structures

struct  MD4Context

Defines

#define MD4_BLOCK_LENGTH   64
#define MD4_DIGEST_LENGTH   16
#define MD4_DIGEST_STRING_LENGTH   (MD4_DIGEST_LENGTH * 2 + 1)
#define PUT_64BIT_LE(cp, value)
#define PUT_32BIT_LE(cp, value)
#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 MD4STEP(f, w, x, y, z, data, s)   ( w += f(x, y, z) + data, w = w<<s | w>>(32-s) )

Typedefs

typedef struct MD4Context MD4_CTX

Functions

int md4_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
 MD4 hash for data vector.

Detailed Description

MD4 hash implementation.

Copyright
Copyright (c) 2006, Jouni Malinen <j@w1.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file md4-internal.c.


Define Documentation

#define PUT_32BIT_LE ( cp,
value   ) 
Value:
do {                                    \
        (cp)[3] = (value) >> 24;                                        \
        (cp)[2] = (value) >> 16;                                        \
        (cp)[1] = (value) >> 8;                                         \
        (cp)[0] = (value); } while (0)

Definition at line 86 of file md4-internal.c.

#define PUT_64BIT_LE ( cp,
value   ) 
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 76 of file md4-internal.c.


Function Documentation

int md4_vector ( size_t  num_elem,
const u8 *  addr[],
const size_t *  len,
u8 *  mac 
)

MD4 hash for data vector.

Parameters:
num_elem Number of elements in the data vector
addr Pointers to the data areas
len Lengths of the data blocks
mac Buffer for the hash
Returns:
0 on success, -1 on failure

Definition at line 36 of file md4-internal.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:19:18 2009 for hostapd by  doxygen 1.6.1