ReactOS 0.4.15-dev-7842-g558ab78
implglue.h
Go to the documentation of this file.
1/*
2 * dlls/rsaenh/implglue.h
3 * Glueing the RSAENH specific code to the crypto library
4 *
5 * Copyright (c) 2004 Michael Jung
6 *
7 * based on code by Mike McCormack and David Hammerton
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef __WINE_IMPLGLUE_H
25#define __WINE_IMPLGLUE_H
26
27#include "tomcrypt.h"
28#include "sha2.h"
29
30/* Next typedef copied from dlls/advapi32/crypt_md4.c */
31typedef struct tagMD4_CTX {
32 unsigned int buf[4];
33 unsigned int i[2];
34 unsigned char in[64];
35 unsigned char digest[16];
37
38/* Next typedef copied from dlls/advapi32/crypt_md5.c */
39typedef struct tagMD5_CTX
40{
41 unsigned int i[2];
42 unsigned int buf[4];
43 unsigned char in[64];
44 unsigned char digest[16];
46
47/* Next typedef copied form dlls/advapi32/crypt_sha.c */
48typedef struct tagSHA_CTX
49{
55
56typedef union tagHASH_CONTEXT {
65
66typedef union tagKEY_CONTEXT {
74
76BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pbData,
77 DWORD dwDataLen) DECLSPEC_HIDDEN;
78BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHashValue) DECLSPEC_HIDDEN;
79BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext,
80 HASH_CONTEXT *pDestHashContext) DECLSPEC_HIDDEN;
81
82BOOL new_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen) DECLSPEC_HIDDEN;
84BOOL setup_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
85 DWORD dwEffectiveKeyLen, DWORD dwSaltLen, BYTE *abKeyValue) DECLSPEC_HIDDEN;
86BOOL duplicate_key_impl(ALG_ID aiAlgid, const KEY_CONTEXT *pSrcKeyContext,
87 KEY_CONTEXT *pDestKeyContext) DECLSPEC_HIDDEN;
88
89/* dwKeySpec is optional for symmetric key algorithms */
90BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, const BYTE *pbIn,
91 BYTE *pbOut, DWORD enc) DECLSPEC_HIDDEN;
92BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD dwLen) DECLSPEC_HIDDEN;
93
94BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
95 DWORD *pdwPubExp) DECLSPEC_HIDDEN;
96BOOL import_public_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
97 DWORD dwPubExp) DECLSPEC_HIDDEN;
98BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
99 DWORD *pdwPubExp) DECLSPEC_HIDDEN;
100BOOL import_private_key_impl(const BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
101 DWORD dwDataLen, DWORD dwPubExp) DECLSPEC_HIDDEN;
102
104
105#endif /* __WINE_IMPLGLUE_H */
Definition: bufpool.h:45
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint in
Definition: glext.h:9616
BOOL import_public_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwPubExp) DECLSPEC_HIDDEN
Definition: implglue.c:412
BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHashValue) DECLSPEC_HIDDEN
Definition: implglue.c:131
BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, const BYTE *pbIn, BYTE *pbOut, DWORD enc) DECLSPEC_HIDDEN
Definition: implglue.c:303
struct tagMD4_CTX MD4_CTX
BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD dwLen) DECLSPEC_HIDDEN
Definition: implglue.c:381
BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp) DECLSPEC_HIDDEN
Definition: implglue.c:401
struct tagSHA_CTX * PSHA_CTX
union tagHASH_CONTEXT HASH_CONTEXT
BOOL import_private_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwDataLen, DWORD dwPubExp) DECLSPEC_HIDDEN
Definition: implglue.c:487
BOOL free_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext) DECLSPEC_HIDDEN
Definition: implglue.c:197
BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext, HASH_CONTEXT *pDestHashContext) DECLSPEC_HIDDEN
Definition: implglue.c:173
union tagKEY_CONTEXT KEY_CONTEXT
BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pbData, DWORD dwDataLen) DECLSPEC_HIDDEN
Definition: implglue.c:90
BOOL new_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen) DECLSPEC_HIDDEN
Definition: implglue.c:181
struct tagMD5_CTX MD5_CTX
BOOL setup_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwEffectiveKeyLen, DWORD dwSaltLen, BYTE *abKeyValue) DECLSPEC_HIDDEN
Definition: implglue.c:209
struct tagSHA_CTX SHA_CTX
BOOL duplicate_key_impl(ALG_ID aiAlgid, const KEY_CONTEXT *pSrcKeyContext, KEY_CONTEXT *pDestKeyContext) DECLSPEC_HIDDEN
Definition: implglue.c:255
BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext) DECLSPEC_HIDDEN
Definition: implglue.c:54
BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp) DECLSPEC_HIDDEN
Definition: implglue.c:438
BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen) DECLSPEC_HIDDEN
Definition: implglue.c:396
unsigned char digest[16]
Definition: implglue.h:35
unsigned int i[2]
Definition: implglue.h:33
unsigned char digest[16]
Definition: implglue.h:44
unsigned int i[2]
Definition: implglue.h:41
ULONG Count[2]
Definition: implglue.h:52
ULONG Unknown[6]
Definition: implglue.h:50
uint32_t ULONG
Definition: typedefs.h:59
SHA512_CTX sha512
Definition: implglue.h:63
SHA_CTX sha
Definition: implglue.h:60
md2_state md2
Definition: implglue.h:57
MD5_CTX md5
Definition: implglue.h:59
SHA256_CTX sha256
Definition: implglue.h:61
SHA384_CTX sha384
Definition: implglue.h:62
MD4_CTX md4
Definition: implglue.h:58
des3_key des3
Definition: implglue.h:69
prng_state rc4
Definition: implglue.h:71
rsa_key rsa
Definition: implglue.h:72
aes_key aes
Definition: implglue.h:70
des_key des
Definition: implglue.h:68
rc2_key rc2
Definition: implglue.h:67
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
Definition: wincrypt.h:4201
unsigned int ALG_ID
Definition: wincrypt.h:45
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned char BYTE
Definition: xxhash.c:193