2012-02-25 18:55:52 +04:00
|
|
|
/**
|
2012-05-22 06:48:33 +04:00
|
|
|
* WinPR: Windows Portable Runtime
|
2012-02-25 18:55:52 +04:00
|
|
|
* NTLM Security Package (Compute)
|
|
|
|
*
|
2014-06-07 08:17:11 +04:00
|
|
|
* Copyright 2011-2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
2012-02-25 18:55:52 +04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2012-05-22 06:48:33 +04:00
|
|
|
#ifndef WINPR_SSPI_NTLM_COMPUTE_H
|
|
|
|
#define WINPR_SSPI_NTLM_COMPUTE_H
|
2012-02-25 18:55:52 +04:00
|
|
|
|
|
|
|
#include "ntlm.h"
|
|
|
|
|
2012-03-19 04:30:20 +04:00
|
|
|
#include "ntlm_av_pairs.h"
|
|
|
|
|
2022-03-14 16:50:32 +03:00
|
|
|
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);
|
2022-01-13 18:21:51 +03:00
|
|
|
|
|
|
|
#ifdef WITH_DEBUG_NTLM
|
2022-03-14 16:50:32 +03:00
|
|
|
void ntlm_print_version_info(const NTLM_VERSION_INFO* versionInfo);
|
2022-01-13 18:21:51 +03:00
|
|
|
#endif
|
2012-06-29 22:31:32 +04:00
|
|
|
|
2022-03-14 16:50:32 +03:00
|
|
|
BOOL ntlm_read_ntlm_v2_response(wStream* s, NTLMv2_RESPONSE* response);
|
|
|
|
BOOL ntlm_write_ntlm_v2_response(wStream* s, const NTLMv2_RESPONSE* response);
|
2012-07-02 01:05:31 +04:00
|
|
|
|
2012-02-25 18:55:52 +04:00
|
|
|
void ntlm_output_target_name(NTLM_CONTEXT* context);
|
|
|
|
void ntlm_output_channel_bindings(NTLM_CONTEXT* context);
|
|
|
|
|
2012-05-25 06:40:46 +04:00
|
|
|
void ntlm_current_time(BYTE* timestamp);
|
2012-02-25 18:55:52 +04:00
|
|
|
void ntlm_generate_timestamp(NTLM_CONTEXT* context);
|
|
|
|
|
2022-03-14 16:50:32 +03:00
|
|
|
BOOL ntlm_compute_lm_v2_response(NTLM_CONTEXT* context);
|
|
|
|
BOOL ntlm_compute_ntlm_v2_response(NTLM_CONTEXT* context);
|
2012-02-25 18:55:52 +04:00
|
|
|
|
2021-06-17 12:25:58 +03:00
|
|
|
void ntlm_rc4k(BYTE* key, size_t length, BYTE* plaintext, BYTE* ciphertext);
|
2012-02-25 19:20:12 +04:00
|
|
|
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);
|
2012-03-19 06:02:23 +04:00
|
|
|
void ntlm_decrypt_random_session_key(NTLM_CONTEXT* context);
|
2012-02-25 19:20:12 +04:00
|
|
|
|
2022-03-14 16:50:32 +03:00
|
|
|
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);
|
2012-02-25 19:20:12 +04:00
|
|
|
void ntlm_init_rc4_seal_states(NTLM_CONTEXT* context);
|
|
|
|
|
2022-03-14 16:50:32 +03:00
|
|
|
BOOL ntlm_compute_message_integrity_check(NTLM_CONTEXT* context, BYTE* mic, UINT32 size);
|
2012-02-25 20:48:08 +04:00
|
|
|
|
2012-05-22 06:48:33 +04:00
|
|
|
#endif /* WINPR_AUTH_NTLM_COMPUTE_H */
|