Home
last modified time | relevance | path

Searched refs:key_size (Results 1 – 25 of 48) sorted by relevance

12

/system/keymaster/ng/include/
Dauthorization_set.h234 AuthorizationSetBuilder& RsaKey(uint32_t key_size, uint64_t public_exponent);
235 AuthorizationSetBuilder& EcdsaKey(uint32_t key_size);
236 AuthorizationSetBuilder& AesKey(uint32_t key_size);
237 AuthorizationSetBuilder& HmacKey(uint32_t key_size);
239 AuthorizationSetBuilder& RsaSigningKey(uint32_t key_size, uint64_t public_exponent);
240 AuthorizationSetBuilder& RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent);
241 AuthorizationSetBuilder& EcdsaSigningKey(uint32_t key_size);
242 AuthorizationSetBuilder& AesEncryptionKey(uint32_t key_size);
256 inline AuthorizationSetBuilder& AuthorizationSetBuilder::RsaKey(uint32_t key_size, in RsaKey() argument
259 Authorization(TAG_KEY_SIZE, key_size); in RsaKey()
[all …]
/system/keymaster/km_openssl/
Drsa_key_factory.cpp70 uint32_t key_size; in GenerateKey() local
71 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey()
75 if (key_size % 8 != 0 || key_size > kMaximumRsaKeySize || key_size < kMinimumRsaKeySize) { in GenerateKey()
76 LOG_E("Invalid key size of %u bits specified for RSA key generation", key_size); in GenerateKey()
88 !RSA_generate_key_ex(rsa_key.get(), key_size, exponent.get(), nullptr /* callback */)) in GenerateKey()
112 key_size < 1024 || !key_description.Contains(TAG_PURPOSE, KM_PURPOSE_SIGN); in GenerateKey()
133 uint32_t key_size; in ImportKey() local
136 &authorizations, &public_exponent, &key_size); in ImportKey()
160 key_size < 1024 || !key_description.Contains(TAG_PURPOSE, KM_PURPOSE_SIGN); in ImportKey()
173 uint32_t* key_size) const { in UpdateImportKeyDescription()
[all …]
Daes_operation.cpp30 const EVP_CIPHER* AesEvpCipherDescription::GetCipherInstance(size_t key_size, in GetCipherInstance() argument
37 switch (key_size) { in GetCipherInstance()
49 switch (key_size) { in GetCipherInstance()
61 switch (key_size) { in GetCipherInstance()
73 switch (key_size) { in GetCipherInstance()
Dtriple_des_operation.cpp30 TripleDesEvpCipherDescription::GetCipherInstance(size_t key_size, keymaster_block_mode_t block_mode, in GetCipherInstance() argument
36 switch (key_size) { in GetCipherInstance()
48 switch (key_size) { in GetCipherInstance()
Dec_key_factory.cpp91 uint32_t key_size; in GenerateKey() local
92 keymaster_error_t error = GetCurveAndSize(authorizations, &ec_curve, &key_size); in GenerateKey()
95 } else if (!authorizations.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey()
96 authorizations.push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
161 uint32_t key_size; in ImportKey() local
163 key_description, input_key_material_format, input_key_material, &authorizations, &key_size); in ImportKey()
Dtriple_des_operation.h32 const EVP_CIPHER* GetCipherInstance(size_t key_size, keymaster_block_mode_t block_mode,
Daes_operation.h32 const EVP_CIPHER* GetCipherInstance(size_t key_size, keymaster_block_mode_t block_mode,
/system/keymaster/include/keymaster/
Dauthorization_set.h519 AuthorizationSetBuilder& RsaKey(uint32_t key_size, uint64_t public_exponent);
520 AuthorizationSetBuilder& EcdsaKey(uint32_t key_size);
521 AuthorizationSetBuilder& AesKey(uint32_t key_size);
522 AuthorizationSetBuilder& TripleDesKey(uint32_t key_size);
523 AuthorizationSetBuilder& HmacKey(uint32_t key_size);
525 AuthorizationSetBuilder& RsaSigningKey(uint32_t key_size, uint64_t public_exponent);
526 AuthorizationSetBuilder& RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent);
527 AuthorizationSetBuilder& EcdsaSigningKey(uint32_t key_size);
528 AuthorizationSetBuilder& AesEncryptionKey(uint32_t key_size);
529 AuthorizationSetBuilder& TripleDesEncryptionKey(uint32_t key_size);
[all …]
/system/keymaster/legacy_support/
Dec_keymaster1_key.cpp76 uint32_t key_size; in GenerateKey() local
77 keymaster_error_t error = GetCurveAndSize(key_description, &ec_curve, &key_size); in GenerateKey()
80 } else if (!key_description.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey()
81 key_params_copy.push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
/system/bt/stack/gatt/
Dgatt_db.cc87 uint8_t key_size) { in gatts_check_attr_readability() argument
121 (sec_flag & GATT_SEC_FLAG_ENCRYPTED) && (key_size < min_key_size)) { in gatts_check_attr_readability()
168 tGATT_SEC_FLAG sec_flag, uint8_t key_size) { in read_attr_value() argument
176 sec_flag, key_size); in read_attr_value()
270 uint16_t* p_len, tGATT_SEC_FLAG sec_flag, uint8_t key_size, in gatts_db_read_attr_value_by_type() argument
287 &len, sec_flag, key_size); in gatts_db_read_attr_value_by_type()
472 uint16_t mtu, tGATT_SEC_FLAG sec_flag, uint8_t key_size, in gatts_read_attr_value_by_handle() argument
480 mtu, p_len, sec_flag, key_size); in gatts_read_attr_value_by_handle()
511 uint8_t key_size) { in gatts_read_attr_perm_check() argument
515 return gatts_check_attr_readability(*p_attr, 0, is_long, sec_flag, key_size); in gatts_read_attr_perm_check()
[all …]
Dgatt_sr.cc408 uint8_t sec_flag, key_size; in gatt_process_read_multi_req() local
415 gatt_sr_get_sec_info(tcb.peer_bda, tcb.transport, &sec_flag, &key_size); in gatt_process_read_multi_req()
440 key_size); in gatt_process_read_multi_req()
475 &p_msg->attr_value.len, GATT_MAX_ATTR_LEN, sec_flag, key_size, in gatt_process_read_multi_req()
891 uint8_t sec_flag, key_size; in gatts_process_read_by_type_req() local
892 gatt_sr_get_sec_info(tcb.peer_bda, tcb.transport, &sec_flag, &key_size); in gatts_process_read_by_type_req()
896 sec_flag, key_size, 0, &err_hdl); in gatts_process_read_by_type_req()
936 uint8_t sec_flag, key_size, *p = p_data; in gatts_process_write_req() local
973 gatt_sr_get_sec_info(tcb.peer_bda, tcb.transport, &sec_flag, &key_size); in gatts_process_write_req()
977 sec_flag, key_size); in gatts_process_write_req()
[all …]
/system/bt/gd/security/
Dpairing_handler_le.cc71 uint8_t key_size = in PairingMain() local
73 if (key_size < 7 || key_size > 16) { in PairingMain()
74 LOG_WARN("Resulting key size is bad %d", key_size); in PairingMain()
79 if (key_size != 16) { in PairingMain()
126 std::fill(ltk.begin() + key_size, ltk.end(), 0x00); in PairingMain()
156 std::fill(stk.begin() + key_size, stk.end(), 0x00); in PairingMain()
212 .key_size = key_size, in PairingMain()
289 uint8_t key_size = pairing_request->GetMaximumEncryptionKeySize(); in ExchangePairingFeature() local
290 if (key_size < 7 || key_size > 16) { in ExchangePairingFeature()
291 LOG_WARN("Resulting key size is bad %d", key_size); in ExchangePairingFeature()
/system/keymaster/tests/
Dwrapped_key_test.cpp93 uint32_t key_size; in TEST() local
94 auth_list.GetTagValue(TAG_KEY_SIZE, &key_size); in TEST()
95 EXPECT_EQ(key_size, (uint32_t)256); in TEST()
Dandroid_keymaster_test.cpp338 for (size_t key_size = 0; key_size <= kMaxHmacKeyLengthBits + 10; ++key_size) { in TEST_P() local
339 if (key_size < kMinHmacKeyLengthBits || key_size > kMaxHmacKeyLengthBits || in TEST_P()
340 key_size % 8 != 0) { in TEST_P()
343 .HmacKey(key_size) in TEST_P()
346 << "HMAC key size " << key_size << " invalid."; in TEST_P()
349 .HmacKey(key_size) in TEST_P()
646 for (int key_size : key_sizes) { in TEST_P() local
650 GenerateKey(AuthorizationSetBuilder().EcdsaSigningKey(key_size).Digest(digest))); in TEST_P()
654 if (digest == KM_DIGEST_NONE) message.resize(key_size / 8); in TEST_P()
1278 for (auto key_size : key_sizes) { in TEST_P() local
[all …]
/system/security/keystore2/src/crypto/
Dcrypto.cpp61 const EVP_CIPHER* getAesCipherForKey(size_t key_size) { in getAesCipherForKey() argument
63 if (key_size == kAes128KeySizeBytes) { in getAesCipherForKey()
79 size_t key_size, const uint8_t* iv, uint8_t* tag) { in AES_gcm_encrypt() argument
82 const EVP_CIPHER* cipher = getAesCipherForKey(key_size); in AES_gcm_encrypt()
115 size_t key_size, const uint8_t* iv, const uint8_t* tag) { in AES_gcm_decrypt() argument
118 const EVP_CIPHER* cipher = getAesCipherForKey(key_size); in AES_gcm_decrypt()
Dcrypto.hpp27 const uint8_t* key, size_t key_size, const uint8_t* iv, uint8_t* tag);
29 const uint8_t* key, size_t key_size, const uint8_t* iv,
/system/security/keystore2/src/crypto/tests/
Dcertificate_utils_test.cpp218 auto [key_size, padding, digest] = param.param; in paramsToStringRsa()
219 s << param.index << "_" << key_size << "_"; in paramsToStringRsa()
243 long key_size; in TEST_P() local
246 std::tie(key_size, padding, digest) = GetParam(); in TEST_P()
249 switch (key_size) { in TEST_P()
/system/security/keystore2/aidl/android/security/metrics/
DKeyCreationWithGeneralInfo.aidl30 int key_size;
/system/security/ondevice-signing/
DKeystoreHmacKey.cpp76 KeyParameter key_size; in createKey() local
77 key_size.tag = Tag::KEY_SIZE; in createKey()
78 key_size.value = KeyParameterValue::make<KeyParameterValue::integer>(kHmacKeySize); in createKey()
79 params.push_back(key_size); in createKey()
DKeystoreKey.cpp83 KeyParameter key_size; in createKey() local
84 key_size.tag = Tag::KEY_SIZE; in createKey()
85 key_size.value = KeyParameterValue::make<KeyParameterValue::integer>(kRsaKeySize); in createKey()
86 params.push_back(key_size); in createKey()
/system/bpf/progs/include/
Dbpf_map_def.h128 unsigned int key_size; member
/system/core/fs_mgr/libfs_avb/tests/
Davb_util_test.cpp424 const size_t key_size = 2048; in TEST_F() local
425 base::FilePath key_path = GenerateImage("key.bin", key_size); in TEST_F()
427 uint8_t key_data[key_size]; in TEST_F()
428 EXPECT_EQ(key_size, base::ReadFile(key_path, (char*)key_data, key_size)); in TEST_F()
432 EXPECT_TRUE(ValidatePublicKeyBlob(key_data, key_size, expected_key_blob)); in TEST_F()
435 EXPECT_FALSE(ValidatePublicKeyBlob(key_data, key_size, expected_key_blob)); in TEST_F()
437 EXPECT_TRUE(ValidatePublicKeyBlob(key_data, key_size, expected_key_blob)); in TEST_F()
442 const size_t key_size = 2048; in TEST_F() local
443 base::FilePath key_path = GenerateImage("key.bin", key_size); in TEST_F()
445 uint8_t key_data[key_size]; in TEST_F()
[all …]
/system/keymaster/include/keymaster/km_openssl/
Drsa_key_factory.h63 uint32_t* key_size) const;
Dec_key_factory.h59 uint32_t* key_size) const;
/system/security/keystore/
Dkeystore_cli_v2.cpp595 keymint::AuthorizationSet GetRSASignParameters(uint32_t key_size, bool sha256_only) { in GetRSASignParameters() argument
597 parameters.RsaSigningKey(key_size, 65537) in GetRSASignParameters()
610 keymint::AuthorizationSet GetRSAEncryptParameters(uint32_t key_size) { in GetRSAEncryptParameters() argument
612 parameters.RsaEncryptionKey(key_size, 65537) in GetRSAEncryptParameters()
619 keymint::AuthorizationSet GetECDSAParameters(uint32_t key_size, bool sha256_only) { in GetECDSAParameters() argument
621 parameters.EcdsaSigningKey(key_size) in GetECDSAParameters()
632 keymint::AuthorizationSet GetAESParameters(uint32_t key_size, bool with_gcm_mode) { in GetAESParameters() argument
634 parameters.AesEncryptionKey(key_size).Authorization(keymint::TAG_NO_AUTH_REQUIRED); in GetAESParameters()
647 keymint::AuthorizationSet GetHMACParameters(uint32_t key_size, keymint::Digest digest) { in GetHMACParameters() argument
649 parameters.HmacKey(key_size) in GetHMACParameters()

12