Home
last modified time | relevance | path

Searched refs:outKey (Results 1 – 15 of 15) sorted by relevance

/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
H A Dhks_import_sign_verify_test.cpp329 outKey->size = size; in CopyKey()
394 outKey->data = data; in ConstructImportedCurve25519Key()
395 outKey->size = size; in ConstructImportedCurve25519Key()
461 outKey->data = data; in ConstructImportedDsaPriOrPairKey()
462 outKey->size = size; in ConstructImportedDsaPriOrPairKey()
503 outKey->data = data; in ConstructEcPrivateKey()
504 outKey->size = size; in ConstructEcPrivateKey()
577 outKey->data = data; in ConstructEcKey()
578 outKey->size = size; in ConstructEcKey()
643 outKey->data = data; in ConstructImportedSm2Key()
[all …]
H A Dhks_import_agree_test.cpp636 outKey->data = outData; in CopyKey()
637 outKey->size = size; in CopyKey()
692 outKey->size = size; in ConstructCurve25519Key()
747 outKey->data = data; in ConstructEccKey()
748 outKey->size = size; in ConstructEccKey()
796 outKey->data = data; in ConstructDhKey()
797 outKey->size = size; in ConstructDhKey()
802 struct HksBlob *outKey) in ConstructImportedCurve25519Key() argument
822 struct HksBlob *outKey) in ConstructImportedEccKey() argument
916 struct HksBlob *outKey) in ConstructImportedDhKey() argument
[all …]
H A Dhks_import_rsa_test.cpp330 static int32_t CopyKey(const struct HksBlob *key, struct HksBlob *outKey) in CopyKey() argument
338 outKey->data = outData; in CopyKey()
339 outKey->size = key->size; in CopyKey()
344 static int32_t ConstructPubKey(uint32_t keySize, struct HksBlob *outKey) in ConstructPubKey() argument
375 return CopyKey(&pubDataBlob, outKey); in ConstructPubKey()
379 uint32_t keySize, struct HksBlob *outKey, bool isPriKey) in ConstructKey() argument
423 outKey->data = data; in ConstructKey()
424 outKey->size = sizeTest; in ConstructKey()
428 static int32_t ConstructImportedKey(uint32_t keySize, uint32_t importType, struct HksBlob *outKey) in ConstructImportedKey() argument
431 return ConstructPubKey(keySize, outKey); in ConstructImportedKey()
[all …]
H A Dhks_import_wrapped_x25519_suite_test.cpp278 uint32_t alg, uint32_t keySize, uint32_t importType, struct HksBlob *outKey) in ConstructCurve25519Key() argument
313 outKey->data = data; in ConstructCurve25519Key()
314 outKey->size = size; in ConstructCurve25519Key()
319 struct HksBlob *outKey) in ConstructImportedCurve25519Key() argument
328 return ConstructCurve25519Key(&key, alg, keySize, importType, outKey); in ConstructImportedCurve25519Key()
333 uint32_t keySize, struct HksBlob *outKey, bool isPriKey) in ConstructRsaKey() argument
377 outKey->data = data; in ConstructRsaKey()
378 outKey->size = size; in ConstructRsaKey()
H A Dhks_access_control_test_common.cpp705 const struct HksBlob *eDataBlob, uint32_t keySize, struct HksBlob *outKey) in ConstructRsaKeyPair() argument
747 outKey->data = data; in ConstructRsaKeyPair()
748 outKey->size = size; in ConstructRsaKeyPair()
753 struct HksBlob *ed25519PrivData, struct HksBlob *outKey) in ConstructEd25519KeyPair() argument
788 outKey->data = data; in ConstructEd25519KeyPair()
789 outKey->size = size; in ConstructEd25519KeyPair()
793 …onstructDsaKeyPair(uint32_t keySize, const struct TestDsaKeyParams *params, struct HksBlob *outKey) in ConstructDsaKeyPair() argument
852 outKey->data = data; in ConstructDsaKeyPair()
853 outKey->size = size; in ConstructDsaKeyPair()
H A Dhks_import_wrapped_sm2_suite_test.cpp694 static int32_t CopyKey(const uint8_t *key, uint32_t size, struct HksBlob *outKey) in CopyKey() argument
702 outKey->data = outData; in CopyKey()
703 outKey->size = size; in CopyKey()
709 uint32_t keySize, uint32_t importType, struct HksBlob *outKey) in ConstructEccKey() argument
712 return CopyKey(keyTest->x509PublicKey.data, keyTest->x509PublicKey.size, outKey); in ConstructEccKey()
761 outKey->data = data; in ConstructEccKey()
762 outKey->size = size; in ConstructEccKey()
767 struct HksBlob *outKey) in ConstructImportedSm2Key() argument
780 return ConstructEccKey(&key, keySize, importType, outKey); in ConstructImportedSm2Key()
H A Dhks_import_wrapped_ecdh_suite_test.cpp270 uint32_t keySize, struct HksBlob *outKey, bool isPriKey) in ConstructKey() argument
314 outKey->data = dataTest; in ConstructKey()
315 outKey->size = size; in ConstructKey()
/ohos5.0/base/security/huks/utils/crypto_adapter/
H A Dhks_client_service_adapter_common.c33 int32_t CopyToInnerKey(const struct HksBlob *key, struct HksBlob *outKey) in CopyToInnerKey() argument
44 outKey->data = outData; in CopyToInnerKey()
45 outKey->size = key->size; in CopyToInnerKey()
78 const struct HksBlob *key, struct HksBlob *outKey) in GetHksPubKeyInnerFormat() argument
80 if ((CheckBlob(key) != HKS_SUCCESS) || (outKey == NULL)) { in GetHksPubKeyInnerFormat()
102 return CopyToInnerKey(key, outKey); in GetHksPubKeyInnerFormat()
107 return TranslateToInnerCurve25519Format(algParam->uint32Param, key, outKey); in GetHksPubKeyInnerFormat()
117 return TranslateFromX509PublicKey(algParam->uint32Param, key, outKey); in GetHksPubKeyInnerFormat()
H A Dhks_client_service_adapter_common.h27 int32_t CopyToInnerKey(const struct HksBlob *key, struct HksBlob *outKey);
29 …InnerFormat(const struct HksParamSet *paramSet, const struct HksBlob *key, struct HksBlob *outKey);
/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
H A Dhks_mbedtls_hmac.c52 uint8_t *outKey = (uint8_t *)HksMalloc(keyByteLen); in HksMbedtlsHmacGenerateKey() local
53 HKS_IF_NULL_RETURN(outKey, HKS_ERROR_MALLOC_FAIL) in HksMbedtlsHmacGenerateKey()
61 HKS_FREE(outKey); in HksMbedtlsHmacGenerateKey()
66 ret = mbedtls_ctr_drbg_random(&ctrDrbg, outKey, keyByteLen); in HksMbedtlsHmacGenerateKey()
72 (void)memset_s(outKey, keyByteLen, 0, keyByteLen); in HksMbedtlsHmacGenerateKey()
73 HKS_FREE(outKey); in HksMbedtlsHmacGenerateKey()
77 key->data = outKey; in HksMbedtlsHmacGenerateKey()
H A Dhks_mbedtls_aes.c64 uint8_t *outKey = (uint8_t *)HksMalloc(keyByteLen); in HksMbedtlsAesGenerateKey() local
65 HKS_IF_NULL_RETURN(outKey, HKS_ERROR_MALLOC_FAIL) in HksMbedtlsAesGenerateKey()
73 HKS_FREE(outKey); in HksMbedtlsAesGenerateKey()
78 ret = mbedtls_ctr_drbg_random(&ctrDrbg, outKey, keyByteLen); in HksMbedtlsAesGenerateKey()
81 (void)memset_s(outKey, keyByteLen, 0, keyByteLen); in HksMbedtlsAesGenerateKey()
82 HKS_FREE(outKey); in HksMbedtlsAesGenerateKey()
87 key->data = outKey; in HksMbedtlsAesGenerateKey()
/ohos5.0/drivers/peripheral/huks/test/unittest/
H A Dhdi_ihuks_api_function_test.cpp284 struct HuksBlob outKey = { variable
288 ret = g_huksHdiProxy->GenerateKey(g_huksHdiProxy, &keyAlias, &paramSet, &key, &outKey);
290 ASSERT_EQ(outKey.dataLen, sizeof(g_generateOutKey));
319 struct HuksBlob outKey = { variable
323 ret = g_huksHdiProxy->ImportKey(g_huksHdiProxy, &keyAlias, &key, &paramSet, &outKey);
325 ASSERT_EQ(outKey.dataLen, sizeof(g_importOutKey));
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/core/src/
H A Dhks_core_service_key_generate.c683 outKey->data = out; in AppendRsaPublicExponent()
684 outKey->size = size; in AppendRsaPublicExponent()
695 return AppendRsaPublicExponent(key, outKey); in GetRsaPrivateOrPairInnerFormat()
698 return CopyToInnerKey(key, outKey); in GetRsaPrivateOrPairInnerFormat()
702 const struct HksBlob *key, struct HksBlob *outKey) in GetCurve25519PrivateOrPairInnerFormat() argument
705 return CopyToInnerKey(key, outKey); in GetCurve25519PrivateOrPairInnerFormat()
726 outKey->data = buffer; in GetCurve25519PrivateOrPairInnerFormat()
727 outKey->size = totalSize; in GetCurve25519PrivateOrPairInnerFormat()
732 const struct HksParamSet *paramSet, struct HksBlob *outKey) in GetPrivateOrPairInnerFormat() argument
742 return GetRsaPrivateOrPairInnerFormat(keyType, key, outKey); in GetPrivateOrPairInnerFormat()
[all …]
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/
H A Dhks_access_control_test_common.h146 const struct HksBlob *eDataBlob, uint32_t keySize, struct HksBlob *outKey);
149 struct HksBlob *ed25519PrivData, struct HksBlob *outKey);
151 …nstructDsaKeyPair(uint32_t keySize, const struct TestDsaKeyParams *params, struct HksBlob *outKey);
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/iso_auth_task/
H A Diso_auth_task_common.c142 static int32_t GenerateAuthTokenForAccessory(const IsoAuthParams *params, Uint8Buff *outKey) in GenerateAuthTokenForAccessory() argument
152 res = InitSingleParam(outKey, AUTH_TOKEN_SIZE_BYTE); in GenerateAuthTokenForAccessory()
162 …s->isoBaseParams.loader->computeHkdf(&keyAliasParams, &userIdSelfBuff, &params->challenge, outKey); in GenerateAuthTokenForAccessory()
165 FreeAndCleanKey(outKey); in GenerateAuthTokenForAccessory()