/system/keymint/boringssl/src/ |
D | aes.rs | 17 key: OpaqueOr<crypto::aes::Key>, in begin() 18 mode: crypto::aes::CipherMode, in begin() 27 crypto::aes::CipherMode::EcbNoPadding | crypto::aes::CipherMode::EcbPkcs7Padding => { in begin() 29 crypto::aes::Key::Aes128(k) => (Cipher::aes_128_ecb(), &k[..]), in begin() 30 crypto::aes::Key::Aes192(k) => (Cipher::aes_192_ecb(), &k[..]), in begin() 31 crypto::aes::Key::Aes256(k) => (Cipher::aes_256_ecb(), &k[..]), in begin() 35 if let crypto::aes::CipherMode::EcbPkcs7Padding = mode { in begin() 43 crypto::aes::CipherMode::CbcNoPadding { nonce: n } in begin() 44 | crypto::aes::CipherMode::CbcPkcs7Padding { nonce: n } => { in begin() 46 crypto::aes::Key::Aes128(k) => (Cipher::aes_128_cbc(), &k[..]), in begin() [all …]
|
D | aes_cmac.rs | 14 key: OpaqueOr<crypto::aes::Key>, in begin() 20 crypto::aes::Key::Aes128(k) => (ffi::EVP_aes_128_cbc(), &k[..]), in begin() 21 crypto::aes::Key::Aes192(k) => (ffi::EVP_aes_192_cbc(), &k[..]), in begin() 22 crypto::aes::Key::Aes256(k) => (ffi::EVP_aes_256_cbc(), &k[..]), in begin() 88 let mut output_len: usize = crypto::aes::BLOCK_SIZE; in finish() 89 let mut output = vec_try![0; crypto::aes::BLOCK_SIZE]?; in finish() 97 if output_len != crypto::aes::BLOCK_SIZE { in finish()
|
D | tests.rs | 42 kmr_tests::test_aes_gcm(aes::BoringAes {}); in test_aes_gcm()
|
D | lib.rs | 19 pub mod aes; module
|
/system/keymint/common/src/crypto/ |
D | traits.rs | 22 pub aes: &'a dyn Aes, field 87 variant: aes::Variant, in generate_key() 91 aes::Variant::Aes128 => { in generate_key() 94 KeyMaterial::Aes(aes::Key::Aes128(key).into()) in generate_key() 96 aes::Variant::Aes192 => { in generate_key() 99 KeyMaterial::Aes(aes::Key::Aes192(key).into()) in generate_key() 101 aes::Variant::Aes256 => { in generate_key() 104 KeyMaterial::Aes(aes::Key::Aes256(key).into()) in generate_key() 116 let aes_key = aes::Key::new_from(data)?; in import_key() 127 key: OpaqueOr<aes::Key>, in begin() [all …]
|
/system/keymint/ta/src/ |
D | operation.rs | 7 crypto::{aes, AadOperation, AccumulatingOperation, EmittingOperation, KeyMaterial}, 234 let mode = aes::Mode::new(¶ms, caller_nonce, &mut *self.imp.rng)?; in begin_operation() 249 aes::Mode::Cipher(aes::CipherMode::EcbNoPadding) in begin_operation() 250 | aes::Mode::Cipher(aes::CipherMode::EcbPkcs7Padding) => {} in begin_operation() 251 aes::Mode::Cipher(aes::CipherMode::CbcNoPadding { nonce: n }) in begin_operation() 252 | aes::Mode::Cipher(aes::CipherMode::CbcPkcs7Padding { nonce: n }) => { in begin_operation() 255 aes::Mode::Cipher(aes::CipherMode::Ctr { nonce: n }) => { in begin_operation() 258 aes::Mode::Aead(aes::GcmMode::GcmTag12 { nonce: n }) in begin_operation() 259 | aes::Mode::Aead(aes::GcmMode::GcmTag13 { nonce: n }) in begin_operation() 260 | aes::Mode::Aead(aes::GcmMode::GcmTag14 { nonce: n }) in begin_operation() [all …]
|
D | keys.rs | 9 crypto::{self, aes, rsa, KeyMaterial, OpaqueOr}, 258 self.imp.aes.generate_key(&mut *self.imp.rng, variant, params)? in generate_key_material() 466 self.imp.aes, in finish_keyblob_creation() 537 aes::Key::Aes256(unmasked_transport_key.try_into().map_err(|_e| { in import_wrapped_key() 547 if iv_len != aes::GCM_NONCE_SIZE { in import_wrapped_key() 552 aes::GCM_NONCE_SIZE in import_wrapped_key() 557 12 => crypto::aes::GcmMode::GcmTag12 { in import_wrapped_key() 561 13 => crypto::aes::GcmMode::GcmTag13 { in import_wrapped_key() 565 14 => crypto::aes::GcmMode::GcmTag14 { in import_wrapped_key() 569 15 => crypto::aes::GcmMode::GcmTag15 { in import_wrapped_key() [all …]
|
D | device.rs | 6 crypto, crypto::aes, crypto::hmac, crypto::KeyMaterial, crypto::OpaqueOr, keyblob, log_unimpl, 69 fn kak(&self) -> Result<OpaqueOr<aes::Key>, Error>; in kak() 322 fn kak(&self) -> Result<OpaqueOr<aes::Key>, Error> { in kak()
|
D | lib.rs | 359 self.imp.aes, in keyblob_parse_decrypt_backlevel()
|
/system/keymint/tests/src/ |
D | lib.rs | 5 aes, des, hmac, Aes, AesCmac, Ckdf, ConstTimeEq, Des, Hkdf, Hmac, MonotonicClock, Rng, 334 let key = aes::Key::new(key).unwrap(); in test_aes_cmac() 357 let key = aes::Key::new(vec![0; 32]).unwrap(); in test_ckdf() 372 pub fn test_aes_gcm<A: Aes>(aes: A) { in test_aes_gcm() 409 let aes_key = aes::Key::new(key.clone()).unwrap(); in test_aes_gcm() 410 let mut op = aes in test_aes_gcm() 413 aes::GcmMode::GcmTag16 { nonce: iv.clone().try_into().unwrap() }, in test_aes_gcm() 422 let aes_key = aes::Key::new(key.clone()).unwrap(); in test_aes_gcm() 423 let mut op = aes in test_aes_gcm() 426 aes::GcmMode::GcmTag16 { nonce: iv.clone().try_into().unwrap() }, in test_aes_gcm() [all …]
|
/system/keymint/tests/tests/ |
D | keyblob_test.rs | 8 use kmr_crypto_boring::aes::BoringAes; 16 let aes = BoringAes; in test_encrypted_keyblob_roundtrip() localVariable 30 key_material: crypto::KeyMaterial::Aes(crypto::aes::Key::Aes128([0u8; 16]).into()), in test_encrypted_keyblob_roundtrip() 40 &aes, in test_encrypted_keyblob_roundtrip() 51 keyblob::decrypt(None, &aes, &hmac, &root_key, encrypted_keyblob, hidden).unwrap(); in test_encrypted_keyblob_roundtrip()
|
/system/keymint/common/src/ |
D | crypto.rs | 19 pub mod aes; module 53 Aes(aes::Variant), 99 opaque_from_key!(aes::Key); 115 Aes(OpaqueOr<aes::Key>), 183 OpaqueOr::Explicit(aes::Key::Aes128(_)) => f.write_str("Aes128(...)"), in fmt() 184 OpaqueOr::Explicit(aes::Key::Aes192(_)) => f.write_str("Aes192(...)"), in fmt() 185 OpaqueOr::Explicit(aes::Key::Aes256(_)) => f.write_str("Aes256(...)"), in fmt() 218 match aes::Key::new(raw_key) { in from_cbor_value() 343 aes::Key::Aes128(k) => cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value() 344 aes::Key::Aes192(k) => cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value() [all …]
|
D | keyblob.rs | 273 ) -> Result<crypto::aes::Key, Error> { 284 Ok(crypto::aes::Key::Aes256(data.try_into().unwrap(/* safe: len checked */))) 318 aes: &dyn crypto::Aes, in encrypt() 369 let mut op = aes.begin_aead( in encrypt() 371 crypto::aes::GcmMode::GcmTag16 { nonce: ZERO_NONCE }, in encrypt() 394 aes: &dyn crypto::Aes, in decrypt() 432 let mut op = aes.begin_aead( in decrypt() 434 crypto::aes::GcmMode::GcmTag16 { nonce: ZERO_NONCE }, in decrypt()
|
D | tag.rs | 282 Algorithm::Aes => check_aes_import_params(imp.aes, params, sec_level, key_format, key_data), in extract_key_import_characteristics() 681 KeySizeInBits(128) => KeyGenInfo::Aes(aes::Variant::Aes128), in check_aes_gen_params() 682 KeySizeInBits(256) => KeyGenInfo::Aes(aes::Variant::Aes256), in check_aes_gen_params() 684 KeyGenInfo::Aes(aes::Variant::Aes192) in check_aes_gen_params() 703 aes: &dyn Aes, in check_aes_import_params() 710 let (key, key_size) = aes.import_key(key_data, params)?; in check_aes_import_params()
|
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/crypto/ |
D | aes.c | 257 ctx->aes.aes_key_words = AES_128_KEY_WORDS; in aesCtrInit() 258 ctx->aes.aes_num_rounds = AES_128_KEY_NUM_ROUNDS; in aesCtrInit() 260 ctx->aes.aes_key_words = AES_256_KEY_WORDS; in aesCtrInit() 261 ctx->aes.aes_num_rounds = AES_256_KEY_NUM_ROUNDS; in aesCtrInit() 274 return aesInitForEncr(&ctx->aes, p_k); in aesCtrInit() 320 aesEncr(&ctx->aes, ctx->iv, p_dst); in aesCtr()
|
D | aes.h | 58 struct AesContext aes; member
|
/system/security/keystore2/src/ |
D | super_key.rs | 891 let aes = if let Some(screen_lock_bound) = screen_lock_bound { in unlock_screen_lock_bound_key() localVariable 910 Some(aes.clone()), in unlock_screen_lock_bound_key() 915 self.data.add_key_to_key_index(&aes)?; in unlock_screen_lock_bound_key() 918 entry.screen_lock_bound = Some(aes); in unlock_screen_lock_bound_key() 933 if let (Some(aes), Some(ecdh)) = ( in lock_screen_lock_bound_key() 984 screen_lock_bound: LockedKey::new(&encrypting_key, &aes)?, in lock_screen_lock_bound_key()
|
/system/keymint/common/src/bin/ |
D | keyblob-cddl-dump.rs | 89 schema.add(crypto::KeyMaterial::Aes(crypto::aes::Key::Aes128([0u8; 16]).into())); in main()
|
/system/keymint/tests/src/bin/ |
D | auth-keyblob-parse.rs | 102 Algorithm::Aes => KeyMaterial::Aes(aes::Key::new(keyblob.key_material).unwrap().into()), in process()
|