iPXE
|
MD4 algorithm. More...
#include <stdint.h>
#include <string.h>
#include <byteswap.h>
#include <assert.h>
#include <ipxe/rotate.h>
#include <ipxe/crypto.h>
#include <ipxe/md4.h>
Go to the source code of this file.
Data Structures | |
struct | md4_variables |
MD4 variables. More... | |
struct | md4_step |
An MD4 step function. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static uint32_t | md4_f_0_15 (struct md4_variables *v, unsigned int i) |
f(b,c,d,w) for steps 0 to 15 More... | |
static uint32_t | md4_f_16_31 (struct md4_variables *v, unsigned int i) |
f(b,c,d,w) for steps 16 to 31 More... | |
static uint32_t | md4_f_32_47 (struct md4_variables *v, unsigned int i) |
f(b,c,d,w) for steps 32 to 47 More... | |
static void | md4_init (void *ctx) |
Initialise MD4 algorithm. More... | |
static void | md4_digest (struct md4_context *context) |
Calculate MD4 digest of accumulated data. More... | |
static void | md4_update (void *ctx, const void *data, size_t len) |
Accumulate data with MD4 algorithm. More... | |
static void | md4_final (void *ctx, void *out) |
Generate MD4 digest. More... | |
Variables | |
static const uint8_t | r [3][4] |
MD4 shift amounts. More... | |
static struct md4_step | md4_steps [4] |
MD4 steps. More... | |
struct digest_algorithm | md4_algorithm |
MD4 algorithm. More... | |
MD4 algorithm.
Definition in file md4.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
f(b,c,d,w) for steps 0 to 15
v | MD4 variables |
i | Index within round |
f | f(b,c,d,w) |
Definition at line 66 of file md4.c.
References md4_variables::b, md4_variables::c, md4_variables::d, and md4_variables::w.
|
static |
f(b,c,d,w) for steps 16 to 31
v | MD4 variables |
i | Index within round |
f | f(b,c,d,w) |
Definition at line 77 of file md4.c.
References md4_variables::b, md4_variables::c, md4_variables::d, and md4_variables::w.
|
static |
f(b,c,d,w) for steps 32 to 47
v | MD4 variables |
i | Index within round |
f | f(b,c,d,w) |
Definition at line 89 of file md4.c.
References md4_variables::b, md4_variables::c, md4_variables::d, and md4_variables::w.
|
static |
Initialise MD4 algorithm.
ctx | MD4 context |
Definition at line 125 of file md4.c.
References cpu_to_le32, ctx, md4_digest_data_dwords::dd, md4_context::ddd, md4_digest_data::digest, md4_digest::h, and md4_context::len.
|
static |
Calculate MD4 digest of accumulated data.
context | MD4 context |
Definition at line 140 of file md4.c.
References md4_variables::a, assert(), md4_variables::b, build_assert, c, cpu_to_le32, md4_variables::d, md4_digest_data::data, DBGC, DBGC2, DBGC_HDA, md4_digest_data_dwords::dd, md4_context::ddd, md4_digest_data::digest, md4_digest_data_dwords::dword, md4_step::f, md4_digest::h, le32_to_cpus, md4_context::len, md4_steps, r, rol32(), step(), u, and md4_variables::w.
Referenced by md4_update().
|
static |
Accumulate data with MD4 algorithm.
ctx | MD4 context |
data | Data |
len | Length of data |
Definition at line 212 of file md4.c.
References md4_block::byte, ctx, data, md4_digest_data::data, md4_digest_data_dwords::dd, md4_context::ddd, len, md4_context::len, md4_digest(), and offset.
Referenced by md4_final().
|
static |
Generate MD4 digest.
ctx | MD4 context |
out | Output buffer |
Definition at line 235 of file md4.c.
References assert(), cpu_to_le64, ctx, md4_digest_data::data, md4_digest_data_dwords::dd, md4_context::ddd, md4_digest_data::digest, md4_context::len, md4_update(), memcpy(), offsetof, out, pad, and typeof().
|
static |
MD4 shift amounts.
Definition at line 53 of file md4.c.
Referenced by __ath9k_hw_init(), __attribute__(), ar5008_write_rf_array(), ath9k_hw_channel_change(), ath9k_hw_reset(), ath9k_hw_write_array(), ath9k_start(), ath_radio_disable(), ath_reset(), ath_set_channel(), bcom_phy_init(), fls(), genesis_mac_init(), gma_write16(), md4_digest(), xm_write16(), and xm_write32().
|
static |
MD4 steps.
Definition at line 111 of file md4.c.
Referenced by md4_digest().
struct digest_algorithm md4_algorithm |
MD4 algorithm.
Definition at line 261 of file md4.c.
Referenced by md4_test_exec(), mschapv2_hash_hash(), mschapv2_password_hash(), and ntlm_key().