|
OpenVAS Scanner 23.40.3
|
Unix SMB/CIFS implementation. HMAC MD5 code for use in NTLMv2. More...
#include "md5.h"

Go to the source code of this file.
Data Structures | |
| struct | HMACMD5Context |
Macros | |
| #define | uchar unsigned char |
| #define | ZERO_STRUCT(x) |
| #define | uint16 unsigned short |
| #define | UCS2_SHIFT 0 |
| #define | UCS2_CHAR(c) |
Typedefs | |
| typedef uint16 | smb_ucs2_t |
Functions | |
| void | hmac_md5_init_limK_to_64 (const uchar *key, int key_len, HMACMD5Context *ctx) |
| The microsoft version of hmac_md5 initialisation. | |
| void | hmac_md5_update (const uchar *text, int text_len, HMACMD5Context *ctx) |
| Update hmac_md5 "inner" buffer. | |
| void | hmac_md5_final (uchar *digest, HMACMD5Context *ctx) |
| Finish off hmac_md5 "inner" buffer and generate outer one. | |
| void | hmac_md5 (uchar key[16], uchar *data, int data_len, uchar *digest) |
| Function to calculate an HMAC MD5 digest from data. Use the microsoft hmacmd5 init method because the key is 16 bytes. | |
Unix SMB/CIFS implementation. HMAC MD5 code for use in NTLMv2.
taken direct from rfc2104 implementation and modified for suitable use for ntlmv2.
Definition in file hmacmd5.h.
| #define uchar unsigned char |
Definition at line 22 of file hmacmd5.h.
Referenced by E_deshash_ntlmssp(), E_P16(), E_P24(), hmac_md5(), hmac_md5_final(), hmac_md5_init_limK_to_64(), hmac_md5_update(), LMv2_generate_response_ntlmssp(), nasl_insert_hexzeros(), nasl_lm_owf_gen(), nasl_ntlmv1_hash(), nasl_ntlmv2_hash(), nasl_ntv2_owf_gen(), ntlmssp_genauth_ntlm(), ntlmssp_genauth_ntlm2(), NTLMv2_generate_client_data_ntlmssp(), NTLMv2_generate_response_ntlmssp(), permute(), SamOEMhash(), simple_packet_signature_ntlmssp(), SMBencrypt_hash_ntlmssp(), smbhash(), SMBNTencrypt_hash_ntlmssp(), SMBNTLMv2encrypt_hash_ntlmssp(), SMBNTLMv2encrypt_hash_ntlmssp(), SMBOWFencrypt_ntlmssp(), SMBOWFencrypt_ntv2_ntlmssp(), SMBOWFencrypt_ntv2_ntlmssp(), SMBsesskeygen_lm_sess_key_ntlmssp(), SMBsesskeygen_ntv1_ntlmssp(), SMBsesskeygen_ntv2_ntlmssp(), and str_to_key().
| #define UCS2_CHAR | ( | c | ) |
| #define ZERO_STRUCT | ( | x | ) |
| typedef uint16 smb_ucs2_t |
Function to calculate an HMAC MD5 digest from data. Use the microsoft hmacmd5 init method because the key is 16 bytes.
Definition at line 82 of file hmacmd5.c.
References hmac_md5_final(), hmac_md5_init_limK_to_64(), hmac_md5_update(), and uchar.
Referenced by ntlmssp_genauth_ntlm2().


| void hmac_md5_final | ( | uchar * | digest, |
| HMACMD5Context * | ctx ) |
Finish off hmac_md5 "inner" buffer and generate outer one.
Definition at line 64 of file hmacmd5.c.
References HMACMD5Context::ctx, HMACMD5Context::k_opad, MD5Final(), MD5Init(), MD5Update(), and uchar.
Referenced by hmac_md5(), nasl_ntv2_owf_gen(), SMBOWFencrypt_ntv2_ntlmssp(), and SMBsesskeygen_ntv2_ntlmssp().


| void hmac_md5_init_limK_to_64 | ( | const uchar * | key, |
| int | key_len, | ||
| HMACMD5Context * | ctx ) |
The microsoft version of hmac_md5 initialisation.
Definition at line 24 of file hmacmd5.c.
References HMACMD5Context::ctx, HMACMD5Context::k_ipad, HMACMD5Context::k_opad, MD5Init(), MD5Update(), uchar, and ZERO_STRUCT.
Referenced by hmac_md5(), nasl_ntv2_owf_gen(), SMBOWFencrypt_ntv2_ntlmssp(), and SMBsesskeygen_ntv2_ntlmssp().


| void hmac_md5_update | ( | const uchar * | text, |
| int | text_len, | ||
| HMACMD5Context * | ctx ) |
Update hmac_md5 "inner" buffer.
Definition at line 55 of file hmacmd5.c.
References HMACMD5Context::ctx, MD5Update(), and uchar.
Referenced by hmac_md5(), nasl_ntv2_owf_gen(), SMBOWFencrypt_ntv2_ntlmssp(), and SMBsesskeygen_ntv2_ntlmssp().

