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/ |
D | hks_import_key_test.cpp | 66 .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/ |
D | openssl_dsa_helper.c | 29 #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/ |
D | hks_client_service_adapter.c | 449 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()
|
D | hks_client_service_adapter_lite.c | 294 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/ |
D | hks_mbedtls_aes.c | 62 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 …]
|
D | hks_mbedtls_hmac.c | 42 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()
|
D | hks_mbedtls_rsa.c | 65 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()
|
D | hks_mbedtls_x25519.c | 173 const uint32_t keyByteLen = HKS_X25519_KEY_BITS / HKS_BITS_PER_BYTE; in X25519SaveKeyMaterial()
|
/base/security/huks/interfaces/innerkits/huks_standard/main/include/ |
D | hks_type.h | 47 #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/ |
D | hks_local_engine.c | 183 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/ |
D | hks_openssl_dsa.c | 42 #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()
|
D | hks_openssl_aes.c | 320 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()
|
D | hks_openssl_rsa.c | 145 const uint32_t keyByteLen = keySize / HKS_BITS_PER_BYTE; in RsaSaveKeyMaterial()
|
/base/security/huks/frameworks/huks_standard/main/common/src/ |
D | hks_base_check.c | 988 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()
|
D | hks_check_paramset.c | 868 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/ |
D | hks_core_service_three_stage.c | 65 uint32_t keySize = keyLen / HKS_BITS_PER_BYTE; in CheckRsaCipherData()
|
D | hks_attest.c | 806 …uint32_t materialLen = sizeof(struct KeyMaterialRsa) + keySize / HKS_BITS_PER_BYTE * 3; /* 3 bits … in HksGetDevicePrivateKey()
|