FreeRDP
ntlm_compute.h File Reference
#include "ntlm.h"
#include "ntlm_av_pairs.h"
This graph shows which files directly or indirectly include this file:

Functions

BOOL ntlm_get_version_info (NTLM_VERSION_INFO *versionInfo)
 
BOOL ntlm_read_version_info (wStream *s, NTLM_VERSION_INFO *versionInfo)
 
BOOL ntlm_write_version_info (wStream *s, const NTLM_VERSION_INFO *versionInfo)
 
BOOL ntlm_read_ntlm_v2_response (wStream *s, NTLMv2_RESPONSE *response)
 
BOOL ntlm_write_ntlm_v2_response (wStream *s, const NTLMv2_RESPONSE *response)
 
void ntlm_output_target_name (NTLM_CONTEXT *context)
 
void ntlm_output_channel_bindings (NTLM_CONTEXT *context)
 
void ntlm_current_time (BYTE *timestamp)
 
void ntlm_generate_timestamp (NTLM_CONTEXT *context)
 
BOOL ntlm_compute_lm_v2_response (NTLM_CONTEXT *context)
 
BOOL ntlm_compute_ntlm_v2_response (NTLM_CONTEXT *context)
 
void ntlm_rc4k (BYTE *key, size_t length, BYTE *plaintext, BYTE *ciphertext)
 
void ntlm_generate_client_challenge (NTLM_CONTEXT *context)
 
void ntlm_generate_server_challenge (NTLM_CONTEXT *context)
 
void ntlm_generate_key_exchange_key (NTLM_CONTEXT *context)
 
void ntlm_generate_random_session_key (NTLM_CONTEXT *context)
 
void ntlm_generate_exported_session_key (NTLM_CONTEXT *context)
 
void ntlm_encrypt_random_session_key (NTLM_CONTEXT *context)
 
void ntlm_decrypt_random_session_key (NTLM_CONTEXT *context)
 
BOOL ntlm_generate_client_signing_key (NTLM_CONTEXT *context)
 
BOOL ntlm_generate_server_signing_key (NTLM_CONTEXT *context)
 
BOOL ntlm_generate_client_sealing_key (NTLM_CONTEXT *context)
 
BOOL ntlm_generate_server_sealing_key (NTLM_CONTEXT *context)
 
BOOL ntlm_init_rc4_seal_states (NTLM_CONTEXT *context)
 
BOOL ntlm_compute_message_integrity_check (NTLM_CONTEXT *context, BYTE *mic, UINT32 size)
 

Function Documentation

◆ ntlm_compute_lm_v2_response()

