2 * PROJECT: ReactOS Drivers
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: Kernel Security Support Provider Interface Driver
6 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
9 #define _NO_KSECDD_IMPORT_
11 #include <ndk/exfuncs.h>
12 #include <ndk/ketypes.h>
13 #include <pseh/pseh2.h>
14 #include <ntstrsafe.h>
19 typedef aes_key AES_KEY
, *PAES_KEY
;
20 typedef des3_key DES3_KEY
, *PDES3_KEY
;
22 #define STATUS_KSEC_INTERNAL_ERROR ((NTSTATUS)0x80090304)
24 /* FIXME: this should be in some shared header */
25 #define RTL_ENCRYPT_OPTION_SAME_PROCESS 0
26 #define RTL_ENCRYPT_OPTION_CROSS_PROCESS 1
27 #define RTL_ENCRYPT_OPTION_SAME_LOGON 2
29 typedef struct _KSEC_CONNECTION_INFO
33 ULONG_PTR Information
;
34 CHAR ConnectionString
[128];
36 } KSEC_CONNECTION_INFO
;
38 #if defined(_M_IX86) || defined(_M_AMD64)
39 typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
46 } KSEC_MACHINE_SPECIFIC_COUNTERS
, *PKSEC_MACHINE_SPECIFIC_COUNTERS
;
48 typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
51 } KSEC_MACHINE_SPECIFIC_COUNTERS
, *PKSEC_MACHINE_SPECIFIC_COUNTERS
;
53 typedef ULONG KSEC_MACHINE_SPECIFIC_COUNTERS
, *PKSEC_MACHINE_SPECIFIC_COUNTERS
;
56 typedef struct _KSEC_ENTROPY_DATA
58 HANDLE CurrentProcessId
;
59 HANDLE CurrentThreadId
;
60 LARGE_INTEGER TickCount
;
61 LARGE_INTEGER SystemTime
;
62 LARGE_INTEGER PerformanceCounter
;
63 LARGE_INTEGER PerformanceFrequency
;
64 UCHAR EnvironmentHash
[16];
65 KSEC_MACHINE_SPECIFIC_COUNTERS MachineSpecificCounters
;
66 SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorPerformanceInformation
;
67 SYSTEM_PERFORMANCE_INFORMATION SystemPerformanceInformation
;
68 SYSTEM_EXCEPTION_INFORMATION SystemExceptionInformation
;
69 SYSTEM_LOOKASIDE_INFORMATION SystemLookasideInformation
;
70 SYSTEM_INTERRUPT_INFORMATION SystemInterruptInformation
;
71 SYSTEM_PROCESS_INFORMATION SystemProcessInformation
;
72 } KSEC_ENTROPY_DATA
, *PKSEC_ENTROPY_DATA
;
74 extern PEPROCESS KsecLsaProcess
;
75 extern HANDLE KsecLsaProcessHandle
;
80 PDEVICE_OBJECT DeviceObject
,
85 KsecGatherEntropyData(
86 PKSEC_ENTROPY_DATA EntropyData
);
96 KsecInitializeEncryptionSupport (
102 _Inout_ PVOID Buffer
,
104 _In_ ULONG OptionFlags
);
109 _Inout_ PVOID Buffer
,
111 _In_ ULONG OptionFlags
);