4#ifndef PROTOCORE_NTLM_H
5#define PROTOCORE_NTLM_H
43 void (*nt_hash)(uint8_t *,
const char *, uint8_t *);
44 proto_bool (*ntowfv2)(uint8_t *,
const uint8_t *,
const char *,
const char *, uint8_t *);
45 size_t (*v2_response)(uint8_t *,
const uint8_t *,
const uint8_t *,
const uint8_t *,
const uint8_t *,
46 const uint8_t *, size_t, uint8_t *, size_t, uint8_t *);
47 size_t (*set_mic_flag)(uint8_t *,
const uint8_t *, size_t, uint8_t *, size_t);
48 void (*mic)(uint8_t *,
const uint8_t *,
const uint8_t *, size_t,
const uint8_t *, size_t,
const uint8_t *, size_t,
86 const uint8_t *client_challenge,
const uint8_t *timestamp,
const uint8_t *target_info,
87 size_t ti_len, uint8_t *out,
size_t out_cap, uint8_t *session_key);
111void protocore_ntlm_mic(uint8_t *work,
const uint8_t *session_key,
const uint8_t *neg,
size_t neg_len,
112 const uint8_t *chal,
size_t chal_len,
const uint8_t *auth,
size_t auth_len, uint8_t *out);
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
size_t protocore_ntlm_set_mic_flag(uint8_t *work, const uint8_t *target_info, size_t ti_len, uint8_t *out, size_t out_cap)
Copy the CHALLENGE target-info AV_PAIR list into out, setting the .
void protocore_ntlm_nt_hash(uint8_t *work, const char *password, uint8_t *nt_hash)
The NT hash: MD4 of the UTF-16LE password (password is ASCII/UTF-8, .
size_t protocore_ntlm_v2_response(uint8_t *work, const uint8_t *owf, const uint8_t *server_challenge, const uint8_t *client_challenge, const uint8_t *timestamp, const uint8_t *target_info, size_t ti_len, uint8_t *out, size_t out_cap, uint8_t *session_key)
Compute the NTLMv2 NtChallengeResponse (NTProofStr + temp) and the .
PROTOCORE_NS NtlmNs Ntlm PROTOCORE_UNUSED
Module namespace.
void protocore_ntlm_mic(uint8_t *work, const uint8_t *session_key, const uint8_t *neg, size_t neg_len, const uint8_t *chal, size_t chal_len, const uint8_t *auth, size_t auth_len, uint8_t *out)
The NTLMSSP AUTHENTICATE MIC (MS-NLMP §3.1.5.1.2): HMAC-MD5 over .
proto_bool protocore_ntlm_ntowfv2(uint8_t *work, const uint8_t *nt_hash, const char *user, const char *domain, uint8_t *owf)
NTOWFv2 = HMAC-MD5(NThash, UTF-16LE(Uppercase(user) + domain)). .
Dispatch table. Addressed by offset, so the layout is asserted below.
void(* nt_hash)(uint8_t *, const char *, uint8_t *)
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS