Home
last modified time | relevance | path

Searched refs:PaddingMode (Results 1 – 25 of 43) sorted by relevance

12

/system/security/keystore2/tests/
Dkeystore2_client_rsa_key_tests.rs16 Digest::Digest, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
114 padding: PaddingMode, in perform_rsa_sign_key_op_success() argument
151 fn perform_rsa_sign_key_op_failure(digest: Digest, alias: &str, padding: PaddingMode) { in perform_rsa_sign_key_op_failure() argument
187 padding: PaddingMode, in create_rsa_encrypt_decrypt_key_op_success() argument
224 PaddingMode::RSA_PKCS1_1_5_SIGN
230 PaddingMode::RSA_PKCS1_1_5_SIGN
236 PaddingMode::RSA_PKCS1_1_5_SIGN
242 PaddingMode::RSA_PKCS1_1_5_SIGN
248 PaddingMode::RSA_PKCS1_1_5_SIGN
254 PaddingMode::RSA_PKCS1_1_5_SIGN
[all …]
Dkeystore2_client_aes_key_tests.rs17 PaddingMode::PaddingMode, SecurityLevel::SecurityLevel,
36 padding_mode: PaddingMode, in create_aes_key_and_operation() argument
89 let padding_modes = [PaddingMode::PKCS7, PaddingMode::NONE]; in keystore2_aes_ecb_cbc_generate_key()
129 PaddingMode::NONE, in keystore2_aes_ctr_gcm_generate_key_success()
159 PaddingMode::PKCS7, in keystore2_aes_ctr_gcm_generate_key_fails_incompatible()
185 &PaddingMode::NONE, in keystore2_aes_key_fails_unsupported_key_size()
206 &PaddingMode::NONE, in keystore2_aes_gcm_key_fails_missing_min_mac_len()
230 .padding_mode(PaddingMode::NONE); in keystore2_aes_key_op_fails_multi_block_modes()
251 .padding_mode(PaddingMode::NONE); in keystore2_aes_key_op_fails_multi_block_modes()
277 .padding_mode(PaddingMode::PKCS7) in keystore2_aes_key_op_fails_multi_padding_modes()
[all …]
Dkeystore2_client_3des_key_tests.rs17 PaddingMode::PaddingMode, SecurityLevel::SecurityLevel,
35 padding_mode: PaddingMode, in create_3des_key_and_operation() argument
85 let padding_modes = [PaddingMode::PKCS7, PaddingMode::NONE]; in keystore2_3des_ecb_cbc_generate_key_success()
112 &PaddingMode::PKCS7, in keystore2_3des_key_fails_unsupported_key_size()
178 &PaddingMode::NONE, in keystore2_3des_key_encrypt_fails_invalid_input_length()
186 .padding_mode(PaddingMode::NONE) in keystore2_3des_key_encrypt_fails_invalid_input_length()
212 PaddingMode::NONE, in keystore2_3des_key_fails_unsupported_block_mode()
Dkeystore2_client_import_keys_tests.rs23 KeyPurpose::KeyPurpose, PaddingMode::PaddingMode, SecurityLevel::SecurityLevel,
59 Some(PaddingMode::RSA_PSS), in import_rsa_sign_key_and_perform_sample_operation()
70 PaddingMode::PKCS7, in perform_sym_key_encrypt_decrypt_op()
83 PaddingMode::PKCS7, in perform_sym_key_encrypt_decrypt_op()
149 .padding_mode(PaddingMode::RSA_PSS) in keystore2_rsa_import_key_success()
182 .padding_mode(PaddingMode::RSA_PSS) in keystore2_rsa_import_key_determine_key_size_and_pub_exponent()
210 .padding_mode(PaddingMode::RSA_PSS) in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error()
243 .padding_mode(PaddingMode::RSA_PSS) in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error()
277 .padding_mode(PaddingMode::RSA_PSS) in keystore2_rsa_import_key_with_multipurpose_fails_incompt_purpose_error()
544 .padding_mode(PaddingMode::RSA_OAEP) in keystore2_import_wrapped_key_success()
[all …]
Dkeystore2_client_test_utils.rs36 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
251 pub fn get_openssl_padding_mode(padding: PaddingMode) -> Padding { in get_openssl_padding_mode()
253 PaddingMode::RSA_OAEP => Padding::PKCS1_OAEP, in get_openssl_padding_mode()
254 PaddingMode::RSA_PSS => Padding::PKCS1_PSS, in get_openssl_padding_mode()
255 PaddingMode::RSA_PKCS1_1_5_SIGN => Padding::PKCS1, in get_openssl_padding_mode()
256 PaddingMode::RSA_PKCS1_1_5_ENCRYPT => Padding::PKCS1, in get_openssl_padding_mode()
265 padding: Option<PaddingMode>, in perform_sample_asym_sign_verify_op() argument
364 padding_mode: PaddingMode, in perform_sample_sym_key_encrypt_op() argument
395 padding_mode: PaddingMode, in perform_sample_sym_key_decrypt_op() argument
454 .padding_mode(PaddingMode::NONE) in encrypt_secure_key()
Dkeystore2_client_attest_key_tests.rs19 ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
73 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_attest_rsa_signing_key_success()
121 padding: Some(PaddingMode::RSA_PKCS1_1_5_ENCRYPT), in keystore2_attest_rsa_encrypt_key_success()
214 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_attest_rsa_signing_key_with_ec_25519_key_success()
241 let padding = PaddingMode::RSA_PKCS1_1_5_SIGN; in keystore2_generate_rsa_attest_key_with_multi_purpose_fail()
341 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_attest_key_fails_missing_challenge()
384 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_attest_rsa_key_with_non_attest_key_fails_incompat_purpose_error()
412 &PaddingMode::NONE, in keystore2_attest_rsa_key_with_symmetric_key_fails_sys_error()
428 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_attest_rsa_key_with_symmetric_key_fails_sys_error()
468 .padding_mode(PaddingMode::NONE) in keystore2_attest_symmetric_key_fail_sys_error()
Dkeystore2_client_device_unique_attestation_tests.rs16 KeyPurpose::KeyPurpose, PaddingMode::PaddingMode, SecurityLevel::SecurityLevel, Tag::Tag,
78 .padding_mode(PaddingMode::RSA_PKCS1_1_5_SIGN) in generate_rsa_key_device_unique_attested_with_id_attest()
257 .padding_mode(PaddingMode::RSA_PKCS1_1_5_SIGN) in keystore2_gen_rsa_key_device_unique_attest_with_strongbox_sec_level_test_success()
271 Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_gen_rsa_key_device_unique_attest_with_strongbox_sec_level_test_success()
Dkeystore2_client_keystore_engine_tests.rs20 PaddingMode::PaddingMode, SecurityLevel::SecurityLevel,
47 .padding_mode(PaddingMode::NONE) in generate_rsa_key_and_grant_to_user()
Dkeystore2_client_authorizations_tests.rs22 ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
363 .padding_mode(PaddingMode::PKCS7) in keystore2_gen_key_auth_usage_future_expire_datetime_decrypt_op_success()
371 PaddingMode::PKCS7, in keystore2_gen_key_auth_usage_future_expire_datetime_decrypt_op_success()
384 PaddingMode::PKCS7, in keystore2_gen_key_auth_usage_future_expire_datetime_decrypt_op_success()
413 .padding_mode(PaddingMode::PKCS7) in keystore2_gen_key_auth_usage_expire_datetime_decrypt_op_fail()
421 PaddingMode::PKCS7, in keystore2_gen_key_auth_usage_expire_datetime_decrypt_op_fail()
434 PaddingMode::PKCS7, in keystore2_gen_key_auth_usage_expire_datetime_decrypt_op_fail()
/system/keymint/common/src/crypto/
Ddes.rs22 keymint::{BlockMode, KeyParam, PaddingMode},
94 PaddingMode::None => Ok(Mode::EcbNoPadding), in new()
95 PaddingMode::Pkcs7 => Ok(Mode::EcbPkcs7Padding), in new()
107 PaddingMode::None => Ok(Mode::CbcNoPadding { nonce }), in new()
108 PaddingMode::Pkcs7 => Ok(Mode::CbcPkcs7Padding { nonce }), in new()
Drsa.rs21 use kmr_wire::keymint::{Digest, KeyParam, PaddingMode};
159 PaddingMode::None => Ok(DecryptionMode::NoPadding), in new()
160 PaddingMode::RsaOaep => { in new()
165 PaddingMode::RsaPkcs115Encrypt => Ok(DecryptionMode::Pkcs1_1_5Padding), in new()
191 PaddingMode::None => Ok(SignMode::NoPadding), in new()
192 PaddingMode::RsaPss => { in new()
196 PaddingMode::RsaPkcs115Sign => { in new()
Daes.rs21 use kmr_wire::keymint::{BlockMode, ErrorCode, KeyParam, PaddingMode};
139 PaddingMode::None => Ok(Mode::Cipher(CipherMode::EcbNoPadding)), in new()
140 PaddingMode::Pkcs7 => Ok(Mode::Cipher(CipherMode::EcbPkcs7Padding)), in new()
153 PaddingMode::None => Ok(Mode::Cipher(CipherMode::CbcNoPadding { nonce })), in new()
154 PaddingMode::Pkcs7 => Ok(Mode::Cipher(CipherMode::CbcPkcs7Padding { nonce })), in new()
162 if padding != PaddingMode::None { in new()
175 if padding != PaddingMode::None { in new()
/system/keymaster/fuzzer/
DREADME.md21PaddingMode::NONE` 1.`PaddingMode::RSA_OAEP` 2.`PaddingMode::RSA_PSS` 3. `PaddingMode::RSA_PKCS1_1…
Dk4_AndroidKeymaster4Device_fuzzer.cpp31 using ::android::hardware::keymaster::V4_0::PaddingMode;
39 constexpr PaddingMode kPaddingMode[] = {
40 PaddingMode::NONE,
41 PaddingMode::RSA_OAEP,
42 PaddingMode::RSA_PSS,
43 PaddingMode::RSA_PKCS1_1_5_ENCRYPT,
44 PaddingMode::RSA_PKCS1_1_5_SIGN,
45 PaddingMode::PKCS7,
/system/security/keystore2/src/km_compat/
Dparameter_conversion_test.cpp51 TEST_ENUM_CONVERSION(PaddingMode, NONE); in TEST()
52 TEST_ENUM_CONVERSION(PaddingMode, RSA_OAEP); in TEST()
53 TEST_ENUM_CONVERSION(PaddingMode, RSA_PSS); in TEST()
54 TEST_ENUM_CONVERSION(PaddingMode, RSA_PKCS1_1_5_ENCRYPT); in TEST()
55 TEST_ENUM_CONVERSION(PaddingMode, RSA_PKCS1_1_5_SIGN); in TEST()
56 TEST_ENUM_CONVERSION(PaddingMode, PKCS7); in TEST()
Dlib.rs36 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
100 value: KeyParameterValue::PaddingMode(PaddingMode::RSA_PSS), in generate_rsa_key()
228 value: KeyParameterValue::PaddingMode(PaddingMode::NONE), in generate_aes_key()
258 value: KeyParameterValue::PaddingMode(PaddingMode::NONE), in begin()
412 value: KeyParameterValue::PaddingMode(PaddingMode::RSA_PSS) in test_get_key_characteristics()
Dkm_compat_type_conversion.h340 static V4_0::PaddingMode convert(KMV1::PaddingMode p) { in convert()
342 case KMV1::PaddingMode::NONE: in convert()
343 return V4_0::PaddingMode::NONE; in convert()
344 case KMV1::PaddingMode::RSA_OAEP: in convert()
345 return V4_0::PaddingMode::RSA_OAEP; in convert()
346 case KMV1::PaddingMode::RSA_PSS: in convert()
347 return V4_0::PaddingMode::RSA_PSS; in convert()
348 case KMV1::PaddingMode::RSA_PKCS1_1_5_ENCRYPT: in convert()
349 return V4_0::PaddingMode::RSA_PKCS1_1_5_ENCRYPT; in convert()
350 case KMV1::PaddingMode::RSA_PKCS1_1_5_SIGN: in convert()
[all …]
Dcertificate_test.cpp40 using ::aidl::android::hardware::security::keymint::PaddingMode;
103 KMV1::makeKeyParameter(KMV1::TAG_PADDING, PaddingMode::RSA_PSS), in TEST()
119 KMV1::makeKeyParameter(KMV1::TAG_PADDING, PaddingMode::NONE), in TEST()
146 KMV1::makeKeyParameter(KMV1::TAG_PADDING, PaddingMode::RSA_PSS), in TEST()
161 KMV1::makeKeyParameter(KMV1::TAG_PADDING, PaddingMode::RSA_PSS), in TEST()
Dslot_test.cpp34 using ::aidl::android::hardware::security::keymint::PaddingMode;
44 KMV1::makeKeyParameter(KMV1::TAG_PADDING, PaddingMode::NONE), in generateAESKey()
82 kps.push_back(KMV1::makeKeyParameter(KMV1::TAG_PADDING, PaddingMode::NONE)); in begin()
/system/security/keystore2/src/
Dmetrics_store.rs28 KeyParameter::KeyParameter, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
253 KsKeyParamValue::PaddingMode(p) => { in process_key_creation_event_stats()
383 KsKeyParamValue::PaddingMode(p) => { in process_key_operation_event_stats()
425 fn compute_padding_mode_bitmap(padding_mode_bitmap: &mut i32, padding_mode: PaddingMode) { in compute_padding_mode_bitmap() argument
427 PaddingMode::NONE => { in compute_padding_mode_bitmap()
430 PaddingMode::RSA_OAEP => { in compute_padding_mode_bitmap()
433 PaddingMode::RSA_PSS => { in compute_padding_mode_bitmap()
436 PaddingMode::RSA_PKCS1_1_5_ENCRYPT => { in compute_padding_mode_bitmap()
440 PaddingMode::RSA_PKCS1_1_5_SIGN => { in compute_padding_mode_bitmap()
443 PaddingMode::PKCS7 => { in compute_padding_mode_bitmap()
Dsw_keyblob.rs24 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
432 Tag::PADDING => KeyParameterValue::PaddingMode(PaddingMode(val)), in deserialize_params()
523 KeyParameterValue::PaddingMode(v) => { in serialize_params()
567 PaddingMode::PaddingMode, Tag::Tag,
685 value: KPV::PaddingMode(PaddingMode::NONE), in test_key_new_from_serialized()
904 value: KPV::PaddingMode(PaddingMode::NONE), in test_key_new_from_serialized()
/system/security/keystore2/test_utils/
Dkey_generations.rs29 KeyPurpose::KeyPurpose, PaddingMode::PaddingMode, SecurityLevel::SecurityLevel, Tag::Tag,
110 pub padding: Option<PaddingMode>,
702 padding_mode: &PaddingMode, in generate_sym_key() argument
804 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in generate_attestation_key()
956 value: KeyParameterValue::PaddingMode(PaddingMode::RSA_PSS) in import_rsa_2048_key()
1031 .padding_mode(PaddingMode::PKCS7); in import_aes_key()
1056 value: KeyParameterValue::PaddingMode(PaddingMode::PKCS7) in import_aes_key()
1090 .padding_mode(PaddingMode::PKCS7); in import_3des_key()
1118 value: KeyParameterValue::PaddingMode(PaddingMode::PKCS7) in import_3des_key()
1196 .padding_mode(PaddingMode::RSA_OAEP) in import_wrapping_key()
[all …]
Dauthorizations.rs22 PaddingMode::PaddingMode, Tag::Tag,
123 pub fn padding_mode(mut self, p: PaddingMode) -> Self { in padding_mode()
124 self.0.push(KeyParameter { tag: Tag::PADDING, value: KeyParameterValue::PaddingMode(p) }); in padding_mode()
/system/keymint/common/src/
Dtag.rs26 KeyPurpose, PaddingMode, SecurityLevel, Tag, DEFAULT_CERT_SERIAL, DEFAULT_CERT_SUBJECT,
194 pub fn get_padding_mode(params: &[KeyParam]) -> Result<PaddingMode, Error> { in get_padding_mode() argument
889 if *padding != PaddingMode::None { in reject_some_padding()
1086 if for_signing(purpose) || (for_encryption(purpose) && padding == PaddingMode::RsaOaep) { in check_begin_rsa_params()
1089 if for_signing(purpose) && padding == PaddingMode::None && digest != Some(Digest::None) { in check_begin_rsa_params()
1097 PaddingMode::None => {} in check_begin_rsa_params()
1098 PaddingMode::RsaOaep if for_encryption(purpose) => { in check_begin_rsa_params()
1110 PaddingMode::RsaPss if for_signing(purpose) => { in check_begin_rsa_params()
1126 PaddingMode::RsaPkcs115Encrypt if for_encryption(purpose) => { in check_begin_rsa_params()
1134 PaddingMode::RsaPkcs115Sign if for_signing(purpose) => { in check_begin_rsa_params()
[all …]
/system/security/keystore/
Dkeystore_cli_v2.cpp191 keymint::PaddingMode::PKCS7); in verifyEncryptionKeyAttributes()
260 .Padding(keymint::PaddingMode::PKCS7) in loadOrCreateAndVerifyEncryptionKey()
369 .Padding(keymint::PaddingMode::PKCS7) in encryptWithAuthentication()
521 .Padding(keymint::PaddingMode::PKCS7) in decryptWithAuthentication()
610 .Padding(keymint::PaddingMode::RSA_PKCS1_1_5_SIGN) in GetRSASignParameters()
611 .Padding(keymint::PaddingMode::RSA_PSS) in GetRSASignParameters()
624 .Padding(keymint::PaddingMode::RSA_PKCS1_1_5_ENCRYPT) in GetRSAEncryptParameters()
625 .Padding(keymint::PaddingMode::RSA_OAEP) in GetRSAEncryptParameters()
653 parameters.Padding(keymint::PaddingMode::NONE); in GetAESParameters()
768 .Padding(keymint::PaddingMode::RSA_PKCS1_1_5_SIGN) in GenerateKey()
[all …]

12