Home
last modified time | relevance | path

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

12

/system/keymaster/ng/include/
Dauthorization_set.h243 AuthorizationSetBuilder& RsaKey(uint32_t key_size, uint64_t public_exponent);
244 AuthorizationSetBuilder& EcdsaKey(uint32_t key_size);
245 AuthorizationSetBuilder& AesKey(uint32_t key_size);
246 AuthorizationSetBuilder& HmacKey(uint32_t key_size);
248 AuthorizationSetBuilder& RsaSigningKey(uint32_t key_size, uint64_t public_exponent);
249 AuthorizationSetBuilder& RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent);
250 AuthorizationSetBuilder& EcdsaSigningKey(uint32_t key_size);
251 AuthorizationSetBuilder& AesEncryptionKey(uint32_t key_size);
267 inline AuthorizationSetBuilder& AuthorizationSetBuilder::RsaKey(uint32_t key_size, in RsaKey() argument
270 Authorization(TAG_KEY_SIZE, key_size); in RsaKey()
[all …]
/system/keymaster/km_openssl/
Drsa_key_factory.cpp71 uint32_t key_size; in GenerateKey() local
72 if (!authorizations.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey()
76 if (key_size % 8 != 0 || key_size > kMaximumRsaKeySize || key_size < kMinimumRsaKeySize) { in GenerateKey()
77 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()
114 uint32_t key_size; in ImportKey() local
117 &authorizations, &public_exponent, &key_size); in ImportKey()
129 uint32_t* key_size) const { in UpdateImportKeyDescription()
130 if (!updated_description || !public_exponent || !key_size) in UpdateImportKeyDescription()
156 *key_size = RSA_size(rsa_key.get()) * 8; 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.cpp84 uint32_t key_size; in GenerateKey() local
85 keymaster_error_t error = GetCurveAndSize(authorizations, &ec_curve, &key_size); in GenerateKey()
88 } else if (!authorizations.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey()
89 authorizations.push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
137 uint32_t key_size; in ImportKey() local
139 key_description, input_key_material_format, input_key_material, &authorizations, &key_size); in ImportKey()
Daes_operation.h32 const EVP_CIPHER* GetCipherInstance(size_t key_size, keymaster_block_mode_t block_mode,
Dtriple_des_operation.h32 const EVP_CIPHER* GetCipherInstance(size_t key_size, keymaster_block_mode_t block_mode,
Dattestation_record.cpp182 integer_ptr = &record->key_size; in build_auth_list()
357 uint32_t key_size; in build_auth_list() local
360 auth_list.GetTagValue(TAG_KEY_SIZE, &key_size)) { in build_auth_list()
363 keymaster_error_t error = EcKeySizeToCurve(key_size, &ec_curve); in build_auth_list()
574 if (record->key_size && !auth_list->push_back(TAG_KEY_SIZE, ASN1_INTEGER_get(record->key_size))) in extract_auth_list()
/system/keymaster/include/keymaster/
Dauthorization_set.h525 AuthorizationSetBuilder& RsaKey(uint32_t key_size, uint64_t public_exponent);
526 AuthorizationSetBuilder& EcdsaKey(uint32_t key_size);
527 AuthorizationSetBuilder& AesKey(uint32_t key_size);
528 AuthorizationSetBuilder& TripleDesKey(uint32_t key_size);
529 AuthorizationSetBuilder& HmacKey(uint32_t key_size);
531 AuthorizationSetBuilder& RsaSigningKey(uint32_t key_size, uint64_t public_exponent);
532 AuthorizationSetBuilder& RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent);
533 AuthorizationSetBuilder& EcdsaSigningKey(uint32_t key_size);
534 AuthorizationSetBuilder& AesEncryptionKey(uint32_t key_size);
535 AuthorizationSetBuilder& TripleDesEncryptionKey(uint32_t key_size);
[all …]
/system/keymaster/legacy_support/
Dec_keymaster0_key.cpp47 uint32_t key_size; in GenerateKey() local
48 keymaster_error_t error = GetCurveAndSize(key_description, &ec_curve, &key_size); in GenerateKey()
54 if (!engine_->GenerateEcKey(key_size, &key_material)) in GenerateKey()
60 hw_enforced->push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
80 uint32_t key_size; in ImportKey() local
82 key_description, input_key_material_format, input_key_material, &authorizations, &key_size); in ImportKey()
93 hw_enforced->push_back(TAG_KEY_SIZE, key_size); in ImportKey()
Drsa_keymaster0_key.cpp49 uint32_t key_size; in GenerateKey() local
50 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey()
56 if (!engine_->GenerateRsaKey(public_exponent, key_size, &key_material)) in GenerateKey()
63 hw_enforced->push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
79 uint32_t key_size; in ImportKey() local
82 &authorizations, &public_exponent, &key_size); in ImportKey()
94 hw_enforced->push_back(TAG_KEY_SIZE, key_size); in ImportKey()
Dec_keymaster1_key.cpp72 uint32_t key_size; in GenerateKey() local
73 keymaster_error_t error = GetCurveAndSize(key_description, &ec_curve, &key_size); in GenerateKey()
76 } else if (!key_description.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey()
77 key_params_copy.push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
/system/bt/stack/gatt/
Dgatt_db.cc85 uint8_t key_size) { in gatts_check_attr_readability() argument
119 (sec_flag & GATT_SEC_FLAG_ENCRYPTED) && (key_size < min_key_size)) { in gatts_check_attr_readability()
166 tGATT_SEC_FLAG sec_flag, uint8_t key_size) { in read_attr_value() argument
174 sec_flag, key_size); in read_attr_value()
257 tGATT_SEC_FLAG sec_flag, uint8_t key_size, uint32_t trans_id, in gatts_db_read_attr_value_by_type() argument
274 &len, sec_flag, key_size); in gatts_db_read_attr_value_by_type()
445 tGATT_SEC_FLAG sec_flag, uint8_t key_size, uint32_t trans_id) { in gatts_read_attr_value_by_handle() argument
452 mtu, p_len, sec_flag, key_size); in gatts_read_attr_value_by_handle()
483 uint8_t key_size) { in gatts_read_attr_perm_check() argument
487 return gatts_check_attr_readability(*p_attr, 0, is_long, sec_flag, key_size); in gatts_read_attr_perm_check()
[all …]
Dgatt_sr.cc359 uint8_t sec_flag, key_size; in gatt_process_read_multi_req() local
364 gatt_sr_get_sec_info(tcb.peer_bda, tcb.transport, &sec_flag, &key_size); in gatt_process_read_multi_req()
390 key_size); in gatt_process_read_multi_req()
423 &p_msg->attr_value.len, GATT_MAX_ATTR_LEN, sec_flag, key_size, in gatt_process_read_multi_req()
827 uint8_t sec_flag, key_size; in gatts_process_read_by_type_req() local
828 gatt_sr_get_sec_info(tcb.peer_bda, tcb.transport, &sec_flag, &key_size); in gatts_process_read_by_type_req()
832 key_size, 0, &err_hdl); in gatts_process_read_by_type_req()
871 uint8_t sec_flag, key_size, *p = p_data; in gatts_process_write_req() local
907 gatt_sr_get_sec_info(tcb.peer_bda, tcb.transport, &sec_flag, &key_size); in gatts_process_write_req()
911 sec_flag, key_size); in gatts_process_write_req()
[all …]
/system/keymaster/tests/
Dwrapped_key_test.cpp94 uint32_t key_size; in TEST() local
95 auth_list.GetTagValue(TAG_KEY_SIZE, &key_size); in TEST()
96 EXPECT_EQ(key_size, (uint32_t)256); in TEST()
Dandroid_keymaster_test.cpp367 for (size_t key_size = 0; key_size <= kMaxHmacKeyLengthBits + 10; ++key_size) { in TEST_P() local
368 if (key_size < kMinHmacKeyLengthBits || key_size > kMaxHmacKeyLengthBits || in TEST_P()
369 key_size % 8 != 0) { in TEST_P()
372 .HmacKey(key_size) in TEST_P()
375 << "HMAC key size " << key_size << " invalid."; in TEST_P()
378 .HmacKey(key_size) in TEST_P()
743 for (int key_size : key_sizes) { in TEST_P() local
747 GenerateKey(AuthorizationSetBuilder().EcdsaSigningKey(key_size).Digest(digest))); in TEST_P()
752 message.resize(key_size / 8); in TEST_P()
1451 for (auto key_size : key_sizes) { in TEST_P() local
[all …]
/system/bpf/libbpf_android/include/bpf/
DBpfUtils.h66 inline int createMap(bpf_map_type map_type, uint32_t key_size, uint32_t value_size, in createMap() argument
70 .key_size = key_size, in createMap()
/system/security/keystore/
Dkeystore_cli_v2.cpp140 AuthorizationSet GetRSASignParameters(uint32_t key_size, bool sha256_only) { in GetRSASignParameters() argument
142 parameters.RsaSigningKey(key_size, 65537) in GetRSASignParameters()
153 AuthorizationSet GetRSAEncryptParameters(uint32_t key_size) { in GetRSAEncryptParameters() argument
155 parameters.RsaEncryptionKey(key_size, 65537) in GetRSAEncryptParameters()
162 AuthorizationSet GetECDSAParameters(uint32_t key_size, bool sha256_only) { in GetECDSAParameters() argument
164 parameters.EcdsaSigningKey(key_size) in GetECDSAParameters()
173 AuthorizationSet GetAESParameters(uint32_t key_size, bool with_gcm_mode) { in GetAESParameters() argument
175 parameters.AesEncryptionKey(key_size).Authorization(TAG_NO_AUTH_REQUIRED); in GetAESParameters()
188 AuthorizationSet GetHMACParameters(uint32_t key_size, Digest digest) { in GetHMACParameters() argument
190 parameters.HmacKey(key_size) in GetHMACParameters()
Dkeystore_client_impl.cpp564 auto key_size = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_KEY_SIZE), in verifyEncryptionKeyAttributes() local
566 if (!key_size.isOk() || key_size.value() != kAESKeySize) { in verifyEncryptionKeyAttributes()
605 auto key_size = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_KEY_SIZE), in verifyAuthenticationKeyAttributes() local
607 if (!key_size.isOk() || key_size.value() != kHMACKeySize) { in verifyAuthenticationKeyAttributes()
/system/bpf/progs/include/
Dbpf_map_def.h42 unsigned int key_size; member
/system/core/adb/pairing_auth/
Dpairing_auth.cpp121 size_t key_size = 0; in PairingAuthCtx() local
123 int status = SPAKE2_generate_msg(spake2_ctx_.get(), key, &key_size, SPAKE2_MAX_MSG_SIZE, in PairingAuthCtx()
125 if (status != 1 || key_size == 0) { in PairingAuthCtx()
129 our_msg_.assign(key, key + key_size); in PairingAuthCtx()
/system/core/fs_mgr/libfs_avb/tests/
Davb_util_test.cpp420 const size_t key_size = 2048; in TEST_F() local
421 base::FilePath key_path = GenerateImage("key.bin", key_size); in TEST_F()
423 uint8_t key_data[key_size]; in TEST_F()
424 EXPECT_EQ(key_size, base::ReadFile(key_path, (char*)key_data, key_size)); in TEST_F()
428 EXPECT_TRUE(ValidatePublicKeyBlob(key_data, key_size, expected_key_blob)); in TEST_F()
431 EXPECT_FALSE(ValidatePublicKeyBlob(key_data, key_size, expected_key_blob)); in TEST_F()
433 EXPECT_TRUE(ValidatePublicKeyBlob(key_data, key_size, expected_key_blob)); in TEST_F()
438 const size_t key_size = 2048; in TEST_F() local
439 base::FilePath key_path = GenerateImage("key.bin", key_size); in TEST_F()
441 uint8_t key_data[key_size]; in TEST_F()
[all …]
/system/keymaster/include/keymaster/km_openssl/
Drsa_key_factory.h58 uint32_t* key_size) const;
Dec_key_factory.h54 uint32_t* key_size) const;
/system/core/adb/tls/tests/
Dtls_connection_test.cpp416 const size_t key_size = 64; in TEST_F() local
417 auto client_key_material = client_->ExportKeyingMaterial(key_size); in TEST_F()
419 auto server_key_material = server_->ExportKeyingMaterial(key_size); in TEST_F()
421 ASSERT_EQ(client_key_material.size(), key_size); in TEST_F()

12