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) | |
struct md4_variables | __attribute__ ((packed)) |
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 | |
uint32_t | a |
uint32_t | b |
uint32_t | c |
uint32_t | d |
uint32_t | w [16] |
static const uint8_t | r [3][4] |
MD4 shift amounts. More... | |
struct md4_step | __attribute__ |
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 | ) |
struct md4_variables __attribute__ | ( | (packed) | ) |
|
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 a, assert(), b, c, cpu_to_le32, 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, f, md4_digest::h, le32_to_cpus, md4_context::len, linker_assert, md4_steps, r, rol32(), step(), u, and 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().
uint32_t a |
Definition at line 28 of file md4.c.
Referenced by ar9287_eeprom_olpc_set_pdadcs(), arbel_setup_mpt(), intf_plug_plug(), md4_digest(), pcnet32_chip_detect(), png_paeth_predictor(), setting_cmp(), stack_check(), TLan_HashFunc(), tls_p_hash_va(), and xor().
uint32_t b |
Definition at line 29 of file md4.c.
Referenced by gdbstub_to_hex_digit(), intf_plug_plug(), md4_digest(), png_paeth_predictor(), setting_cmp(), and xor().
static __always_inline off_t off_t int c |
Definition at line 30 of file md4.c.
Referenced by _printw_handler(), _wgetc(), _wputc(), a3c90x_hw_start(), ansiesc_process(), ansiscr_putc(), arbel_fill_mlx_send_wqe(), ath5k_eeprom_read_pcal_info_5112(), ath5k_hw_post(), ath5k_hw_rf2425_channel(), ath5k_hw_rf5112_channel(), ath9k_hw_getnf(), cputchar(), dns_encode(), efi_printf_sputc(), eth_probe(), ftp_check_string(), ftp_control_deliver(), hermon_fill_eth_send_wqe(), hermon_fill_mlx_send_wqe(), hermon_fill_nop_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), http_token(), kbd_getc(), linux_args_parse(), md4_digest(), memsetw(), ne_probe(), ntlm_append_string(), ntlm_key(), peerdist_discovery_reply_values(), png_paeth_predictor(), png_pixels_pass(), print_user_string(), printf_putchar(), printf_sputc(), reparse_options(), syslog_fix_name(), trivial_memchr_user(), trivial_memset_user(), uri_character_escaped(), uri_decode(), uri_encode(), wgetch(), and wgetnstr().
uint32_t d |
Definition at line 31 of file md4.c.
Referenced by cs89x0_transmit(), davicom_transmit(), eepro_transmit(), hfa384x_copy_from_bap(), hfa384x_copy_to_bap(), md4_digest(), ne_transmit(), ns8390_transmit(), prism2_transmit(), sis190_get_mac_addr_from_apc(), sis900_transmit(), skge_ring_alloc(), smc9000_transmit(), sundance_transmit(), t509_transmit(), t515_transmit(), t595_transmit(), tlan_transmit(), tulip_transmit(), and w89c840_transmit().
uint32_t w[16] |
Definition at line 32 of file md4.c.
Referenced by md4_digest(), sis190_get_mac_addr_from_eeprom(), and sis900_init_rxfilter().
|
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().
struct md4_step __attribute__ |
|
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(), and ntlm_key().