BOOL ntlm_compute_lm_v2_response ( NTLM_CONTEXT context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_compute_message_integrity_check()

BOOL ntlm_compute_message_integrity_check ( NTLM_CONTEXT context,
BYTE mic,
UINT32  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_compute_ntlm_v2_response()

BOOL ntlm_compute_ntlm_v2_response ( NTLM_CONTEXT context)

Compute NTLMv2 Response.

NTLMv2_RESPONSE msdn{cc236653} NTLMv2 Authentication msdn{cc236700}

Parameters
contextA pointer to the NTLM context
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_current_time()

void ntlm_current_time ( BYTE timestamp)

Get current time, in tenths of microseconds since midnight of January 1, 1601.

Parameters
[out]timestamp64-bit little-endian timestamp
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_decrypt_random_session_key()

void ntlm_decrypt_random_session_key ( NTLM_CONTEXT context)

Decrypt RandomSessionKey (RC4-encrypted RandomSessionKey, using KeyExchangeKey as the key).

Parameters
contextA pointer to the NTLM context
    if (NegotiateFlags & NTLMSSP_NEGOTIATE_KEY_EXCH)
            Set RandomSessionKey to RC4K(KeyExchangeKey,

AUTHENTICATE_MESSAGE.EncryptedRandomSessionKey) else Set RandomSessionKey to KeyExchangeKey

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_encrypt_random_session_key()

void ntlm_encrypt_random_session_key ( NTLM_CONTEXT context)

Encrypt RandomSessionKey (RC4-encrypted RandomSessionKey, using KeyExchangeKey as the key).

Parameters
contextA pointer to the NTLM context
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_client_challenge()

void ntlm_generate_client_challenge ( NTLM_CONTEXT context)

Generate client challenge (8-byte nonce).

Parameters
contextA pointer to the NTLM context
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_client_sealing_key()

BOOL ntlm_generate_client_sealing_key ( NTLM_CONTEXT context)

Generate client sealing key (ClientSealingKey). msdn{cc236712}

Parameters
contextA pointer to the NTLM context
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_client_signing_key()

BOOL ntlm_generate_client_signing_key ( NTLM_CONTEXT context)

Generate client signing key (ClientSigningKey). msdn{cc236711}

Parameters
contextA pointer to the NTLM context
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_exported_session_key()

void ntlm_generate_exported_session_key ( NTLM_CONTEXT context)

Generate ExportedSessionKey (the RandomSessionKey, exported)

Parameters
contextA pointer to the NTLM context
Here is the caller graph for this function:

◆ ntlm_generate_key_exchange_key()

void ntlm_generate_key_exchange_key ( NTLM_CONTEXT context)

Generate KeyExchangeKey (the 128-bit SessionBaseKey). msdn{cc236710}

Parameters
contextA pointer to the NTLM context
Here is the caller graph for this function:

◆ ntlm_generate_random_session_key()

void ntlm_generate_random_session_key ( NTLM_CONTEXT context)

Generate RandomSessionKey (16-byte nonce).

Parameters
contextA pointer to the NTLM context
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_server_challenge()

void ntlm_generate_server_challenge ( NTLM_CONTEXT context)

Generate server challenge (8-byte nonce).

Parameters
contextA pointer to the NTLM context
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_server_sealing_key()

BOOL ntlm_generate_server_sealing_key ( NTLM_CONTEXT context)

Generate server sealing key (ServerSealingKey). msdn{cc236712}

Parameters
contextA pointer to the NTLM context
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_server_signing_key()

BOOL ntlm_generate_server_signing_key ( NTLM_CONTEXT context)

Generate server signing key (ServerSigningKey). msdn{cc236711}

Parameters
contextA pointer to the NTLM context
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_generate_timestamp()

void ntlm_generate_timestamp ( NTLM_CONTEXT context)

Generate timestamp for AUTHENTICATE_MESSAGE.

Parameters
contextA pointer to the NTLM context
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_get_version_info()

BOOL ntlm_get_version_info ( NTLM_VERSION_INFO versionInfo)

WinPR: Windows Portable Runtime NTLM Security Package (Compute)

Copyright 2011-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Populate VERSION structure msdn{cc236654}

Parameters
versionInfoA pointer to the version struct
Returns
TRUE for success, FALSE for failure
Here is the caller graph for this function:

◆ ntlm_init_rc4_seal_states()

BOOL ntlm_init_rc4_seal_states ( NTLM_CONTEXT context)

Initialize RC4 stream cipher states for sealing.

Parameters
contextA pointer to the NTLM context
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_output_channel_bindings()

void ntlm_output_channel_bindings ( NTLM_CONTEXT context)

◆ ntlm_output_target_name()

void ntlm_output_target_name ( NTLM_CONTEXT context)

◆ ntlm_rc4k()

void ntlm_rc4k ( BYTE key,
size_t  length,
BYTE plaintext,
BYTE ciphertext 
)

Encrypt the given plain text using RC4 and the given key.

Parameters
keyRC4 key
lengthtext length
plaintextplain text
ciphertextcipher text
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_ntlm_v2_response()

BOOL ntlm_read_ntlm_v2_response ( wStream s,
NTLMv2_RESPONSE response 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_version_info()

BOOL ntlm_read_version_info ( wStream s,
NTLM_VERSION_INFO versionInfo 
)

Read VERSION structure. msdn{cc236654}

Parameters
sA pointer to a stream to read
versionInfoA pointer to the struct to read data to
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_ntlm_v2_response()

BOOL ntlm_write_ntlm_v2_response ( wStream s,
const NTLMv2_RESPONSE response 
)
Here is the call graph for this function:

◆ ntlm_write_version_info()

BOOL ntlm_write_version_info ( wStream s,
const NTLM_VERSION_INFO versionInfo 
)

Write VERSION structure. msdn{cc236654}

Parameters
sA pointer to the stream to write to
versionInfoA pointer to the buffer to read the data from
Returns
TRUE for success, FALSE for failure
Here is the call graph for this function:
Here is the caller graph for this function: