Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * This file define all the common values thoughout your test project
26 #if (!defined __TE_CRYPTOSPI_SUITEDEFS_H__)
27 #define __TE_CRYPTOSPI_SUITEDEFS_H__
29 #include <cryptospi/romlit.h>
30 #include <cryptospi/cryptospidef.h>
35 const TInt KKeyExponent = 65537;
37 //tplugin01 implementation definitions
38 const TInt32 KTestPlugin01Des_1 = 0x102831A1;
39 const TInt32 KTestPlugin01Des_2 = 0x102831A2;
40 const TInt32 KTestPlugin01Des_3 = 0x102831A3;
41 const TInt32 KTestPlugin01Des_4 = 0x102831A4;
42 const TInt32 KTestPlugin01Md2_1 = 0x102831A5;
43 const TInt32 KTestPlugin01Md2_2 = 0x102831A6;
44 const TInt32 KTestPlugin01RsaKeyGen_1 = 0x102831A7;
45 const TInt32 KTestPlugin01RsaVerifier_1 = 0x102831A8;
46 const TInt32 KTestPlugin01RsaVerifier_2 = 0x102831A9;
48 //tplugin02 implementation definitions
49 const TInt32 KTestPlugin02Random_1 = 0x102831B0;
50 const TInt32 KTestPlugin02Md5_1 = 0x102831B1;
51 const TInt32 KTestPlugin02Des_1 = 0x102831B2;
52 const TInt32 KTestPlugin02Des_2 = 0x102831B3;
53 const TInt32 KTestPlugin02Rsa_1 = 0x102831B4;
54 const TInt32 KTestPlugin02Rsa_2 = 0x102831B5;
55 const TInt32 KTestPlugin02RsaKeyGen_1 = 0x102831B6;
56 const TInt32 KTestPlugin02DHKeyGen_1 = 0x102831B7;
57 const TInt32 KTestPlugin02RsaSigner_1 = 0x102831B8;
58 const TInt32 KTestPlugin02DHKeyAgree_1 = 0x102831B9;
59 const TInt32 KTestPlugin02Random_2 = 0x102831BA;
61 //softwarecrypto implementation definitions
62 const TInt32 KCryptoPluginMd2 = 0x102831D0;
63 const TInt32 KCryptoPluginMd5 = 0x102831D1;
64 const TInt32 KCryptoPluginSha1 = 0x102831D2;
65 const TInt32 KCryptoPluginSha224 = 0x2000E25C;
66 const TInt32 KCryptoPluginSha256 = 0x2000E25D;
67 const TInt32 KCryptoPluginSha384 = 0x2000E25E;
68 const TInt32 KCryptoPluginSha512 = 0x2000E25F;
69 const TInt32 KCryptoPluginRandom = 0x102831D3;
70 const TInt32 KCryptoPluginDes = 0x102831D4;
71 const TInt32 KCryptoPlugin3Des = 0x102831D5;
72 const TInt32 KCryptoPluginAes = 0x102831D6;
73 const TInt32 KCryptoPluginRc2 = 0x102831D7;
74 const TInt32 KCryptoPluginArc4 = 0x102831D8;
75 const TInt32 KCryptoPluginRsaCipher = 0x102831D9;
76 const TInt32 KCryptoPluginRsaSigner = 0x102831DA;
77 const TInt32 KCryptoPluginDsaSigner = 0x102831DB;
78 const TInt32 KCryptoPluginRsaVerifier = 0x102831DC;
79 const TInt32 KCryptoPluginDsaVerifier = 0x102831DD;
80 const TInt32 KCryptoPluginDhKeyAgreement = 0x102831DE;
81 const TInt32 KCryptoPluginDhKeyPairGen = 0x102831DF;
82 const TInt32 KCryptoPluginRsaKeyPairGen = 0x102831E0;
83 const TInt32 KCryptoPluginDsaKeyPairGen = 0x102831E1;
84 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
85 const TInt32 KTestPlugin01Aes = 0x102831AA;
86 const TInt32 KTestPlugin01XcbcMac96 = 0x102831AB;
87 const TInt32 KTestPlugin01MacMd2_1 = 0x102831AC;
88 const TInt32 KTestPlugin01MacMd2_2 = 0x102831AD;
89 const TInt32 KTestPlugin02Aes = 0x102831BB;
90 const TInt32 KTestPlugin02XcbcMac96 = 0x102831BC;
91 const TInt32 KTestPlugin02XcbcPrf128 = 0x102831BD;
94 //creator name definitions
95 _ROMLIT16(KSymbian, "Symbian");
96 _ROMLIT16(KSymbianTestFramework, "SymbianTestFramework");
97 _ROMLIT16(KTestFramework, "TestFramework");
98 _ROMLIT16(KAlternativeName, "AlternativeName");
100 //implementation name definitions
101 _ROMLIT16(KMd2Description, "Md2");
102 _ROMLIT16(KMd5Description, "Md5");
103 _ROMLIT16(KSha1Description, "Sha1");
104 _ROMLIT16(KSha224Description, "Sha224");
105 _ROMLIT16(KSha256Description, "Sha256");
106 _ROMLIT16(KSha384Description, "Sha384");
107 _ROMLIT16(KSha512Description, "Sha512");
108 _ROMLIT16(KHmacMd2Description, "HmacMd2");
109 _ROMLIT16(KHmacMd5Description, "HmacMd5");
110 _ROMLIT16(KHmacSha1Description, "HmacSha1");
111 _ROMLIT16(KHmacSha224Description, "HmacSha224");
112 _ROMLIT16(KHmacSha256Description, "HmacSha256");
113 _ROMLIT16(KHmacSha384Description, "HmacSha384");
114 _ROMLIT16(KHmacSha512Description, "HmacSha512");
115 _ROMLIT16(KRandomDescription, "Random");
116 _ROMLIT16(KDesDescription, "Des");
117 _ROMLIT16(K3DesDescription, "3Des");
118 _ROMLIT16(KAesDescription, "Aes");
119 _ROMLIT16(KRC2Description, "RC2");
120 _ROMLIT16(KARC4Description, "ARC4");
121 _ROMLIT16(KRsaCipherDescription, "Rsa");
122 _ROMLIT16(KRsaSignerDescription, "RsaSigner");
123 _ROMLIT16(KDsaSignerDescription, "DsaSigner");
124 _ROMLIT16(KRsaVerifierDescription, "RsaVerifier");
125 _ROMLIT16(KDsaVerifierDescription, "DsaVerifier");
126 _ROMLIT16(KDHDescription, "DH");
127 _ROMLIT16(KSymmetricKeyGeneratorDescription, "Symmetric Key Generator");
128 _ROMLIT16(KKeyPairDescription, "Key Pair Generator");
129 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
130 _ROMLIT16(KAesXcbcMac96Description, "AesXcbcMac96");
131 _ROMLIT16(KAesXcbcPrf128Description, "AesXcbcPrf128");
134 //operation mode definitions
135 const TInt32 KHashOperationModes[]={KHashMode, KHmacMode};
136 const TInt32 KDesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
137 const TInt32 K3DesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
138 const TInt32 KAesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
139 const TInt32 KRc2CryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
140 const TInt32 KArc4CryptoModes[]={KOperationModeNone};
142 //padding mode definitions
143 const TInt32 KDesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
144 const TInt32 K3DesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
145 const TInt32 KAesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
146 const TInt32 KRc2PaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
147 const TInt32 KArc4PaddingModes[]={KPaddingModeNone};
148 const TInt32 KRSACipherPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Encryption};
149 const TInt32 KRSASignerPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Signature};
150 const TInt32 KDSASignerPaddingModes[]={KPaddingModeNone};
151 const TInt32 KRSAVerifierPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Signature};
152 const TInt32 KDSAVerifierPaddingModes[]={KPaddingModeNone};
154 //Extended Characteristic Uids
155 const TInt32 KExtendCharType1 = 0x102ABCD1;
156 const TUid KExtendCharType1Uid ={KExtendCharType1};
158 const TInt32 KExtendCharType2 = 0x102ABCD2;
159 const TUid KExtendCharType2Uid ={KExtendCharType2};
161 const TInt32 KExtendCharType3 = 0x102ABCD3;
162 const TUid KExtendCharType3Uid ={KExtendCharType3};
164 //***********************************************************************
165 //INI Configuration Parameter Definitons
166 //***********************************************************************
168 //Test Case Initialisation Parameters
169 _LIT(KConfigInterfaceType,"InterfaceType");
170 _LIT(KConfigEncryptKey,"EncryptKey");
171 _LIT(KConfigInvalidKey, "InvalidKey");
172 _LIT(KConfigEncryptKeyType,"KeyType");
173 _LIT(KConfigTestCaseId,"TestCaseId");
174 _LIT(KConfigAlgorithmUid,"AlgorithmUid");
175 _LIT(KConfigCryptoMode,"CryptoMode");
176 _LIT(KConfigOperationMode,"OperationMode");
177 _LIT(KConfigPaddingMode,"PaddingMode");
178 _LIT(KConfigAlgorithmParams,"AlgorithmParams");
179 _LIT(KConfigSourcePath,"SourcePath");
180 _LIT(KConfigEncryptedPath,"EncryptedPath");
181 _LIT(KConfigIVPath,"IVPath");
183 _LIT(KConfigInvalidPaddingMode,"InvalidPaddingMode");
184 _LIT(KConfigInvalidOperationMode,"InvalidOperationMode");
186 //Source File Parameters
187 const TInt KDataReadBlocks = 20;
189 //Symmetric/Asymmetric Parameters
190 _LIT(KConfigExEncryptedData,"Encrypted");
192 //*****ASYMMETRIC ENCRYPT DATA CHECK PARAMS - TEMP*****
193 _LIT(KConfigKeyModulous,"Modulous");
194 _LIT(KConfigKeyExponent,"Exponent");
195 //*****ASYMMETRIC ENCRYPT DATA CHECK PARAMS - TEMP*****
197 //Hash/Hmac Specific Parameters
198 _LIT(KConfigExHashHmacValue,"ExHashValue");
199 _LIT(KConfigExSecondHashHmacValue,"ExSecondHashValue");
200 _LIT(KConfigSecondOperationMode,"SecondOperationMode");
201 _LIT(KConfigThreadName,"WorkerThreadName");
203 //Key Exchange/Generation & Signer/Verifier Parameters
204 _LIT(KConfigExchangeTestType,"TestType");
205 _LIT(KConfigExchangeKey,"Key");
206 _LIT(KConfigExchangePaddingMode,"PaddingMode");
207 _LIT(KConfigExchangePaddingMode1,"PaddingMode1");
208 _LIT(KConfigExchangePaddingMode2,"PaddingMode2");
209 _LIT(KConfigExchangePaddingMode3,"PaddingMode3");
210 _LIT(KConfigExchangeKeyTypeVariant, "Keytype");
211 _LIT(KConfigSignVerifyType, "Type");
212 _LIT(KConfigSignVerifyData, "Data");
213 _LIT(KConfigSignVerifySigR, "SignatureR");
214 _LIT(KConfigSignVerifySigS, "SignatureS");
217 _LIT(KNullString, "NULL");
218 _LIT(KEmptyString, "");
219 _LIT8(KFileNewLine,"\r\n");
222 _LIT(KConfigRuleSelectorToggle, "RuleSelectorToggle");
224 //********************CHARACTERISTICS**********************
226 //Selection Rule Input Parameters
227 _LIT(KConfigInterfaceScopeBase,"InterfaceScopeRule");
228 _LIT(KConfigAlgorithmScopeBase,"AlgorithmScopeRule");
229 _LIT(KConfigCharUidBase, "CharacterUidRule");
230 _LIT(KConfigCompareOperatorBase, "CompareOperatorRule");
231 _LIT(KConfigCharValueBase, "CharacterValueRule");
232 _LIT(KConfigCharValueTypeBase, "CharacterValueTypeRule");
233 _LIT(KConfigIsOptionalBase, "IsOptionaRule");
235 const TInt KMaxConfigParamStringSize = 30; //Max String Size for Dynamic INI file parameters
237 //Expected Common Characteristics
238 _LIT(KConfigExInterfaceUid, "ExInterfaceUid");
239 _LIT(KConfigExAlgorithmUid, "ExAlgorithmUid");
240 _LIT(KConfigExImplementationUid, "ExImplementationUid");
241 _LIT(KConfigExCreatorName, "ExCreatorName");
242 _LIT(KConfigExFIPSApproved, "ExFIPSApproved");
243 _LIT(KConfigExHardwareSupport, "ExHardwareSupport");
244 _LIT(KConfigExMaxConcurrency, "ExMaxConcurrency");
245 _LIT(KConfigExAlgorithmName, "ExAlgorithmName");
246 _LIT(KConfigExLatency, "ExLatency");
247 _LIT(KConfigExThroughput, "ExThroughput");
249 //Expected Cipher Characteristics
250 _LIT(KConfigExMaxKeyLength, "ExMaxKeyLength");
251 _LIT(KConfigExKeySupportMode, "ExKeySupportMode");
252 _LIT(KConfigExPaddingModes, "ExPaddingModes");
253 _LIT(KConfigExPaddingModeNum, "ExPaddingModeNum");
254 _LIT(KConfigExBlockSize, "ExBlockSize");
255 _LIT(KConfigExOperationModes, "ExOperationModes");
256 _LIT(KConfigExOperationModeNum, "ExOperationModeNum");
258 //Expected Hash/Hmac Specific Characteristics
259 _LIT(KConfigExOutputSize, "ExOutputSize");
261 //Expected Random Specific Characteristics
262 _LIT(KConfigExBlockingMode, "ExBlockingMode");
264 //Expected Extended Characteristics
265 _LIT(KConfigExExtendConcurrency, "ExExtendConcurrency");
266 _LIT(KConfigExExtendExclusiveUse, "ExExtendExclusiveUse");
267 _LIT(KConfigExExtendTestChar1, "ExExtendTestChar1");
268 _LIT(KConfigExExtendTestChar2, "ExExtendTestChar2");
269 _LIT(KConfigExExtendTestChar3, "ExExtendTestChar3");
271 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
272 _LIT(KConfigEncryptKeyPath,"EncryptKeyPath");
274 //Mac Specific Parameters
275 _LIT(KConfigExMacValue,"ExMacValue");
277 //Expected Mac Specific Characteristics
278 _LIT(KConfigExMacMode, "ExMacMode");
281 enum TReturnValueType
289 // For test step panics
290 _LIT(KTe_CryptoSpiPanic,"Te_CryptoSpi");