Home
last modified time | relevance | path

Searched refs:HKS_BITS_PER_BYTE (Results 1 – 17 of 17) sorted by relevance

/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_import_key_test.cpp66 .keySize = HKS_AES_KEY_SIZE_128 / HKS_BITS_PER_BYTE,
80 .keySize = HKS_AES_KEY_SIZE_192 / HKS_BITS_PER_BYTE,
94 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
108 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
122 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
136 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
149 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
162 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
175 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
188 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE,
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_dsa_helper.c29 #define OPENSSL_DSA_KEY_LEN_DIVID (2048 / HKS_BITS_PER_BYTE)
282 if ((ySize > UINT32_MAX - HKS_BITS_PER_BYTE) || in X509ToDsaPublicKey()
283 …((ySize + HKS_BITS_PER_BYTE - 1) / HKS_BITS_PER_BYTE > UINT32_MAX / (HKS_BITS_PER_BYTE * HKS_BITS_… in X509ToDsaPublicKey()
289 …keyMaterial->keySize = (ySize + HKS_BITS_PER_BYTE - 1) / HKS_BITS_PER_BYTE * HKS_BITS_PER_BYTE * H… in X509ToDsaPublicKey()
355 keyMaterial->keySize = keyByteLen * HKS_BITS_PER_BYTE; in SaveDsaKeyToHksBlob()
/base/security/huks/utils/crypto_adapter/
Dhks_client_service_adapter.c449 pubKeyInfo->keySize = ((uint32_t)RSA_size(rsa)) * HKS_BITS_PER_BYTE; in X509PublicKeyToRsa()
574 if ((ySize > UINT32_MAX - HKS_BITS_PER_BYTE) || in X509PublicKeyToDsa()
575 …((ySize + HKS_BITS_PER_BYTE - 1) / HKS_BITS_PER_BYTE > UINT32_MAX / (HKS_BITS_PER_BYTE * HKS_BITS_… in X509PublicKeyToDsa()
582 …keyMaterial->keySize = (ySize + HKS_BITS_PER_BYTE - 1) / HKS_BITS_PER_BYTE * HKS_BITS_PER_BYTE * H… in X509PublicKeyToDsa()
Dhks_client_service_adapter_lite.c294 uint32_t maxKeyByteLen = HKS_RSA_KEY_SIZE_4096 / HKS_BITS_PER_BYTE; in CheckRsaCtx()
318 pubKeyInfo->keySize = rsaCtx->MBEDTLS_PRIVATE(len) * HKS_BITS_PER_BYTE; in X509PublicKeyToRsa()
348 uint32_t maxKeyByteLen = HKS_ECC_KEY_SIZE_521 / HKS_BITS_PER_BYTE; in CheckEccXySize()
371 if (mbedtls_mpi_size(&(pubKey->MBEDTLS_PRIVATE(grp).P)) > UINT32_MAX / HKS_BITS_PER_BYTE) { in X509PublicKeyToEcc()
379 pubKeyInfo->keySize = mbedtls_mpi_size(&(pubKey->MBEDTLS_PRIVATE(grp).P)) * HKS_BITS_PER_BYTE; in X509PublicKeyToEcc()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_mbedtls_aes.c62 const uint32_t keyByteLen = spec->keyLen / HKS_BITS_PER_BYTE; in HksMbedtlsAesGenerateKey()
106 ret = mbedtls_aes_setkey_enc(&ctx, key->data, key->size * HKS_BITS_PER_BYTE); in AesCbcNoPaddingCrypt()
108 ret = mbedtls_aes_setkey_dec(&ctx, key->data, key->size * HKS_BITS_PER_BYTE); in AesCbcNoPaddingCrypt()
150 ret = mbedtls_aes_setkey_enc(ctx, key->data, key->size * HKS_BITS_PER_BYTE); in AesCbcNoPaddingCryptInit()
152 ret = mbedtls_aes_setkey_dec(ctx, key->data, key->size * HKS_BITS_PER_BYTE); in AesCbcNoPaddingCryptInit()
281 const uint32_t keyBitLen = key->size * HKS_BITS_PER_BYTE; in AesCbcPkcs7Crypt()
323 const uint32_t keyBitLen = key->size * HKS_BITS_PER_BYTE; in AesCbcPkcs7CryptInitParam()
536 … ret = mbedtls_gcm_setkey(&ctx, MBEDTLS_CIPHER_ID_AES, key->data, key->size * HKS_BITS_PER_BYTE); in AesEncryptGcm()
574 … ret = mbedtls_gcm_setkey(gcmCtx, MBEDTLS_CIPHER_ID_AES, key->data, key->size * HKS_BITS_PER_BYTE); in AesEncryptGcmInit()
676 … ret = mbedtls_gcm_setkey(&ctx, MBEDTLS_CIPHER_ID_AES, key->data, key->size * HKS_BITS_PER_BYTE); in AesDecryptGcm()
[all …]
Dhks_mbedtls_hmac.c42 if ((spec->keyLen == 0) || (spec->keyLen % HKS_BITS_PER_BYTE != 0)) { in HksMbedtlsHmacGenerateKey()
46 const uint32_t keyByteLen = spec->keyLen / HKS_BITS_PER_BYTE; in HksMbedtlsHmacGenerateKey()
Dhks_mbedtls_rsa.c65 const uint32_t maxKeyByteLen = HKS_RSA_KEY_SIZE_4096 / HKS_BITS_PER_BYTE; in RsaKeyMaterialNedSizeCheck()
100 const uint32_t keyByteLen = keySize / HKS_BITS_PER_BYTE; in RsaSaveKeyMaterial()
Dhks_mbedtls_x25519.c173 const uint32_t keyByteLen = HKS_X25519_KEY_BITS / HKS_BITS_PER_BYTE; in X25519SaveKeyMaterial()
/base/security/huks/interfaces/innerkits/huks_standard/main/include/
Dhks_type.h47 #define HKS_BITS_PER_BYTE 8 macro
54 #define HKS_KEY_BYTES(keySize) (((keySize) + HKS_BITS_PER_BYTE - 1) / HKS_BITS_PER_BYTE)
/base/security/huks/frameworks/huks_standard/main/core/src/
Dhks_local_engine.c183 keySize = key->size * HKS_BITS_PER_BYTE; in CheckLocalCipherParams()
269 keySize = key->size * HKS_BITS_PER_BYTE; in CheckLocalSignVerifyParams()
276 if (key->size != (HKS_CURVE25519_KEY_SIZE_256 / HKS_BITS_PER_BYTE)) { in CheckLocalSignVerifyParams()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_dsa.c42 #define OPENSSL_DSA_KEY_LEN_DIVID (2048 / HKS_BITS_PER_BYTE)
190 keyMaterial->keySize = keyLen * HKS_BITS_PER_BYTE; in DsaKeyMaterialParam()
269 if ((spec->keyLen == 0) || (spec->keyLen % HKS_BITS_PER_BYTE != 0)) { in HksOpensslDsaGenerateKey()
Dhks_openssl_aes.c320 case (HKS_AES_KEY_SIZE_128 / HKS_BITS_PER_BYTE): in GetGcmCipherType()
322 case (HKS_AES_KEY_SIZE_192 / HKS_BITS_PER_BYTE): in GetGcmCipherType()
324 case (HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE): in GetGcmCipherType()
Dhks_openssl_rsa.c145 const uint32_t keyByteLen = keySize / HKS_BITS_PER_BYTE; in RsaSaveKeyMaterial()
/base/security/huks/frameworks/huks_standard/main/common/src/
Dhks_base_check.c988 uint32_t eccSignRSize = keySize / HKS_BITS_PER_BYTE + keySize % HKS_BITS_PER_BYTE; in CheckEccSignature()
1060 if (signature->size < keySize / HKS_BITS_PER_BYTE) { in CheckRsaSignature()
1067 if (signature->size > keySize / HKS_BITS_PER_BYTE) { in CheckRsaSignature()
1148 uint32_t keySize = inputParams->keyLen.value / HKS_BITS_PER_BYTE; in CheckRsaCipherData()
Dhks_check_paramset.c868 keySize = privateKey->size * HKS_BITS_PER_BYTE; in HksCoreCheckAgreeKeyParams()
875 uint32_t size = keySize / HKS_BITS_PER_BYTE + keySize % HKS_BITS_PER_BYTE; in HksCoreCheckAgreeKeyParams()
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_service_three_stage.c65 uint32_t keySize = keyLen / HKS_BITS_PER_BYTE; in CheckRsaCipherData()
Dhks_attest.c806 …uint32_t materialLen = sizeof(struct KeyMaterialRsa) + keySize / HKS_BITS_PER_BYTE * 3; /* 3 bits … in HksGetDevicePrivateKey()