This file is indexed.

/usr/i686-w64-mingw32/include/ncrypt.h is in mingw-w64-i686-dev 2.0.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
/**
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is part of the w64 mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 */
#ifndef _INC_NCRYPT
#define _INC_NCRYPT
#if (_WIN32_WINNT >= 0x0600)

#ifdef __cplusplus
extern "C" {
#endif

#define NCRYPTBUFFER_SSL_CLIENT_RANDOM 20
#define NCRYPTBUFFER_SSL_SERVER_RANDOM 21
#define NCRYPTBUFFER_SSL_HIGHEST_VERSION 22
#define NCRYPTBUFFER_SSL_CLEAR_KEY 23
#define NCRYPTBUFFER_SSL_KEY_ARG_DATA 24
#define NCRYPTBUFFER_PKCS_OID 40
#define NCRYPTBUFFER_PKCS_ALG_OID 41
#define NCRYPTBUFFER_PKCS_ALG_PARAM 42
#define NCRYPTBUFFER_PKCS_ALG_ID 43
#define NCRYPTBUFFER_PKCS_ATTRS 44
#define NCRYPTBUFFER_PKCS_KEY_NAME 45
#define NCRYPTBUFFER_PKCS_SECRET 46
#define NCRYPTBUFFER_CERT_BLOB 47

#ifndef __SECSTATUS_DEFINED__
  typedef LONG SECURITY_STATUS;
#define __SECSTATUS_DEFINED__
#endif

#ifndef __NCRYPT_KEY_HANDLE__
#define __NCRYPT_KEY_HANDLE__
/*in wincrypt.h too*/
typedef ULONG_PTR NCRYPT_KEY_HANDLE;
#endif

typedef ULONG_PTR NCRYPT_PROV_HANDLE;
typedef ULONG_PTR NCRYPT_SECRET_HANDLE;
typedef ULONG_PTR NCRYPT_HANDLE;

#ifndef __HCRYPTKEY__
#define __HCRYPTKEY__
/* In wincrypt.h too */
  typedef ULONG_PTR HCRYPTPROV;
  typedef ULONG_PTR HCRYPTKEY;
#endif

typedef struct _NCryptBuffer {
  ULONG cbBuffer;
  ULONG BufferType;
  PVOID pvBuffer;
} NCryptBuffer, *PNCryptBuffer;

typedef struct _NCryptBufferDesc {
  ULONG         ulVersion;
  ULONG         cBuffers;
  PNCryptBuffer pBuffers;
} NCryptBufferDesc, *PNCryptBufferDesc;

typedef struct __NCRYPT_SUPPORTED_LENGTHS {
  DWORD dwMinLength;
  DWORD dwMaxLength;
  DWORD dwIncrement;
  DWORD dwDefaultLength;
} NCRYPT_SUPPORTED_LENGTHS;

#define NCRYPT_UI_PROTECT_KEY_FLAG 0x00000001
#define NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG 0x00000002

typedef struct __NCRYPT_UI_POLICY {
  DWORD   dwVersion;
  DWORD   dwFlags;
  LPCWSTR pszCreationTitle;
  LPCWSTR pszFriendlyName;
  LPCWSTR pszDescription;
} NCRYPT_UI_POLICY;

typedef struct __NCRYPT_UI_POLICY_BLOB {
  DWORD dwVersion;
  DWORD dwFlags;
  DWORD cbCreationTitle;
  DWORD cbFriendlyName;
  DWORD cbDescription;
} NCRYPT_UI_POLICY_BLOB;

typedef struct NCryptKeyName {
  LPWSTR pszName;
  LPWSTR pszAlgid;
  DWORD  dwLegacyKeySpec;
  DWORD  dwFlags;
} NCryptKeyName;

#define NCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE 0x00000003
#define NCRYPT_SECRET_AGREEMENT_INTERFACE 0x00000004
#define NCRYPT_SIGNATURE_INTERFACE 0x00000005

#define NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION 0x00000004
#define NCRYPT_SECRET_AGREEMENT_OPERATION 0x00000008
#define NCRYPT_SIGNATURE_OPERATION 0x00000010

typedef struct _NCryptAlgorithmName {
  LPWSTR pszName;
  DWORD  dwClass;
  DWORD  dwAlgOperations;
  DWORD  dwFlags;
} NCryptAlgorithmName;

typedef struct NCryptProviderName {
  LPWSTR pszName;
  LPWSTR pszComment;
} NCryptProviderName;

SECURITY_STATUS WINAPI NCryptExportKey(
  NCRYPT_KEY_HANDLE hKey,
  NCRYPT_KEY_HANDLE hExportKey,
  LPCWSTR pszBlobType,
  NCryptBufferDesc *pParameterList,
  PBYTE pbOutput,
  DWORD cbOutput,
  DWORD *pcbResult,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptCreatePersistedKey(
  NCRYPT_PROV_HANDLE hProvider,
  NCRYPT_KEY_HANDLE *phKey,
  LPCWSTR pszAlgId,
  LPCWSTR pszKeyName,
  DWORD dwLegacyKeySpec,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptDecrypt(
  NCRYPT_KEY_HANDLE hKey,
  PBYTE pbInput,
  DWORD cbInput,
  VOID *pPaddingInfo,
  PBYTE pbOutput,
  DWORD cbOutput,
  DWORD *pcbResult,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptDeleteKey(
  NCRYPT_KEY_HANDLE hKey,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptDeriveKey(
  NCRYPT_SECRET_HANDLE hSharedSecret,
  LPCWSTR pwszKDF,
  NCryptBufferDesc *pParameterList,
  PBYTE pbDerivedKey,
  DWORD cbDerivedKey,
  DWORD *pcbResult,
  ULONG dwFlags
);

SECURITY_STATUS WINAPI NCryptEncrypt(
  NCRYPT_KEY_HANDLE hKey,
  PBYTE pbInput,
  DWORD cbInput,
  VOID *pPaddingInfo,
  PBYTE pbOutput,
  DWORD cbOutput,
  DWORD *pcbResult,
  DWORD dwFlags
);

#define NCRYPT_CIPHER_OPERATION 0x00000001
#define NCRYPT_HASH_OPERATION 0x00000002
#define NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION 0x00000004
#define NCRYPT_SECRET_AGREEMENT_OPERATION 0x00000008
#define NCRYPT_SIGNATURE_OPERATION 0x00000010
#define NCRYPT_RNG_OPERATION 0x00000020

SECURITY_STATUS WINAPI NCryptEnumAlgorithms(
  NCRYPT_PROV_HANDLE hProvider,
  DWORD dwAlgOperations,
  DWORD *pdwAlgCount,
  NCryptAlgorithmName **ppAlgList,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptEnumKeys(
  NCRYPT_PROV_HANDLE hProvider,
  LPCWSTR pszScope,
  NCryptKeyName **ppKeyName,
  PVOID *ppEnumState,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptEnumStorageProviders(
  DWORD *pdwProviderCount,
  NCryptProviderName **ppProviderList,
  DWORD dwFlags
);

SECURITY_STATUS NCryptFinalizeKey(
  NCRYPT_KEY_HANDLE hKey,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptFreeBuffer(
  PVOID pvInput
);

SECURITY_STATUS WINAPI NCryptFreeObject(
  NCRYPT_HANDLE hObject
);

SECURITY_STATUS WINAPI NCryptGetProperty(
  NCRYPT_HANDLE hObject,
  LPCWSTR pszProperty,
  PBYTE pbOutput,
  DWORD cbOutput,
  DWORD *pcbResult,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptImportKey(
  NCRYPT_PROV_HANDLE hProvider,
  NCRYPT_KEY_HANDLE hImportKey,
  LPCWSTR pszBlobType,
  NCryptBufferDesc *pParameterList,
  NCRYPT_KEY_HANDLE *phKey,
  PBYTE pbData,
  DWORD cbData,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptIsAlgSupported(
  NCRYPT_PROV_HANDLE hProvider,
  LPCWSTR pszAlgId,
  DWORD dwFlags
);

WINBOOL WINAPI NCryptIsKeyHandle(
  NCRYPT_KEY_HANDLE hKey
);

SECURITY_STATUS WINAPI NCryptNotifyChangeKey(
  NCRYPT_PROV_HANDLE hProvider,
  HANDLE *phEvent,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptOpenKey(
  NCRYPT_PROV_HANDLE hProvider,
  NCRYPT_KEY_HANDLE *phKey,
  LPCWSTR pszKeyName,
  DWORD dwLegacyKeySpec,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptOpenStorageProvider(
  NCRYPT_PROV_HANDLE *phProvider,
  LPCWSTR pszProviderName,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptSecretAgreement(
  NCRYPT_KEY_HANDLE hPrivKey,
  NCRYPT_KEY_HANDLE hPubKey,
  NCRYPT_SECRET_HANDLE *phSecret,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptSetProperty(
  NCRYPT_HANDLE hObject,
  LPCWSTR pszProperty,
  PBYTE pbInput,
  DWORD cbInput,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptSignHash(
  NCRYPT_KEY_HANDLE hKey,
  VOID *pPaddingInfo,
  PBYTE pbHashValue,
  DWORD cbHashValue,
  PBYTE pbSignature,
  DWORD cbSignature,
  DWORD *pcbResult,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptTranslateHandle(
  NCRYPT_PROV_HANDLE *phProvider,
  NCRYPT_KEY_HANDLE *phKey,
  HCRYPTPROV hLegacyProv,
  HCRYPTKEY hLegacyKey,
  DWORD dwLegacyKeySpec,
  DWORD dwFlags
);

SECURITY_STATUS WINAPI NCryptVerifySignature(
  NCRYPT_KEY_HANDLE hKey,
  VOID *pPaddingInfo,
  PBYTE pbHashValue,
  DWORD cbHashValue,
  PBYTE pbSignature,
  DWORD cbSignature,
  DWORD dwFlags
);

#ifdef __cplusplus
}
#endif
#endif /*(_WIN32_WINNT >= 0x0600)*/
#endif /*_INC_NCRYPT*/