/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/ |
D | hks_crypto_ed25519.c | 65 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()
|
D | hks_mbedtls_dh.c | 83 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()
|
D | hks_mbedtls_x25519.c | 113 (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/ |
D | hks_crypto_adapter.c | 292 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()
|
D | hks_check_paramset.c | 589 (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/ |
D | hks_openssl_dh.c | 60 …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()
|
D | hks_openssl_curve25519.c | 60 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()
|
D | hks_openssl_ed25519tox25519.c | 347 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/ |
D | openssl_dh_helper.c | 62 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/ |
D | hks_keyblob_lite.c | 222 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()
|
D | hks_core_service.c | 1001 curve25519Key->priKeySize = key->size; /* curve25519 private key */ in GetCurve25519PrivateOrPairInnerFormat()
|
/base/security/huks/interfaces/kits/c/include/ |
D | native_huks_type.h | 832 uint32_t priKeySize; member 851 uint32_t priKeySize; member
|
/base/security/huks/frameworks/huks_standard/main/common/include/ |
D | hks_crypto_hal.h | 106 uint32_t priKeySize; member 114 uint32_t priKeySize; member
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
D | hks_import_agree_test.cpp | 722 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()
|
D | hks_import_wrapped_x25519_suite_test.cpp | 328 material.priKeySize = key->privateOrYData.size; in ConstructCurve25519Key() 331 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructCurve25519Key()
|
D | hks_import_sign_verify_test.cpp | 437 material.priKeySize = privKeyBlob.size; in ConstructImportedCurve25519Key() 440 uint32_t size = sizeof(material) + material.pubKeySize + material.priKeySize; in ConstructImportedCurve25519Key()
|
D | hks_access_control_test_common.cpp | 752 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/ |
D | hks_type.h | 733 uint32_t priKeySize; member 744 uint32_t priKeySize; member
|
/base/security/huks/test/unittest/huks_standard_test/module_test/interface_test/src/ |
D | hks_native_api_compatibility_test.cpp | 944 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/ |
D | cert_manager_app_cert_process.c | 221 keyMaterial->priKeySize = priKeyLen; in SaveKeyMaterialCurve25519()
|
/base/security/huks/utils/crypto_adapter/ |
D | hks_client_service_adapter.c | 828 keyMaterial->priKeySize = 0; in X509PublicKeyToDh()
|