/[openpgpmdrv]/trunk/OpenPGPminidriver/CryptoOperations.h
ViewVC logotype

Annotation of /trunk/OpenPGPminidriver/CryptoOperations.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (hide annotations)
Thu Feb 25 22:09:17 2010 UTC (15 years, 2 months ago) by vletoux
File MIME type: text/plain
File size: 1962 byte(s)
fixed public key export (big endian - little endian issue)
signature works (sign & verify)
decrypt really decrypt but output not recognized yet by cryptoapi
1 vletoux 1 /* OpenPGP Smart Card Mini Driver
2     Copyright (C) 2009 Vincent Le Toux
3    
4     This library is Free software; you can redistribute it and/or
5     modify it under the terms of the GNU Lesser General Public
6     License version 2.1 as published by the Free Software Foundation.
7    
8     This library is distributed in the hope that it will be useful,
9     but WITHOUT ANY WARRANTY; without even the implied warranty of
10     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11     Lesser General Public License for more details.
12    
13     You should have received a copy of the GNU Lesser General Public
14     License along with this library; if not, write to the Free Software
15     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16     */
17    
18     typedef enum _OPENPGP_CONTAINER
19     {
20     Signature,
21     Authentication,
22     Confidentiality,
23     MaxContainer
24     } OPENPGP_CONTAINER;
25    
26     typedef struct _OPENPGP_CONTAINER_INFO
27     {
28 vletoux 3 BYTE bKeyTag;
29     BYTE bDateTimeTag;
30     BYTE bSignatureTag;
31     ALG_ID aiKeyAlg;
32     DWORD dwKeySpec;
33 vletoux 1 PIN_ID PinId;
34     } OPENPGP_CONTAINER_INFO, *POPENPGP_CONTAINER_INFO;
35    
36     extern OPENPGP_CONTAINER_INFO Containers[];
37    
38     #define OPENPGP_SUPPORTED_CYPHER_ALGORITHM L"\0"
39     #define OPENPGP_SUPPORTED_ASYMETRIC_ALGORITHM L"RSA\0"
40    
41     DWORD SCardReadPublicKey(PCARD_DATA pCardData,
42     OPENPGP_CONTAINER dwContainer,
43     PBYTE *pbPublicKey, PDWORD pdwPublicKeySize);
44    
45     DWORD SCardCreateKey(PCARD_DATA pCardData, OPENPGP_CONTAINER dwContainer, DWORD dwBitLen);
46    
47     DWORD SCardImportKey(PCARD_DATA pCardData,
48     OPENPGP_CONTAINER dwContainer,
49     PBYTE pBlob,
50     DWORD dwKeySize);
51    
52     DWORD SCardSign(PCARD_DATA pCardData,
53     PCARD_SIGNING_INFO pInfo);
54    
55     DWORD SCardDecrypt(PCARD_DATA pCardData,
56     PCARD_RSA_DECRYPT_INFO pInfo);
57    
58     DWORD SCardAuthenticate(PCARD_DATA pCardData,
59     PCARD_SIGNING_INFO pInfo);
60    
61     DWORD GetPinInfo(DWORD __in bContainerIndex, __inout PPIN_INFO pPinInfo);

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26