|
1 /* |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @@internalComponent |
|
22 @released |
|
23 */ |
|
24 |
|
25 #ifndef __CRYPTOAPI_SOFTWAREPLUGINCONFIG_H__ |
|
26 #define __CRYPTOAPI_SOFTWAREPLUGINCONFIG_H__ |
|
27 |
|
28 #include <cryptospi/cryptoparams.h> |
|
29 #include <e32cmn.h> |
|
30 #include <cryptospi/romlit.h> |
|
31 #include <cryptospi/cryptospidef.h> |
|
32 |
|
33 namespace SoftwareCrypto |
|
34 { |
|
35 using namespace CryptoSpi; |
|
36 |
|
37 /** |
|
38 Creator Name |
|
39 */ |
|
40 _ROMLIT16(KSymbian, "Symbian"); |
|
41 |
|
42 /** |
|
43 implementation Name |
|
44 */ |
|
45 _ROMLIT16(KMd2Description, "Md2"); |
|
46 _ROMLIT16(KMd4Description, "Md4"); |
|
47 _ROMLIT16(KMd5Description, "Md5"); |
|
48 _ROMLIT16(KSha1Description, "Sha1"); |
|
49 _ROMLIT16(KSha224Description, "Sha224"); |
|
50 _ROMLIT16(KSha256Description, "Sha256"); |
|
51 _ROMLIT16(KSha384Description, "Sha384"); |
|
52 _ROMLIT16(KSha512Description, "Sha512"); |
|
53 |
|
54 _ROMLIT16(KRandomDescription, "Random"); |
|
55 _ROMLIT16(KDesDescription, "Des"); |
|
56 _ROMLIT16(K3DesDescription, "3Des"); |
|
57 _ROMLIT16(KAesDescription, "Aes"); |
|
58 _ROMLIT16(KRC2Description, "RC2"); |
|
59 _ROMLIT16(KARC4Description, "ARC4"); |
|
60 _ROMLIT16(KRsaCipherDescription, "Rsa"); |
|
61 _ROMLIT16(KRsaSignerDescription, "RsaSigner"); |
|
62 _ROMLIT16(KDsaSignerDescription, "DsaSigner"); |
|
63 _ROMLIT16(KRsaVerifierDescription, "RsaVerifier"); |
|
64 _ROMLIT16(KDsaVerifierDescription, "DsaVerifier"); |
|
65 _ROMLIT16(KDHDescription, "DH"); |
|
66 _ROMLIT16(KSymmetricKeyGeneratorDescription, "Symmetric Key Generator"); |
|
67 _ROMLIT16(KRsaKeyPairDescription, "Rsa Key Pair Generator"); |
|
68 _ROMLIT16(KDsaKeyPairDescription, "Dsa Key Pair Generator"); |
|
69 _ROMLIT16(KDhKeyPairDescription, "DH Key Pair Generator"); |
|
70 /** |
|
71 For each crypto algorithm implemented in this plugin define |
|
72 a plugin-wide unique id to identify it |
|
73 a UID that contains the above id |
|
74 a table of characteristics |
|
75 */ |
|
76 |
|
77 |
|
78 /** |
|
79 Md2 Characteristics |
|
80 */ |
|
81 static const TInt32 KCryptoPluginMd2 = 0x102831D0; |
|
82 static const TUid KCryptoPluginMd2Uid={KCryptoPluginMd2}; |
|
83 static const TInt32 KMd2OperationModes[]={KHashMode, KHmacMode}; |
|
84 static const THashCharacteristics KMd2_1 = {KHashInterface, KAlgorithmHashMd2, KCryptoPluginMd2, &KSymbian, EFalse, EFalse, 6, &KMd2Description, 100, 90, 128, 128, KMd2OperationModes, sizeof(KMd2OperationModes)/sizeof(KMd2OperationModes[0])}; |
|
85 |
|
86 /** |
|
87 Md5 Characteristics |
|
88 */ |
|
89 static const TInt32 KCryptoPluginMd5 = 0x102831D1; |
|
90 static const TUid KCryptoPluginMd5Uid={KCryptoPluginMd5}; |
|
91 static const TInt32 KMd5OperationModes[]={KHashMode, KHmacMode}; |
|
92 static const THashCharacteristics KMd5_1 = {KHashInterface, KAlgorithmHashMd5, KCryptoPluginMd5, &KSymbian, EFalse, EFalse, 6, &KMd5Description, 100, 90, 512, 128, KMd5OperationModes, sizeof(KMd5OperationModes)/sizeof(KMd5OperationModes[0])}; |
|
93 |
|
94 /** |
|
95 Sha1 Characteristics |
|
96 */ |
|
97 static const TInt32 KCryptoPluginSha1 = 0x102831D2; |
|
98 static const TUid KCryptoPluginSha1Uid={KCryptoPluginSha1}; |
|
99 static const TInt32 KSha1OperationModes[]={KHashMode, KHmacMode}; |
|
100 static const THashCharacteristics KSha1_1 = {KHashInterface, KAlgorithmHashSha1, KCryptoPluginSha1, &KSymbian, EFalse, EFalse, 6, &KSha1Description, 100, 90, 512, 160, KSha1OperationModes, sizeof(KSha1OperationModes)/sizeof(KSha1OperationModes[0])}; |
|
101 |
|
102 /** |
|
103 Md4 Characteristics |
|
104 */ |
|
105 static const TInt32 KCryptoPluginMd4 = 0x2000B340; |
|
106 static const TUid KCryptoPluginMd4Uid={KCryptoPluginMd4}; |
|
107 static const TInt32 KMd4OperationModes[]={KHashMode, KHmacMode}; |
|
108 static const THashCharacteristics KMd4_1 = {KHashInterface, KAlgorithmHashMd4, KCryptoPluginMd4, &KSymbian, EFalse, EFalse, 6, &KMd4Description, 100, 90, 512, 128, KMd4OperationModes, sizeof(KMd4OperationModes)/sizeof(KMd4OperationModes[0])}; |
|
109 |
|
110 /** |
|
111 Sha224 Characteristics |
|
112 */ |
|
113 static const TInt32 KCryptoPluginSha224 = 0x2000E25C; |
|
114 static const TUid KCryptoPluginSha224Uid={KCryptoPluginSha224}; |
|
115 static const TInt32 KSha224OperationModes[]={KHashMode, KHmacMode}; |
|
116 static const THashCharacteristics KSha224_1 = {KHashInterface, KAlgorithmHashSha224, KCryptoPluginSha224, &KSymbian, EFalse, EFalse, 6, &KSha224Description, 100, 90, 512, 224, KSha224OperationModes, sizeof(KSha224OperationModes)/sizeof(KSha224OperationModes[0])}; |
|
117 |
|
118 /** |
|
119 Sha256 Characteristics |
|
120 */ |
|
121 static const TInt32 KCryptoPluginSha256 = 0x2000E25D; |
|
122 static const TUid KCryptoPluginSha256Uid={KCryptoPluginSha256}; |
|
123 static const TInt32 KSha256OperationModes[]={KHashMode, KHmacMode}; |
|
124 static const THashCharacteristics KSha256_1 = {KHashInterface, KAlgorithmHashSha256, KCryptoPluginSha256, &KSymbian, EFalse, EFalse, 6, &KSha256Description, 100, 90, 512, 256, KSha256OperationModes, sizeof(KSha256OperationModes)/sizeof(KSha256OperationModes[0])}; |
|
125 |
|
126 /** |
|
127 Sha384 Characteristics |
|
128 */ |
|
129 static const TInt32 KCryptoPluginSha384 = 0x2000E25E; |
|
130 static const TUid KCryptoPluginSha384Uid={KCryptoPluginSha384}; |
|
131 static const TInt32 KSha384OperationModes[]={KHashMode, KHmacMode}; |
|
132 static const THashCharacteristics KSha384_1 = {KHashInterface, KAlgorithmHashSha384, KCryptoPluginSha384, &KSymbian, EFalse, EFalse, 6, &KSha384Description, 100, 90, 1024, 384, KSha384OperationModes, sizeof(KSha384OperationModes)/sizeof(KSha384OperationModes[0])}; |
|
133 |
|
134 /** |
|
135 Sha512 Characteristics |
|
136 */ |
|
137 static const TInt32 KCryptoPluginSha512 = 0x2000E25F; |
|
138 static const TUid KCryptoPluginSha512Uid={KCryptoPluginSha512}; |
|
139 static const TInt32 KSha512OperationModes[]={KHashMode, KHmacMode}; |
|
140 static const THashCharacteristics KSha512_1 = {KHashInterface, KAlgorithmHashSha512, KCryptoPluginSha512, &KSymbian, EFalse, EFalse, 6, &KSha512Description, 100, 90, 1024, 512, KSha512OperationModes, sizeof(KSha512OperationModes)/sizeof(KSha512OperationModes[0])}; |
|
141 |
|
142 |
|
143 /** |
|
144 Random Characteristics |
|
145 */ |
|
146 static const TInt32 KCryptoPluginRandom = 0x102831D3; |
|
147 static const TUid KCryptoPluginRandomUid={KCryptoPluginRandom}; |
|
148 static const TRandomCharacteristics KRandom_1 = {KRandomInterface, KAlgorithmRandom, KCryptoPluginRandom, &KSymbian, EFalse, EFalse, 6, &KRandomDescription, 100, 90, 3}; |
|
149 |
|
150 |
|
151 |
|
152 /** |
|
153 DES Characteristics |
|
154 */ |
|
155 static const TInt32 KCryptoPluginDes = 0x102831D4; |
|
156 static const TUid KCryptoPluginDesUid={KCryptoPluginDes}; |
|
157 static const TInt32 KDesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7}; |
|
158 static const TInt32 KDesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC, KOperationModeCTR}; |
|
159 |
|
160 static const TSymmetricCipherCharacteristics KDes_1 = {KSymmetricCipherInterface, KAlgorithmCipherDes, KCryptoPluginDes, &KSymbian, EFalse, EFalse, 6, &KDesDescription, 100, 90, |
|
161 64 /* max key bits */, 64 /* block bits */, KDesPaddingModes, sizeof(KDesPaddingModes)/sizeof(KDesPaddingModes[0]), KDesCryptoModes, sizeof(KDesCryptoModes)/sizeof(KDesCryptoModes[0]), 3}; |
|
162 |
|
163 /** |
|
164 3DES-EDE Characteristics |
|
165 */ |
|
166 static const TInt32 KCryptoPlugin3Des = 0x102831D5; |
|
167 static const TUid KCryptoPlugin3DesUid={KCryptoPlugin3Des}; |
|
168 static const TInt32 K3DesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7}; |
|
169 static const TInt32 K3DesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC, KOperationModeCTR}; |
|
170 |
|
171 static const TSymmetricCipherCharacteristics K3Des_1 = {KSymmetricCipherInterface, KAlgorithmCipher3Des, KCryptoPlugin3Des, &KSymbian, EFalse, EFalse, 6, &K3DesDescription, 100, 90, |
|
172 192 /* max key bits */, 64 /* block bits */, K3DesPaddingModes, sizeof(K3DesPaddingModes)/sizeof(K3DesPaddingModes[0]), K3DesCryptoModes, sizeof(K3DesCryptoModes)/sizeof(K3DesCryptoModes[0]), 3}; |
|
173 |
|
174 /** |
|
175 AES Characteristics |
|
176 */ |
|
177 static const TInt32 KCryptoPluginAes = 0x102831D6; |
|
178 static const TUid KCryptoPluginAesUid={KCryptoPluginAes}; |
|
179 static const TInt32 KAesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7}; |
|
180 static const TInt32 KAesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC, KOperationModeCTR}; |
|
181 |
|
182 static const TSymmetricCipherCharacteristics KAes_1 = {KSymmetricCipherInterface, KAlgorithmCipherAes, KCryptoPluginAes, &KSymbian, EFalse, EFalse, 6, &KAesDescription, 100, 90, |
|
183 256 /* max key bits */, 128 /* block bits */, KAesPaddingModes, sizeof(KAesPaddingModes)/sizeof(KAesPaddingModes[0]), KAesCryptoModes, sizeof(KAesCryptoModes)/sizeof(KAesCryptoModes[0]), 3}; |
|
184 |
|
185 |
|
186 /** |
|
187 RC2 Characteristics |
|
188 */ |
|
189 static const TInt32 KCryptoPluginRc2 = 0x102831D7; |
|
190 static const TUid KCryptoPluginRc2Uid={KCryptoPluginRc2}; |
|
191 static const TInt32 KRc2PaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7}; |
|
192 static const TInt32 KRc2CryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC, KOperationModeCTR}; |
|
193 |
|
194 static const TSymmetricCipherCharacteristics KRc2_1 = {KSymmetricCipherInterface, KAlgorithmCipherRc2, KCryptoPluginRc2, &KSymbian, EFalse, EFalse, 6, &KRC2Description, 100, 90, |
|
195 1024 /* max key bits */, 64 /* block bits */, KRc2PaddingModes, sizeof(KRc2PaddingModes)/sizeof(KRc2PaddingModes[0]), KRc2CryptoModes, sizeof(KRc2CryptoModes)/sizeof(KRc2CryptoModes[0]), 3}; |
|
196 |
|
197 |
|
198 /** |
|
199 ARC4 Characteristics |
|
200 */ |
|
201 static const TInt32 KCryptoPluginArc4 = 0x102831D8; |
|
202 static const TUid KCryptoPluginArc4Uid={KCryptoPluginArc4}; |
|
203 static const TInt32 KArc4PaddingModes[]={KPaddingModeNone}; |
|
204 static const TInt32 KArc4CryptoModes[]={KOperationModeNone}; |
|
205 |
|
206 static const TSymmetricCipherCharacteristics KArc4_1 = {KSymmetricCipherInterface, KAlgorithmCipherArc4, KCryptoPluginArc4, &KSymbian, EFalse, EFalse, 6, &KARC4Description, 100, 90, |
|
207 2048 /* max key bits */, 8 /* block bits */, KArc4PaddingModes, sizeof(KArc4PaddingModes)/sizeof(KArc4PaddingModes[0]), KArc4CryptoModes, sizeof(KArc4CryptoModes)/sizeof(KArc4CryptoModes[0]), 3}; |
|
208 |
|
209 |
|
210 /** |
|
211 RSA Cipher Characteristics |
|
212 */ |
|
213 static const TInt32 KCryptoPluginRsaCipher = 0x102831D9; |
|
214 static const TUid KCryptoPluginRsaCipherUid={KCryptoPluginRsaCipher}; |
|
215 static const TInt32 KRSACipherPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Encryption}; |
|
216 |
|
217 static const TAsymmetricCipherCharacteristics KRSA_1 = {KAsymmetricCipherInterface, KAlgorithmCipherRsa, KCryptoPluginRsaCipher, &KSymbian, EFalse, EFalse, 6, &KRsaCipherDescription, 100, 90, |
|
218 256, KRSACipherPaddingModes, sizeof(KRSACipherPaddingModes)/sizeof(KRSACipherPaddingModes[0]), 3}; |
|
219 |
|
220 |
|
221 /** |
|
222 RSA Signer Characteristics |
|
223 */ |
|
224 static const TInt32 KCryptoPluginRsaSigner = 0x102831DA; |
|
225 static const TUid KCryptoPluginRsaSignerUid={KCryptoPluginRsaSigner}; |
|
226 static const TInt32 KRSASignerPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Signature}; |
|
227 |
|
228 static const TAsymmetricSignatureCharacteristics KRSASigner_1 = {KSignerInterface, KAlgorithmSignerRsa, KCryptoPluginRsaSigner, &KSymbian, EFalse, EFalse, 6, &KRsaSignerDescription, 100, 90, |
|
229 256, KRSASignerPaddingModes, sizeof(KRSASignerPaddingModes)/sizeof(KRSASignerPaddingModes[0]), 3}; |
|
230 |
|
231 /** |
|
232 DSA Signer Characteristics |
|
233 */ |
|
234 static const TInt32 KCryptoPluginDsaSigner = 0x102831DB; |
|
235 static const TUid KCryptoPluginDsaSignerUid={KCryptoPluginDsaSigner}; |
|
236 static const TInt32 KDSASignerPaddingModes[]={KPaddingModeNone}; |
|
237 |
|
238 static const TAsymmetricSignatureCharacteristics KDSASigner_1 = {KSignerInterface, KAlgorithmSignerDsa, KCryptoPluginDsaSigner, &KSymbian, EFalse, EFalse, 6, &KDsaSignerDescription, 100, 90, |
|
239 256, KDSASignerPaddingModes, sizeof(KDSASignerPaddingModes)/sizeof(KDSASignerPaddingModes[0]), 3}; |
|
240 |
|
241 |
|
242 /** |
|
243 RSA verifier Characteristics |
|
244 */ |
|
245 static const TInt32 KCryptoPluginRsaVerifier = 0x102831DC; |
|
246 static const TUid KCryptoPluginRsaVerifierUid={KCryptoPluginRsaVerifier}; |
|
247 static const TInt32 KRSAVerifierPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Signature}; |
|
248 |
|
249 static const TAsymmetricSignatureCharacteristics KRSAVerifier_1 = {KVerifierInterface, KAlgorithmVerifierRsa, KCryptoPluginRsaVerifier, &KSymbian, EFalse, EFalse, 6, &KRsaVerifierDescription, 100, 90, |
|
250 256, KRSAVerifierPaddingModes, sizeof(KRSAVerifierPaddingModes)/sizeof(KRSAVerifierPaddingModes[0]), 3}; |
|
251 |
|
252 /** |
|
253 DSA verifier Characteristics |
|
254 */ |
|
255 static const TInt32 KCryptoPluginDsaVerifier = 0x102831DD; |
|
256 static const TUid KCryptoPluginDsaVerifierUid={KCryptoPluginDsaVerifier}; |
|
257 static const TInt32 KDSAVerifierPaddingModes[]={KPaddingModeNone}; |
|
258 |
|
259 static const TAsymmetricSignatureCharacteristics KDSAVerifier_1 = {KVerifierInterface, KAlgorithmVerifierDsa, KCryptoPluginDsaVerifier, &KSymbian, EFalse, EFalse, 6, &KDsaVerifierDescription, 100, 90, |
|
260 256, KDSAVerifierPaddingModes, sizeof(KDSAVerifierPaddingModes)/sizeof(KDSAVerifierPaddingModes[0]), 3}; |
|
261 |
|
262 /** |
|
263 DH Key Agreement Characteristics |
|
264 */ |
|
265 static const TInt32 KCryptoPluginDhKeyAgreement = 0x102831DE; // used to identify the CKeyAgreementImpl derived class within the plugin to use |
|
266 static const TUid KCryptoPluginDhKeyAgreementUid={KCryptoPluginDhKeyAgreement}; // returned by the CKeyAgreementImpl derived class |
|
267 static const TKeyAgreementCharacteristics KDH_1 = {KKeyAgreementInterface, KAlgorithmKeyAgreementDH, KCryptoPluginDhKeyAgreement, &KSymbian, EFalse, EFalse, 6, &KDHDescription, 100, 90}; |
|
268 |
|
269 /** |
|
270 DH Key Pair Generator Characteristics |
|
271 */ |
|
272 static const TInt32 KCryptoPluginDhKeyPairGen = 0x102831DF; |
|
273 static const TUid KCryptoPluginDhKeyPairGenUid={KCryptoPluginDhKeyPairGen}; |
|
274 static const TAsymmetricKeypairGeneratorCharacteristics KDHKeyPairGenerator_1 = {KKeypairGeneratorInterface, KAlgorithmDHKeyPairGenerator, KCryptoPluginDhKeyPairGen, &KSymbian, EFalse, EFalse, 6, &KDhKeyPairDescription, 100, 90, 1024}; |
|
275 |
|
276 /** |
|
277 RSA Key Pair Generator Characteristics |
|
278 */ |
|
279 static const TInt32 KCryptoPluginRsaKeyPairGen = 0x102831E0; |
|
280 static const TUid KCryptoPluginRsaKeyPairGenUid={KCryptoPluginRsaKeyPairGen}; |
|
281 static const TAsymmetricKeypairGeneratorCharacteristics KRSAKeyPairGenerator_1 = {KKeypairGeneratorInterface, KAlgorithmRSAKeyPairGenerator, KCryptoPluginRsaKeyPairGen, &KSymbian, EFalse, EFalse, 6, &KRsaKeyPairDescription, 100, 90, 1024}; |
|
282 |
|
283 /** |
|
284 DSA Key Pair Generator Characteristics |
|
285 */ |
|
286 static const TInt32 KCryptoPluginDsaKeyPairGen = 0x102831E1; |
|
287 static const TUid KCryptoPluginDsaKeyPairGenUid={KCryptoPluginDsaKeyPairGen}; |
|
288 static const TAsymmetricKeypairGeneratorCharacteristics KDSAKeyPairGenerator_1 = {KKeypairGeneratorInterface, KAlgorithmDSAKeyPairGenerator, KCryptoPluginDsaKeyPairGen, &KSymbian, EFalse, EFalse, 6, &KDsaKeyPairDescription, 100, 90, 1024}; |
|
289 |
|
290 |
|
291 /******************************MAC INTERFACE PLUG-INS' CHARACTERISTICS***************************/ |
|
292 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT |
|
293 _ROMLIT16(KHmacMd2Description, "HmacMd2"); |
|
294 _ROMLIT16(KHmacMd4Description, "HmacMd4"); |
|
295 _ROMLIT16(KHmacMd5Description, "HmacMd5"); |
|
296 _ROMLIT16(KHmacSha1Description, "HmacSha1"); |
|
297 _ROMLIT16(KHmacSha224Description, "HmacSha224"); |
|
298 _ROMLIT16(KHmacSha256Description, "HmacSha256"); |
|
299 _ROMLIT16(KHmacSha384Description, "HmacSha384"); |
|
300 _ROMLIT16(KHmacSha512Description, "HmacSha512"); |
|
301 _ROMLIT16(KMacAesXcbcMac96Description, "AesXcbcMac96"); |
|
302 _ROMLIT16(KMacAesXcbcPrf128Description, "AesXcbcPrf128"); |
|
303 /** |
|
304 * AES-XCBC-MAC-96 MAC Plugin Characteristics |
|
305 */ |
|
306 static const TInt32 KCryptoPluginMacAesXcbcMac96 = 0x2001EDA8; |
|
307 static const TUid KCryptoPluginMacAesXcbcMac96Uid= {KCryptoPluginMacAesXcbcMac96}; |
|
308 static const TMacCharacteristics KMac_1 = { |
|
309 KMacInterface, |
|
310 KAlgorithmCipherAesXcbcMac96, |
|
311 KCryptoPluginMacAesXcbcMac96, |
|
312 &KSymbian, |
|
313 EFalse, EFalse, 6, |
|
314 &KMacAesXcbcMac96Description, |
|
315 100, 90, KSymmetricCipherMode, |
|
316 NULL,&KAes_1 |
|
317 }; |
|
318 /** |
|
319 * AES-XCBC-PRF-128 MAC Plugin Characteristics |
|
320 */ |
|
321 static const TInt32 KCryptoPluginMacAesXcbcPrf128 = 0x2001EDA9; |
|
322 static const TUid KCryptoPluginMacAesXcbcPrf128Uid = {KCryptoPluginMacAesXcbcPrf128}; |
|
323 static const TMacCharacteristics KMac_2 = { |
|
324 KMacInterface, |
|
325 KAlgorithmCipherAesXcbcPrf128, |
|
326 KCryptoPluginMacAesXcbcPrf128, |
|
327 &KSymbian, |
|
328 EFalse, EFalse, 6, |
|
329 &KMacAesXcbcPrf128Description, |
|
330 100, 90, KSymmetricCipherMode, |
|
331 NULL,&KAes_1 |
|
332 }; |
|
333 /** |
|
334 * HASH-MD2 MAC Plugin Characteristics |
|
335 */ |
|
336 static const TInt32 KCryptoPluginMacHashMd2 = 0x2001EDA0; |
|
337 static const TUid KCryptoPluginMacHashMd2Uid = {KCryptoPluginMacHashMd2}; |
|
338 static const TMacCharacteristics KMac_3 = { |
|
339 KMacInterface, |
|
340 KAlgorithmHashMd2, |
|
341 KCryptoPluginMacHashMd2, |
|
342 &KSymbian, |
|
343 EFalse, EFalse, 6, |
|
344 &KHmacMd2Description, |
|
345 100, 90, KHmacMode, |
|
346 &KMd2_1, NULL |
|
347 }; |
|
348 /** |
|
349 * HASH-MD4 MAC Plugin Characteristics |
|
350 */ |
|
351 static const TInt32 KCryptoPluginMacHashMd4 = 0x2001EDA1; |
|
352 static const TUid KCryptoPluginMacHashMd4Uid = {KCryptoPluginMacHashMd4}; |
|
353 static const TMacCharacteristics KMac_4 = { |
|
354 KMacInterface, |
|
355 KAlgorithmHashMd4, |
|
356 KCryptoPluginMacHashMd4, |
|
357 &KSymbian, |
|
358 EFalse, EFalse, 6, |
|
359 &KHmacMd4Description, |
|
360 100, 90, KHmacMode, |
|
361 &KMd4_1, NULL |
|
362 }; |
|
363 /** |
|
364 * HASH-MD5 MAC Plugin Characteristics |
|
365 */ |
|
366 static const TInt32 KCryptoPluginMacHashMd5 = 0x2001EDA2; |
|
367 static const TUid KCryptoPluginMacHashMd5Uid = {KCryptoPluginMacHashMd5}; |
|
368 static const TMacCharacteristics KMac_5 = { |
|
369 KMacInterface, |
|
370 KAlgorithmHashMd5, |
|
371 KCryptoPluginMacHashMd5, |
|
372 &KSymbian, |
|
373 EFalse, EFalse, 6, |
|
374 &KHmacMd5Description, |
|
375 100, 90, KHmacMode, |
|
376 &KMd5_1, NULL |
|
377 }; |
|
378 /** |
|
379 * HASH-SHA1 MAC Plugin Characteristics |
|
380 */ |
|
381 static const TInt32 KCryptoPluginMacHashSha1 = 0x2001EDA3; |
|
382 static const TUid KCryptoPluginMacHashSha1Uid = {KCryptoPluginMacHashSha1}; |
|
383 static const TMacCharacteristics KMac_6 = { |
|
384 KMacInterface, |
|
385 KAlgorithmHashSha1, |
|
386 KCryptoPluginMacHashSha1, |
|
387 &KSymbian, |
|
388 EFalse, EFalse, 6, |
|
389 &KHmacSha1Description, |
|
390 100, 90, KHmacMode, |
|
391 &KSha1_1, NULL |
|
392 }; |
|
393 /** |
|
394 * HASH-SHA224 MAC Plugin Characteristics |
|
395 */ |
|
396 static const TInt32 KCryptoPluginMacHashSha224 = 0x2001EDA4; |
|
397 static const TUid KCryptoPluginMacHashSha224Uid = {KCryptoPluginMacHashSha224}; |
|
398 static const TMacCharacteristics KMac_7 = { |
|
399 KMacInterface, |
|
400 KAlgorithmHashSha224, |
|
401 KCryptoPluginMacHashSha224, |
|
402 &KSymbian, |
|
403 EFalse, EFalse, 6, |
|
404 &KHmacSha224Description, |
|
405 100, 90, KHmacMode, |
|
406 &KSha224_1, NULL |
|
407 }; |
|
408 /** |
|
409 * HASH-SHA256 MAC Plugin Characteristics |
|
410 */ |
|
411 static const TInt32 KCryptoPluginMacHashSha256 = 0x2001EDA5; |
|
412 static const TUid KCryptoPluginMacHashSha256Uid = {KCryptoPluginMacHashSha256}; |
|
413 static const TMacCharacteristics KMac_8 = { |
|
414 KMacInterface, |
|
415 KAlgorithmHashSha256, |
|
416 KCryptoPluginMacHashSha256, |
|
417 &KSymbian, |
|
418 EFalse, EFalse, 6, |
|
419 &KHmacSha256Description, |
|
420 100, 90, KHmacMode, |
|
421 &KSha256_1, NULL |
|
422 }; |
|
423 /** |
|
424 * HASH-SHA384 MAC Plugin Characteristics |
|
425 */ |
|
426 static const TInt32 KCryptoPluginMacHashSha384 = 0x2001EDA6; |
|
427 static const TUid KCryptoPluginMacHashSha384Uid = {KCryptoPluginMacHashSha384}; |
|
428 static const TMacCharacteristics KMac_9 = { |
|
429 KMacInterface, |
|
430 KAlgorithmHashSha384, |
|
431 KCryptoPluginMacHashSha384, |
|
432 &KSymbian, |
|
433 EFalse, EFalse, 6, |
|
434 &KHmacSha384Description, |
|
435 100, 90, KHmacMode, |
|
436 &KSha384_1, NULL |
|
437 }; |
|
438 /** |
|
439 * HASH-SHA512 MAC Plugin Characteristics |
|
440 */ |
|
441 static const TInt32 KCryptoPluginMacHashSha512 = 0x2001EDA7; |
|
442 static const TUid KCryptoPluginMacHashSha512Uid = {KCryptoPluginMacHashSha512}; |
|
443 static const TMacCharacteristics KMac_10 = { |
|
444 KMacInterface, |
|
445 KAlgorithmHashSha512, |
|
446 KCryptoPluginMacHashSha512, |
|
447 &KSymbian, |
|
448 EFalse, EFalse, 6, |
|
449 &KHmacSha512Description, |
|
450 100, 90, KHmacMode, |
|
451 &KSha512_1, NULL |
|
452 }; |
|
453 /** |
|
454 * Mac implementation characteristic table |
|
455 */ |
|
456 static const TMacCharacteristics* const KMacCharacteristics[] = { |
|
457 &KMac_1, &KMac_2, &KMac_3, |
|
458 &KMac_4, &KMac_5, &KMac_6, |
|
459 &KMac_7, &KMac_8, &KMac_9, |
|
460 &KMac_10 |
|
461 }; |
|
462 |
|
463 #endif |
|
464 /***********************************************************************************************/ |
|
465 |
|
466 /** |
|
467 For each crypto algorithm type implemented in this plugin list the characteristics |
|
468 */ |
|
469 |
|
470 /** |
|
471 Hash implementation characteristic table |
|
472 */ |
|
473 static const THashCharacteristics* const KHashCharacteristics[] = |
|
474 { |
|
475 &KMd2_1, &KMd5_1, &KSha1_1, &KMd4_1, &KSha224_1, &KSha256_1, &KSha384_1, &KSha512_1 |
|
476 }; |
|
477 |
|
478 /** |
|
479 Random implementation characteristic table |
|
480 */ |
|
481 |
|
482 static const TRandomCharacteristics* const KRandomCharacteristics[]= |
|
483 { |
|
484 &KRandom_1 |
|
485 }; |
|
486 |
|
487 /** |
|
488 Symmetric Cipher implementation characteristic table |
|
489 */ |
|
490 static const TSymmetricCipherCharacteristics* const KSymmetricCipherCharacteristics[]= |
|
491 { |
|
492 &KDes_1, &K3Des_1, &KAes_1, &KRc2_1, &KArc4_1 |
|
493 }; |
|
494 |
|
495 |
|
496 /** |
|
497 Asymmetric Cipher implementation characteristic table |
|
498 */ |
|
499 static const TAsymmetricCipherCharacteristics* const KAsymmetricCipherCharacteristics[]= |
|
500 { |
|
501 &KRSA_1 |
|
502 }; |
|
503 |
|
504 /** |
|
505 Signer implementation characteristic table |
|
506 */ |
|
507 static const TAsymmetricSignatureCharacteristics* const KSignerCharacteristics[]= |
|
508 { |
|
509 &KRSASigner_1, &KDSASigner_1 |
|
510 }; |
|
511 |
|
512 |
|
513 /** |
|
514 Verifier implementation characteristic table |
|
515 */ |
|
516 static const TAsymmetricSignatureCharacteristics* const KVerifierCharacteristics[]= |
|
517 { |
|
518 &KRSAVerifier_1, &KDSAVerifier_1 |
|
519 }; |
|
520 |
|
521 /** |
|
522 Key Agreement implementation characteristic table |
|
523 */ |
|
524 static const TKeyAgreementCharacteristics* const KKeyAgreementCharacteristics[]= |
|
525 { |
|
526 &KDH_1 |
|
527 }; |
|
528 |
|
529 /** |
|
530 Key pair generator implementation characteristic table |
|
531 */ |
|
532 static const TAsymmetricKeypairGeneratorCharacteristics* const KKeyPairGeneratorCharacteristics[]= |
|
533 { |
|
534 &KDHKeyPairGenerator_1, &KRSAKeyPairGenerator_1, &KDSAKeyPairGenerator_1 |
|
535 }; |
|
536 } |
|
537 |
|
538 #endif //__CRYPTOAPI_SOFTWAREPLUGINCONFIG_H__ |