/system/security/keystore2/src/crypto/ |
D | zvec.rs | 27 pub struct ZVec { struct 32 impl ZVec { argument 53 impl Drop for ZVec { implementation 68 impl Deref for ZVec { implementation 76 impl DerefMut for ZVec { implementation 82 impl fmt::Debug for ZVec { implementation 92 impl TryFrom<&[u8]> for ZVec { implementation 96 let mut z = ZVec::new(v.len())?; in try_from() 104 impl TryFrom<Vec<u8>> for ZVec { implementation
|
D | lib.rs | 30 pub use zvec::ZVec; 49 pub fn generate_aes256_key() -> Result<ZVec, Error> { in generate_aes256_key() 51 let mut key = ZVec::new(AES_256_KEY_LENGTH)?; in generate_aes256_key() 82 pub fn aes_gcm_decrypt(data: &[u8], iv: &[u8], tag: &[u8], key: &[u8]) -> Result<ZVec, Error> { in aes_gcm_decrypt() argument 99 let mut result = ZVec::new(data.len())?; in aes_gcm_decrypt() 163 Owned(ZVec), 183 pub fn derive_key(&self, salt: Option<&[u8]>, key_length: usize) -> Result<ZVec, Error> { in derive_key() argument 201 let mut result = ZVec::new(key_length)?; in derive_key() 218 Ok(Password::Owned(ZVec::try_from(self.get_key())?)) in try_clone() 223 pub fn hkdf_extract(secret: &[u8], salt: &[u8]) -> Result<ZVec, Error> { in hkdf_extract() argument [all …]
|
/system/security/keystore2/src/ |
D | boot_level_keys.rs | 28 use keystore2_crypto::{hkdf_expand, ZVec, AES_256_KEY_LENGTH}; 51 pub fn get_level_zero_key(db: &mut KeystoreDB) -> Result<ZVec> { in get_level_zero_key() argument 119 let level_zero_key = ZVec::try_from(level_zero_key) in get_level_zero_key() 133 cache: VecDeque<ZVec>, 142 pub fn new(level_zero_key: ZVec) -> Self { in new() 143 let mut cache: VecDeque<ZVec> = VecDeque::new(); in new() 158 fn get_hkdf_key(&mut self, boot_level: usize) -> Result<Option<&ZVec>> { in get_hkdf_key() argument 223 ) -> Result<Option<ZVec>> { in expand_key() argument 232 pub fn aes_key(&mut self, boot_level: usize) -> Result<Option<ZVec>> { in aes_key() argument 245 let mut blkc = BootLevelKeyCache::new(ZVec::try_from(initial_key as &[u8])?); in test_output_is_consistent()
|
D | ec_crypto.rs | 21 ec_point_point_to_oct, ecdh_compute_key, generate_salt, hkdf_expand, hkdf_extract, ECKey, ZVec, 44 pub fn private_key(&self) -> Result<ZVec> { in private_key() argument 65 ) -> Result<ZVec> { in agree_key() argument 110 ) -> Result<ZVec> { in decrypt_message() argument
|
D | legacy_migrator.rs | 35 use keystore2_crypto::{Password, ZVec}; 505 BlobValue::Decrypted(data) => (LegacyBlob::ZVec(data), BlobMetaData::new()), in check_and_migrate() 683 Some((LegacyBlob::ZVec(data), BlobMetaData::new())) in bulk_delete() 719 ZVec(ZVec), enumerator 728 Self::ZVec(v) => &v, in deref()
|
D | super_key.rs | 46 aes_gcm_decrypt, aes_gcm_encrypt, generate_aes256_key, generate_salt, Password, ZVec, 150 key: ZVec, 163 pub fn aes_gcm_decrypt(&self, data: &[u8], iv: &[u8], tag: &[u8]) -> Result<ZVec> { in aes_gcm_decrypt() argument 213 let key = ZVec::try_from(km_dev.use_key_in_one_step( in decrypt() 456 fn unwrap_key_with_key(blob: &[u8], metadata: &BlobMetaData, key: &SuperKey) -> Result<ZVec> { in unwrap_key_with_key() argument 1188 key: ZVec,
|
D | legacy_blob.rs | 27 use keystore2_crypto::{aes_gcm_decrypt, Password, ZVec}; 132 Decrypted(ZVec), 410 F: FnOnce(&[u8], &[u8], &[u8], Option<&[u8]>, Option<usize>) -> Result<ZVec>, in new_from_stream_decrypt_with() argument 1091 pub fn load_super_key(&self, user_id: u32, pw: &Password) -> Result<Option<ZVec>> { in load_super_key() argument
|
D | database.rs | 79 use keystore2_crypto::ZVec; 602 pub private_key: ZVec, 2096 private_key: ZVec::try_from(km_blob)?, in retrieve_attestation_key_and_cert_chain()
|