2
* FreeRDP: A Remote Desktop Protocol Client
5
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
26
#include <freerdp/freerdp.h>
27
#include <freerdp/utils/stream.h>
29
void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output);
30
void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output);
31
void security_mac_salt_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output);
32
void security_licensing_encryption_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output);
33
void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* output);
35
void security_mac_signature(uint8* mac_key, int mac_key_length, uint8* data, uint32 length, uint8* output);
36
boolean security_establish_keys(uint8* client_random, rdpRdp* rdp);
38
boolean security_encrypt(uint8* data, int length, rdpRdp* rdp);
39
boolean security_decrypt(uint8* data, int length, rdpRdp* rdp);
41
void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp);
42
boolean security_fips_encrypt(uint8* data, int length, rdpRdp* rdp);
43
boolean security_fips_decrypt(uint8* data, int length, rdpRdp* rdp);
44
boolean security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp);
46
#endif /* __SECURITY_H */