/test/xts/acts/security/cryptoFramework/js_api10_test_oh41/src/main/ets/test/utils/keyGenerate/ |
D | genECCSpecFunc.ets | 19 function compareECCParams(param: cpFw.ECCCommonParamsSpec, pubKey: cpFw.PubKey): boolean { 20 return param.a == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_A_BN) && 21 param.b == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_B_BN) && 22 param.g.x == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_G_X_BN) && 23 param.g.y == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_G_Y_BN) && 24 param.n == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_N_BN) && 25 param.h == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_H_NUM); 28 function comparePairParams(priKey: cpFw.PriKey, pubKey: cpFw.PubKey): boolean { 29 …return priKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_A_BN) == pubKey.getAsyKeySpec(cpFw.AsyKeySpecI… 30 …priKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC_B_BN) == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ECC… [all …]
|
D | compareSpecFunc.ets | 19 function DHKeyPair(priKey: cpFw.PriKey, pubKey: cpFw.PubKey): boolean { 20 …return priKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_P_BN) == pubKey.getAsyKeySpec(cpFw.AsyKeySpecIt… 21 …&& priKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_G_BN) == pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.D… 24 && pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_PK_BN) != null; 30 …&& keyPair1.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_P_BN) == keyPair2.pubKey.getAsyKeySpec(cpF… 31 …&& keyPair1.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_G_BN) == keyPair2.pubKey.getAsyKeySpec(cpF… 34 function X25519KeyPair(priKey: cpFw.PriKey, pubKey: cpFw.PubKey): boolean { 36 && pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.X25519_PK_BN) != null; 39 function Ed25519KeyPair(priKey: cpFw.PriKey, pubKey: cpFw.PubKey): boolean { 41 && pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ED25519_PK_BN) != null;
|
D | asyKeyGenCallbackFunc.ets | 45 cpFw.createAsyKeyGeneratorBySpec(spec).generatePubKey((err, pubKey) => { 50 resolve(pubKey); 75 generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.priKey.getEncoded(), (err) => { 92 …generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.priKey.getEncoded(), (err, keyPairNew) =… 100 …|| keyPairNew.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_PK_BN) == keyPair.pubKey.getAsyKeySpec(c… 115 …generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.priKey.getEncoded(), (err, keyPairNew) =… 120 …|| keyPairNew.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.X25519_PK_BN) == keyPair.pubKey.getAsyKeySp… 135 …generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.priKey.getEncoded(), (err, keyPairNew) =… 140 …|| keyPairNew.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ED25519_PK_BN) == keyPair.pubKey.getAsyKeyS…
|
D | asyKeyGenPromiseFunc.ets | 56 await generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.priKey.getEncoded()); 71 …let keyPairNew: cpFw.KeyPair = await generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.pri… 77 …|| keyPairNew.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.DH_PK_BN) == keyPair.pubKey.getAsyKeySpec(c… 94 …let keyPairNew: cpFw.KeyPair = await generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.pri… 97 …|| keyPairNew.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.X25519_PK_BN) == keyPair.pubKey.getAsyKeySp… 114 …let keyPairNew: cpFw.KeyPair = await generator.convertKey(keyPair.pubKey.getEncoded(), keyPair.pri… 117 …|| keyPairNew.pubKey.getAsyKeySpec(cpFw.AsyKeySpecItem.ED25519_PK_BN) == keyPair.pubKey.getAsyKeyS…
|
/test/xts/acts/security/cryptoFramework/js_api_test_oh40/src/main/js/test/utils/asysmmetricspec/ |
D | publicAsymmetricSpecCallback.js | 34 let pkX = asyKeyPair.pubKey.getAsyKeySpec( 38 let pkY = asyKeyPair.pubKey.getAsyKeySpec( 47 let q = asyKeyPair.pubKey.getAsyKeySpec( 56 let pk = asyKeyPair.pubKey.getAsyKeySpec( 180 .then((pubKey) => { 181 console.log("[Callback] generateByKeyPairSpec pubKey " + pubKey); 243 let pk = keyPair.pubKey.getAsyKeySpec( 247 let n = keyPair.pubKey.getAsyKeySpec( 270 let pkx = keyPair.pubKey.getAsyKeySpec( 274 let pky = keyPair.pubKey.getAsyKeySpec( [all …]
|
D | publicAsymmetricSpecPromise.js | 33 let pkX = asyKeyPair.pubKey.getAsyKeySpec( 37 let pkY = asyKeyPair.pubKey.getAsyKeySpec( 46 let Pk = asyKeyPair.pubKey.getAsyKeySpec( 55 let pk = asyKeyPair.pubKey.getAsyKeySpec( 152 let pkX = asyKeyPair.pubKey.getAsyKeySpec( 156 let pkY = asyKeyPair.pubKey.getAsyKeySpec( 165 let PK = asyKeyPair.pubKey.getAsyKeySpec( 174 let pk = asyKeyPair.pubKey.getAsyKeySpec( 333 let pk = keyPair.pubKey.getAsyKeySpec( 337 let p = keyPair.pubKey.getAsyKeySpec( [all …]
|
/test/xts/acts/security/cryptoFramework/js_api_test_oh40/src/main/js/test/ |
D | AsyGetKeySpecBySpec.test.js | 58 let pk = keyPair.pubKey.getAsyKeySpec( 62 let n = keyPair.pubKey.getAsyKeySpec( 95 let p = keyPair.pubKey.getAsyKeySpec( 99 let q = keyPair.pubKey.getAsyKeySpec( 103 let g = keyPair.pubKey.getAsyKeySpec( 107 let pk = keyPair.pubKey.getAsyKeySpec( 144 let p = callbackKeyPair.pubKey.getAsyKeySpec( 148 let a = callbackKeyPair.pubKey.getAsyKeySpec( 152 let b = callbackKeyPair.pubKey.getAsyKeySpec( 156 let gx = callbackKeyPair.pubKey.getAsyKeySpec( [all …]
|
D | AsyKeyGeneratorBySpecTwo.test.js | 131 .then((pubKey) => { 132 console.log("pubKey" + pubKey);
|
D | SecuritySignatureVerificationTwo.test.js | 343 await signGenerator.init(dsaKeyPair.pubKey); 634 verifyGenerator.init(verifyKeyPair.pubKey, verifyKeyPair.pubKey); 654 await verifyGenerator.init(dsaKeyPair.pubKey);
|
/test/xts/acts/security/cryptoFramework/js_api_test_one/src/main/js/test/utils/asymmetric/ |
D | publicAsymmetricPromise.js | 28 var pubKey; 34 pubKey = rsaKeyPair.pubKey; 35 let encodedPubKey = pubKey.getEncoded(); 36 console.log("[Promise]: pubKey.getAlgorithm= " + pubKey.algName); 38 console.log("[Promise]: pubKey.getFormat= " + pubKey.format); 157 async function initVerify(verifyGenerator, pubKey) { argument 160 .init(pubKey) 204 async function generateAsySecret(generator, priKey, pubKey) { argument 207 .generateSecret(priKey, pubKey) 242 globalRsaKeyPair.pubKey, [all …]
|
D | publicAsymmetricCallback.js | 32 var pubKey; 40 pubKey = rsaKeyPair.pubKey; 41 let encodedPubKey = pubKey.getEncoded(); 42 console.log("[Callback]: pubKey.getAlgorithm= " + pubKey.algName); 44 console.log("[Callback]: pubKey.getFormat= " + pubKey.format); 160 async function initVerify(verifyGenerator, pubKey) { argument 162 verifyGenerator.init(pubKey, (err) => { 204 async function generateAsySecret(generator, priKey, pubKey) { argument 206 generator.generateSecret(priKey, pubKey, (err, output) => { 241 globalRsaKeyPair.pubKey, [all …]
|
/test/xts/acts/security/cryptoFramework/js_api_test_oh40/src/main/js/test/utils/asymmetric/ |
D | publicAsymmetricCallback.js | 29 var pubKey; 37 pubKey = rsaKeyPair.pubKey; 38 let encodedPubKey = pubKey.getEncoded(); 39 console.log("[Callback]: pubKey.getAlgorithm= " + pubKey.algName); 41 console.log("[Callback]: pubKey.getFormat= " + pubKey.format); 157 async function initVerify(verifyGenerator, pubKey) { argument 159 verifyGenerator.init(pubKey, (err) => { 222 globalRsaKeyPair.pubKey, 282 let encodedPubKey = rsaKeyPair.pubKey.getEncoded(); 301 return initVerify(verifyGenerator, globalRsaKeyPair.pubKey); [all …]
|
D | publicAsymmetricPromise.js | 28 var pubKey; 34 pubKey = rsaKeyPair.pubKey; 35 let encodedPubKey = pubKey.getEncoded(); 159 async function initVerify(verifyGenerator, pubKey) { argument 162 .init(pubKey) 206 async function generateAsySecret(generator, priKey, pubKey) { argument 209 .generateSecret(priKey, pubKey) 240 globalRsaKeyPair.pubKey, 301 let encodedPubKey = rsaKeyPair.pubKey.getEncoded(); 321 return initVerify(verifyGenerator, globalRsaKeyPair.pubKey); [all …]
|
/test/xts/acts/security/certificate_framework/js_api_test_one/src/main/js/test/utils/certificate/ |
D | publicCertificateCallback.js | 116 async function verifyX509Cert(certInstance, pubKey) { argument 118 certInstance.verify(pubKey, (err) => { 132 var pubKey; 137 pubKey = gInstance.getPublicKey(); 138 expect(pubKey != null).assertTrue(); 141 pubKey = crlVerifyPubKeyHex; 143 pubKey = flag; 146 return verifyX509Cert(gInstance, pubKey); 444 async function verifyX509Crl(crlInstance, pubKey) { argument 446 crlInstance.verify(pubKey, (err) => { [all …]
|
D | publicCertificatePromise.js | 451 let pubKey = convertKeyPair.pubKey; 454 pubKey = flag; 456 pubKey = convertKeyPair.priKey; 459 return globalCrlInstance.verify(pubKey);
|
/test/xts/acts/security/cryptoFramework/js_api10_test_oh41/src/main/ets/test/ |
D | SecurityCryptoFwKeyGenerateECC.test.ets | 109 let pubKey: cryptoFramework.PubKey = await asyKeyGenPromiseFunc.genPubKey(spec); 110 expect(pubKey != null).assertTrue(); 159 let pubKey: cryptoFramework.PubKey = await asyKeyGenCallbackFunc.genPubKey(spec); 160 expect(pubKey != null).assertTrue(); 211 let res: boolean = compareSpecFunc.X25519KeyPair(keyPair.priKey, keyPair.pubKey); 238 let res: boolean = compareSpecFunc.X25519KeyPair(keyPair.priKey, keyPair.pubKey); 311 let pubKey: cryptoFramework.PubKey = await asyKeyGenPromiseFunc.genPubKey(spec); 312 expect(pubKey != null).assertTrue(); 361 let pubKey: cryptoFramework.PubKey = await asyKeyGenCallbackFunc.genPubKey(spec); 362 expect(pubKey != null).assertTrue(); [all …]
|
D | SecurityCryptoFwKeyGenerateDH.test.ets | 110 let res: boolean = compareSpecFunc.DHKeyPair(keyPair.priKey, keyPair.pubKey) 137 let res: boolean = compareSpecFunc.DHKeyPair(keyPair.priKey, keyPair.pubKey) 310 let pubKey: cryptoFramework.PubKey = await asyKeyGenPromiseFunc.genPubKey(spec); 311 expect(pubKey != null).assertTrue(); 360 let pubKey: cryptoFramework.PubKey = await asyKeyGenCallbackFunc.genPubKey(spec); 361 expect(pubKey != null).assertTrue(); 413 let res: boolean = compareSpecFunc.DHKeyPair(keyPair.priKey, keyPair.pubKey); 440 let res: boolean = compareSpecFunc.DHKeyPair(keyPair.priKey, keyPair.pubKey); 465 expect(keyPair.pubKey.format == "X.509").assertTrue(); 466 expect(keyPair.pubKey.algName == "DH").assertTrue();
|
D | SecurityCryptoFwGenECCCommonSpec.test.ets | 608 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 634 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 659 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 685 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 711 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 737 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 763 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 789 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 815 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); 841 let res: boolean = compareECCParams(commonSpec, keyPair.pubKey); [all …]
|
/test/xts/acts/security/huks_napi_BasicTest/src/ |
D | huks_signverify_rsa_test_common.cpp | 76 uint8_t pubKey[OH_HUKS_RSA_KEY_SIZE_1024] = {0}; in HksRsaSignVerifyTestNormalCase() local 77 struct OH_Huks_Blob publicKey = { OH_HUKS_RSA_KEY_SIZE_1024, pubKey }; in HksRsaSignVerifyTestNormalCase() 141 uint8_t pubKey[OH_HUKS_RSA_KEY_SIZE_1024] = {0}; in HksRSASignVerifyTestAbnormalCase() local 142 struct OH_Huks_Blob publicKey = { OH_HUKS_RSA_KEY_SIZE_1024, pubKey }; in HksRSASignVerifyTestAbnormalCase()
|
D | huks_signverify_ecc_test_common.cpp | 67 uint8_t pubKey[OH_HUKS_ECC_KEY_SIZE_521] = {0}; in HksEccSignVerifyTestNormalCase() local 68 struct OH_Huks_Blob publicKey = { OH_HUKS_ECC_KEY_SIZE_521, pubKey }; in HksEccSignVerifyTestNormalCase()
|
D | huks_signverify_ed25519_test.cpp | 117 uint8_t pubKey[OH_HUKS_CURVE25519_KEY_SIZE_256] = {0}; variable 118 struct OH_Huks_Blob publicKey = { OH_HUKS_CURVE25519_KEY_SIZE_256, pubKey };
|
D | huks_signverify_dsa_test.cpp | 139 uint8_t pubKey[DSA_COMMON_SIZE] = {0}; in HksDsaSignVerifyTestNormalCase() local 140 struct OH_Huks_Blob publicKey = { DSA_COMMON_SIZE, pubKey }; in HksDsaSignVerifyTestNormalCase()
|
/test/xts/acts/security/certificate_framework/js_api_test_oh41/src/main/ets/test/utils/certificate/ |
D | publicCertificateCallback.ets | 124 async function verifyX509Cert(certInstance: cert.X509Cert, pubKey: cryptoFramework.PubKey): Promise… 126 certInstance.verify(pubKey, (err) => { 140 let pubKey: cryptoFramework.PubKey | string; 145 pubKey = gInstance.getPublicKey(); 146 expect(pubKey != null).assertTrue(); 149 pubKey = crlVerifyPubKeyHex; 151 pubKey = flag; 154 return verifyX509Cert(gInstance, pubKey as cryptoFramework.PubKey); 448 async function verifyX509CRL(crlInstance: cert.X509CRL, pubKey: cryptoFramework.PubKey): Promise<vo… 450 crlInstance.verify(pubKey, (err) => { [all …]
|
/test/xts/acts/security/cryptoFramework/js_api10_test_oh41/src/main/ets/test/utils/signVerify/ |
D | signVerifyAsyPromiseFunc.ets | 37 await verify.init(signVerifyKeyPair.pubKey); 61 await verify.init(signVerifyKeyPair.pubKey); 85 await verify.init(signVerifyKeyPair2.pubKey); 114 await verify.init(signVerifyKeyPair.pubKey);
|
D | signVerifyAsyCallbackFunc.ets | 109 await verifyInit(verify, signVerifyKeyPair.pubKey); 133 await verifyInit(verify, signVerifyKeyPair.pubKey); 157 await verifyInit(verify, signVerifyKeyPair2.pubKey); 186 await verifyInit(verify, signVerifyKeyPair.pubKey);
|