Home
last modified time | relevance | path

Searched refs:priKeySize (Results 1 – 21 of 21) sorted by relevance

/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_crypto_ed25519.c65 keyMaterial->priKeySize = priKey->size; in SaveEd25519KeyMaterial()
132 ((key->size - totalSize) < km->priKeySize) || in CheckEd25519Material()
133 (km->pubKeySize > (UINT32_MAX - km->priKeySize)) || in CheckEd25519Material()
134 ((key->size - totalSize) < (km->pubKeySize + km->priKeySize))) { in CheckEd25519Material()
136 "%" LOG_PUBLIC "u", key->size, km->pubKeySize, km->priKeySize); in CheckEd25519Material()
172 ((struct KeyMaterial25519 *)output->data)->priKeySize = 0; in HksGetEd25519PubKey()
Dhks_mbedtls_dh.c83 keyMaterial->priKeySize = mbedtls_mpi_size(&ctx->X); in DhSaveKeyMaterial()
97 ret = mbedtls_mpi_write_binary(&(ctx->X), rawMaterial + offset, keyMaterial->priKeySize); in DhSaveKeyMaterial()
176 ((struct KeyMaterialDh *)output->data)->priKeySize = 0; in HksMbedtlsGetDhPubKey()
213 ret = mbedtls_mpi_read_binary(&ctx->X, key->data + offset, keyMaterial->priKeySize); in DhKeyMaterialToCtx()
Dhks_mbedtls_x25519.c113 (keyMaterial->priKeySize > HKS_X25519_KEY_BYTES)) { in X25519CheckKeyMaterialPubPriSize()
115 keyMaterial->pubKeySize, keyMaterial->priKeySize); in X25519CheckKeyMaterialPubPriSize()
144 (isPubKey ? 0 : keyMaterial->priKeySize))) { in X25519CheckKeySize()
183 keyMaterial->priKeySize = keyByteLen; in X25519SaveKeyMaterial()
203 ret = mbedtls_mpi_write_binary(pri, rawMaterial + offset, keyMaterial->priKeySize); in X25519SaveKeyMaterial()
301 int32_t ret = mbedtls_mpi_read_binary(pri, nativeKey->data + offset, keyMaterial->priKeySize); in X25519KeyMaterialToPri()
399 ((struct KeyMaterial25519 *)(keyOut->data))->priKeySize = 0; in HksMbedtlsGetX25519PubKey()
/base/security/huks/frameworks/huks_standard/main/common/src/
Dhks_crypto_adapter.c292 curve25519Km.priKeySize = 0; in SetCurve25519KeyMaterial()
295 curve25519Km.priKeySize = keyIn->size; in SetCurve25519KeyMaterial()
298 …keyOut->size = sizeof(struct KeyMaterial25519) + curve25519Km.pubKeySize + curve25519Km.priKeySize; in SetCurve25519KeyMaterial()
319 …In->size < (sizeof(struct KeyMaterial25519) + keyMaterial->pubKeySize + keyMaterial->priKeySize)) { in CheckCurve25519KeySize()
334 if (keyMaterial->pubKeySize > MAX_KEY_SIZE || keyMaterial->priKeySize > MAX_KEY_SIZE) { in CheckFormatCurve25519Key()
338 if (paramSetOut->paramSetSize < (offset + keyMaterial->pubKeySize + keyMaterial->priKeySize)) { in CheckFormatCurve25519Key()
359 .blob = { keyMaterial->priKeySize, in FormatCurve25519Key()
375 uint32_t size = (isPubKey ? km->pubKeySize : km->priKeySize); in GetCurve25519FromKeyMaterial()
378 km->pubKeySize, km->priKeySize); in GetCurve25519FromKeyMaterial()
508 ((struct KeyMaterialDh *)publicKey)->priKeySize = 0; in FormatDhKey()
Dhks_check_paramset.c589 (keyMaterial->priKeySize > HKS_CURVE25519_KEY_SIZE_256)) { in CheckCurve25519KeyLen()
594 if (keyMaterial->priKeySize == 0) { in CheckCurve25519KeyLen()
604 …t keySize = sizeof(struct HksKeyMaterial25519) + keyMaterial->pubKeySize + keyMaterial->priKeySize; in CheckCurve25519KeyLen()
627 …if ((keyMaterial->pubKeySize > HKS_DH_KEY_SIZE_4096) || (keyMaterial->priKeySize > HKS_DH_KEY_SIZE… in CheckDHKeyLen()
632 if (keyMaterial->priKeySize == 0) { in CheckDHKeyLen()
642 …32_t keySize = sizeof(struct HksKeyMaterialDh) + keyMaterial->pubKeySize + keyMaterial->priKeySize; in CheckDHKeyLen()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_dh.c60 …f (key->size != sizeof(struct KeyMaterialDh) + keyMaterial->pubKeySize + keyMaterial->priKeySize) { in InitDhStruct()
77 BIGNUM *privKey = BN_bin2bn(key->data + offset, keyMaterial->priKeySize, NULL); in InitDhStruct()
105 keyMaterial->priKeySize = (uint32_t)BN_num_bytes(privKey); in DhSaveKeyMaterial()
157 ((struct KeyMaterialDh *)output->data)->priKeySize = 0; in HksOpensslGetDhPubKey()
Dhks_openssl_curve25519.c60 keyMaterial->priKeySize = priKeyLen; in SaveCurve25519KeyMaterial()
119 …rs = EVP_PKEY_new_raw_private_key(EVP_PKEY_X25519, NULL, nativeKey->data + offset, km->priKeySize); in ImportX25519EvpKey()
227 key->data + offset, km->priKeySize); in HksOpensslEd25519Sign()
316 ((struct KeyMaterial25519 *)output->data)->priKeySize = 0; in HksOpensslGetEd25519PubKey()
Dhks_openssl_ed25519tox25519.c347 keyMaterialOut->priKeySize = 0; in ConvertPubkeyX25519FromED25519()
381 keyMaterialOut->priKeySize = CURVE25519_KEY_LEN; in ConvertPrivX25519FromED25519()
395 if (memcpy_s(keyOut->data + offset, keyMaterialOut->priKeySize, digest, in ConvertPrivX25519FromED25519()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_dh_helper.c62 keyMaterial->priKeySize = BN_num_bytes(privKey); in DhSaveKeyMaterial()
109 …f (key->size != sizeof(struct KeyMaterialDh) + keyMaterial->pubKeySize + keyMaterial->priKeySize) { in InitDhStruct()
127 BIGNUM *privKey = BN_bin2bn(key->data + offset, keyMaterial->priKeySize, NULL); in InitDhStruct()
210 ((struct KeyMaterialDh *)output->data)->priKeySize = 0; in DhGetDhPubKey()
248 keyMaterial->priKeySize = 0; in DhX509ToHksBlob()
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_keyblob_lite.c222 keyMaterial->priKeySize = HKS_KEY_BYTES(HKS_CURVE25519_KEY_SIZE_256); in Ed25519BlobToKeyMaterial()
245 (keyMaterial->priKeySize != HKS_KEY_BYTES(HKS_CURVE25519_KEY_SIZE_256)) || in Ed25519KeyMaterialToBlob()
246 (key->size < (sizeof(*keyMaterial) + keyMaterial->pubKeySize + keyMaterial->priKeySize))) { in Ed25519KeyMaterialToBlob()
248 key->size, keyMaterial->pubKeySize, keyMaterial->priKeySize); in Ed25519KeyMaterialToBlob()
252 int32_t ret = HksBlobInit(adjustedKey, keyMaterial->priKeySize + keyMaterial->pubKeySize); in Ed25519KeyMaterialToBlob()
257 keyMaterial->pubKeySize + keyMaterial->priKeySize) != EOK) { in Ed25519KeyMaterialToBlob()
Dhks_core_service.c1001 curve25519Key->priKeySize = key->size; /* curve25519 private key */ in GetCurve25519PrivateOrPairInnerFormat()
/base/security/huks/interfaces/kits/c/include/
Dnative_huks_type.h832 uint32_t priKeySize; member
851 uint32_t priKeySize; member
/base/security/huks/frameworks/huks_standard/main/common/include/
Dhks_crypto_hal.h106 uint32_t priKeySize; member
114 uint32_t priKeySize; member
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_import_agree_test.cpp722 material.priKeySize = key->privateOrYData.size; in ConstructCurve25519Key()
725 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructCurve25519Key()
825 material.priKeySize = key->privateOrYData.size; in ConstructDhKey()
828 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructDhKey()
Dhks_import_wrapped_x25519_suite_test.cpp328 material.priKeySize = key->privateOrYData.size; in ConstructCurve25519Key()
331 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructCurve25519Key()
Dhks_import_sign_verify_test.cpp437 material.priKeySize = privKeyBlob.size; in ConstructImportedCurve25519Key()
440 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructImportedCurve25519Key()
Dhks_access_control_test_common.cpp752 material.priKeySize = ed25519PrivData->size; in ConstructEd25519KeyPair()
755 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructEd25519KeyPair()
/base/security/huks/interfaces/inner_api/huks_standard/main/include/
Dhks_type.h733 uint32_t priKeySize; member
744 uint32_t priKeySize; member
/base/security/huks/test/unittest/huks_standard_test/module_test/interface_test/src/
Dhks_native_api_compatibility_test.cpp944 ASSERT_EQ(sizeof(keyMaterialDh.priKeySize) == sizeof(uint32_t), true);
950 ASSERT_EQ(sizeof(hksKeyMaterialDh.priKeySize) == sizeof(uint32_t), true);
966 ASSERT_EQ(sizeof(keyMaterial25519.priKeySize) == sizeof(uint32_t), true);
972 ASSERT_EQ(sizeof(hksKeyMaterial25519.priKeySize) == sizeof(uint32_t), true);
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_app_cert_process.c221 keyMaterial->priKeySize = priKeyLen; in SaveKeyMaterialCurve25519()
/base/security/huks/utils/crypto_adapter/
Dhks_client_service_adapter.c828 keyMaterial->priKeySize = 0; in X509PublicKeyToDh()