Home
last modified time | relevance | path

Searched refs:BlockMode (Results 1 – 25 of 36) sorted by relevance

12

/system/security/keystore2/tests/
Dkeystore2_client_aes_key_tests.rs16 Algorithm::Algorithm, BlockMode::BlockMode, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose,
37 block_mode: BlockMode, in create_aes_key_and_operation() argument
88 let block_modes = [BlockMode::ECB, BlockMode::CBC]; in keystore2_aes_ecb_cbc_generate_key()
120 let key_params = [(BlockMode::CTR, None, None), (BlockMode::GCM, Some(128), Some(128))]; in keystore2_aes_ctr_gcm_generate_key_success()
150 let key_params = [(BlockMode::CTR, None, None), (BlockMode::GCM, Some(128), Some(128))]; in keystore2_aes_ctr_gcm_generate_key_fails_incompatible()
186 &BlockMode::ECB, in keystore2_aes_key_fails_unsupported_key_size()
207 &BlockMode::GCM, in keystore2_aes_gcm_key_fails_missing_min_mac_len()
228 .block_mode(BlockMode::ECB) in keystore2_aes_key_op_fails_multi_block_modes()
229 .block_mode(BlockMode::CBC) in keystore2_aes_key_op_fails_multi_block_modes()
249 .block_mode(BlockMode::ECB) in keystore2_aes_key_op_fails_multi_block_modes()
[all …]
Dkeystore2_client_3des_key_tests.rs16 Algorithm::Algorithm, BlockMode::BlockMode, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose,
36 block_mode: BlockMode, in create_3des_key_and_operation() argument
84 let block_modes = [BlockMode::ECB, BlockMode::CBC]; in keystore2_3des_ecb_cbc_generate_key_success()
113 &BlockMode::CBC, in keystore2_3des_key_fails_unsupported_key_size()
135 .block_mode(BlockMode::ECB); in keystore2_3des_key_fails_missing_padding()
154 .block_mode(BlockMode::ECB); in keystore2_3des_key_fails_missing_padding()
179 &BlockMode::ECB, in keystore2_3des_key_encrypt_fails_invalid_input_length()
187 .block_mode(BlockMode::ECB); in keystore2_3des_key_encrypt_fails_invalid_input_length()
213 BlockMode::CTR, in keystore2_3des_key_fails_unsupported_block_mode()
Dkeystore2_client_test_utils.rs30 BlockMode::BlockMode, Digest::Digest, ErrorCode::ErrorCode,
312 block_mode: BlockMode, in perform_sample_sym_key_encrypt_op() argument
343 block_mode: BlockMode, in perform_sample_sym_key_decrypt_op() argument
391 .block_mode(BlockMode::GCM) in encrypt_secure_key()
Dkeystore2_client_attest_key_tests.rs18 Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
407 &BlockMode::ECB, in keystore2_attest_rsa_key_with_symmetric_key_fails_sys_error()
463 .block_mode(BlockMode::ECB) in keystore2_attest_symmetric_key_fail_sys_error()
Dkeystore2_client_import_keys_tests.rs21 Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
69 BlockMode::ECB, in perform_sym_key_encrypt_decrypt_op()
82 BlockMode::ECB, in perform_sym_key_encrypt_decrypt_op()
/system/keymint/common/src/tag/info/
Dtests.rs60 (true, vec![Tag::BlockMode, Tag::Padding]), in test_tag_tracker()
61 (true, vec![Tag::BlockMode, Tag::Padding, Tag::BlockMode]), in test_tag_tracker()
62 (true, vec![Tag::BlockMode, Tag::EcCurve]), in test_tag_tracker()
63 (true, vec![Tag::BlockMode, Tag::EcCurve, Tag::BlockMode]), in test_tag_tracker()
64 (false, vec![Tag::BlockMode, Tag::EcCurve, Tag::BlockMode, Tag::EcCurve]), in test_tag_tracker()
/system/keymint/common/src/crypto/
Ddes.rs8 keymint::{BlockMode, KeyParam, PaddingMode},
65 BlockMode::Ecb => { in new()
78 BlockMode::Cbc => { in new()
Daes.rs7 use kmr_wire::keymint::{BlockMode, ErrorCode, KeyParam, PaddingMode};
96 BlockMode::Ecb => { in new()
109 BlockMode::Cbc => { in new()
123 BlockMode::Ctr => { in new()
136 BlockMode::Gcm => { in new()
/system/security/keystore2/test_utils/
Dauthorizations.rs20 Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
99 pub fn block_mode(mut self, b: BlockMode) -> Self { in block_mode()
100 self.0.push(KeyParameter { tag: Tag::BLOCK_MODE, value: KeyParameterValue::BlockMode(b) }); in block_mode()
Dkey_generations.rs20 Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
58 pub block_mode: Option<BlockMode>,
483 block_mode: &BlockMode, in generate_sym_key() argument
804 .block_mode(BlockMode::ECB) in import_aes_key()
835 KeyParameter { tag: Tag::BLOCK_MODE, value: KeyParameterValue::BlockMode(BlockMode::ECB) } in import_aes_key()
860 .block_mode(BlockMode::ECB) in import_3des_key()
894 KeyParameter { tag: Tag::BLOCK_MODE, value: KeyParameterValue::BlockMode(BlockMode::ECB) } in import_3des_key()
1034 .block_mode(BlockMode::GCM) in import_transport_key()
/system/keymint/common/src/
Dtag.rs11 Algorithm, BlockMode, Digest, EcCurve, ErrorCode, KeyCharacteristics, KeyFormat, KeyParam,
173 pub fn get_block_mode(params: &[KeyParam]) -> Result<BlockMode, Error> { in get_block_mode() argument
174 get_tag_value!(params, BlockMode, ErrorCode::UnsupportedBlockMode) in get_block_mode()
725 let gcm_support = params.iter().any(|p| *p == KeyParam::BlockMode(BlockMode::Gcm)); in check_aes_params()
989 if let Some(bmode) = get_opt_tag_value!(params, BlockMode, UnsupportedBlockMode)? { in check_begin_params()
990 if !contains_tag_value!(chars, BlockMode, *bmode) { in check_begin_params()
1172 if bmode == BlockMode::Gcm { in check_begin_aes_params()
1188 BlockMode::Gcm | BlockMode::Ctr => match padding { in check_begin_aes_params()
1198 BlockMode::Ecb | BlockMode::Cbc => match padding { in check_begin_aes_params()
1212 BlockMode::Cbc if nonce.len() == 16 => {} in check_begin_aes_params()
[all …]
/system/security/keystore2/src/
Dmetrics_store.rs26 Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
265 KsKeyParamValue::BlockMode(b) => { in process_key_creation_event_stats()
394 KsKeyParamValue::BlockMode(b) => { in process_key_operation_event_stats()
476 fn compute_block_mode_bitmap(block_mode_bitmap: &mut i32, block_mode: BlockMode) { in compute_block_mode_bitmap() argument
478 BlockMode::ECB => { in compute_block_mode_bitmap()
481 BlockMode::CBC => { in compute_block_mode_bitmap()
484 BlockMode::CTR => { in compute_block_mode_bitmap()
487 BlockMode::GCM => { in compute_block_mode_bitmap()
Dkey_parameter.rs100 Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
167 implement_associate_primitive_for_aidl_enum! {BlockMode}
833 #[key_param(tag = BLOCK_MODE, field = BlockMode)]
834 BlockMode(BlockMode),
1103 Tag::BLOCK_MODE => return KmKeyParameterValue::BlockMode(Default::default()), in get_field_by_tag_type()
1139 | (&KmKeyParameterValue::BlockMode(_), KmKeyParameterValue::BlockMode(_)) in check_field_matches_tag_type()
/system/security/keystore2/src/km_compat/
Dkm_compat_type_conversion.h314 static V4_0::BlockMode convert(KMV1::BlockMode b) { in convert()
316 case KMV1::BlockMode::ECB: in convert()
317 return V4_0::BlockMode::ECB; in convert()
318 case KMV1::BlockMode::CBC: in convert()
319 return V4_0::BlockMode::CBC; in convert()
320 case KMV1::BlockMode::CTR: in convert()
321 return V4_0::BlockMode::CTR; in convert()
322 case KMV1::BlockMode::GCM: in convert()
323 return V4_0::BlockMode::GCM; in convert()
327 static KMV1::BlockMode convert(V4_0::BlockMode b) { in convert()
[all …]
Dparameter_conversion_test.cpp47 TEST_ENUM_CONVERSION(BlockMode, ECB); in TEST()
48 TEST_ENUM_CONVERSION(BlockMode, CBC); in TEST()
49 TEST_ENUM_CONVERSION(BlockMode, CTR); in TEST()
50 TEST_ENUM_CONVERSION(BlockMode, GCM); in TEST()
Dlib.rs32 Algorithm::Algorithm, BeginResult::BeginResult, BlockMode::BlockMode, Digest::Digest,
223 value: KeyParameterValue::BlockMode(BlockMode::CBC), in generate_aes_key()
253 value: KeyParameterValue::BlockMode(BlockMode::CBC), in begin()
Dslot_test.cpp26 using ::aidl::android::hardware::security::keymint::BlockMode;
43 KMV1::makeKeyParameter(KMV1::TAG_BLOCK_MODE, BlockMode::CBC), in generateAESKey()
81 kps.push_back(KMV1::makeKeyParameter(KMV1::TAG_BLOCK_MODE, BlockMode::CBC)); in begin()
Dcertificate_test.cpp37 using ::aidl::android::hardware::security::keymint::BlockMode;
118 KMV1::makeKeyParameter(KMV1::TAG_BLOCK_MODE, BlockMode::CBC), in TEST()
/system/keymint/wire/src/
Dkeymint.rs129 pub enum BlockMode { enum
135 try_from_n!(BlockMode);
327 BlockMode(BlockMode), enumerator
389 KeyParam::BlockMode(_) => Tag::BlockMode, in tag()
478 Tag::BlockMode => KeyParam::BlockMode(<BlockMode>::from_cbor_value(raw)?), in from_cbor_value()
603 KeyParam::BlockMode(v) => (Tag::BlockMode, v.to_cbor_value()?), in to_cbor_value()
749 Tag::BlockMode as i32, in cddl_schema()
750 BlockMode::cddl_ref(), in cddl_schema()
991 BlockMode = 536870916, enumerator
/system/keymint/tests/tests/
Dkeyblob_test.rs26 KeyParam::BlockMode(keymint::BlockMode::Ecb), in test_encrypted_keyblob_roundtrip()
/system/keymint/common/src/tag/
Dlegacy.rs9 Algorithm, BlockMode, DateTime, Digest, EcCurve, KeyOrigin, KeyParam, KeyPurpose,
159 KeyParam::BlockMode(v) => result.try_extend_from_slice(&(*v as u32).to_ne_bytes())?, in serialize()
323 Tag::BlockMode => { in deserialize()
324 KeyParam::BlockMode(<BlockMode>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
518 (KeyParam::BlockMode(l), KeyParam::BlockMode(r)) => l.cmp(r), in param_compare()
/system/keymint/hal/src/
Dhal.rs218 KeyParam::BlockMode(v) => (Tag::BLOCK_MODE, KeyParameterValue::BlockMode(v.innto())), in fromm()
479 Some(KeyParam::BlockMode(value_of!(val, BlockMode)?.try_innto()?)) in try_fromm()
717 enum_convert! { wire::keymint::BlockMode => keymint::BlockMode::BlockMode }
/system/keymint/common/src/bin/
Dcddl-dump.rs23 show_schema::<BlockMode>(); in main()
/system/keymint/common/src/keyblob/
Dkeyblob.cddl78 [536870916, BlockMode], ; Tag_BlockMode
212 BlockMode = &(
/system/security/keystore/
Dkeystore_cli_v2.cpp182 keymint::BlockMode::CBC); in verifyEncryptionKeyAttributes()
261 .Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::CBC) in loadOrCreateAndVerifyEncryptionKey()
370 .Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::CBC); in encryptWithAuthentication()
522 .Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::CBC); in decryptWithAuthentication()
647 parameters.Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::GCM) in GetAESParameters()
650 parameters.Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::ECB); in GetAESParameters()
651 parameters.Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::CBC); in GetAESParameters()
652 parameters.Authorization(keymint::TAG_BLOCK_MODE, keymint::BlockMode::CTR); in GetAESParameters()

12