ReactOS 0.4.16-dev-334-g4d9f67c
ksecdd.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Drivers
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: Kernel Security Support Provider Interface Driver
5 *
6 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9#define _NO_KSECDD_IMPORT_
10#include <ntifs.h>
11#include <ndk/exfuncs.h>
12#include <ndk/ketypes.h>
13#include <pseh/pseh2.h>
14#include <ntstrsafe.h>
15
16#include <md4.h>
17#include <md5.h>
18#include <tomcrypt.h>
21
22#define STATUS_KSEC_INTERNAL_ERROR ((NTSTATUS)0x80090304)
23
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
28
30{
37
38#if defined(_M_IX86) || defined(_M_AMD64)
39typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
40{
41 ULONG64 Tsc;
42 ULONG64 Pmc0;
43 ULONG64 Pmc1;
44 ULONG64 Ctr0;
45 ULONG64 Ctr1;
47#elif defined(_M_ARM)
48typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
49{
50 ULONG Ccr;
52#else
54#endif
55
56typedef struct _KSEC_ENTROPY_DATA
57{
73
76
81 PIRP Irp);
82
86 PKSEC_ENTROPY_DATA EntropyData);
87
93
94VOID
97 VOID);
98
100NTAPI
104 _In_ ULONG OptionFlags);
105
107NTAPI
111 _In_ ULONG OptionFlags);
112
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
aes_key AES_KEY
Definition: ksecdd.h:19
ULONG KSEC_MACHINE_SPECIFIC_COUNTERS
Definition: ksecdd.h:53
struct _KSEC_CONNECTION_INFO KSEC_CONNECTION_INFO
struct _KSEC_ENTROPY_DATA * PKSEC_ENTROPY_DATA
HANDLE KsecLsaProcessHandle
NTSTATUS NTAPI KsecGenRandom(PVOID Buffer, SIZE_T Length)
Definition: random.c:26
des3_key DES3_KEY
Definition: ksecdd.h:20
ULONG * PKSEC_MACHINE_SPECIFIC_COUNTERS
Definition: ksecdd.h:53
NTSTATUS NTAPI KsecGatherEntropyData(PKSEC_ENTROPY_DATA EntropyData)
Definition: random.c:92
aes_key * PAES_KEY
Definition: ksecdd.h:19
NTSTATUS NTAPI KsecDecryptMemory(_Inout_ PVOID Buffer, _In_ ULONG Length, _In_ ULONG OptionFlags)
Definition: crypt.c:328
struct _KSEC_ENTROPY_DATA KSEC_ENTROPY_DATA
des3_key * PDES3_KEY
Definition: ksecdd.h:20
PEPROCESS KsecLsaProcess
NTSTATUS NTAPI KsecDdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: dispatch.c:184
VOID NTAPI KsecInitializeEncryptionSupport(VOID)
Definition: crypt.c:44
NTSTATUS NTAPI KsecEncryptMemory(_Inout_ PVOID Buffer, _In_ ULONG Length, _In_ ULONG OptionFlags)
Definition: crypt.c:293
unsigned __int64 ULONG64
Definition: imports.h:198
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
NTSTATUS Status
Definition: ksecdd.h:32
ULONG_PTR Information
Definition: ksecdd.h:33
CHAR ConnectionString[128]
Definition: ksecdd.h:34
SYSTEM_PROCESS_INFORMATION SystemProcessInformation
Definition: ksecdd.h:71
HANDLE CurrentProcessId
Definition: ksecdd.h:58
UCHAR EnvironmentHash[16]
Definition: ksecdd.h:64
KSEC_MACHINE_SPECIFIC_COUNTERS MachineSpecificCounters
Definition: ksecdd.h:65
SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorPerformanceInformation
Definition: ksecdd.h:66
LARGE_INTEGER TickCount
Definition: ksecdd.h:60
SYSTEM_EXCEPTION_INFORMATION SystemExceptionInformation
Definition: ksecdd.h:68
SYSTEM_PERFORMANCE_INFORMATION SystemPerformanceInformation
Definition: ksecdd.h:67
LARGE_INTEGER PerformanceFrequency
Definition: ksecdd.h:63
SYSTEM_INTERRUPT_INFORMATION SystemInterruptInformation
Definition: ksecdd.h:70
HANDLE CurrentThreadId
Definition: ksecdd.h:59
LARGE_INTEGER SystemTime
Definition: ksecdd.h:61
LARGE_INTEGER PerformanceCounter
Definition: ksecdd.h:62
SYSTEM_LOOKASIDE_INFORMATION SystemLookasideInformation
Definition: ksecdd.h:69
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175