Lines Matching refs:super_key
265 fn add_key_to_key_index(&mut self, super_key: &Arc<SuperKey>) -> Result<()> { in add_key_to_key_index()
266 if let SuperKeyIdentifier::DatabaseId(id) = super_key.id { in add_key_to_key_index()
267 self.key_index.insert(id, Arc::downgrade(super_key)); in add_key_to_key_index()
272 super_key.id in add_key_to_key_index()
351 fn install_per_boot_key_for_user(&self, user: UserId, super_key: Arc<SuperKey>) -> Result<()> { in install_per_boot_key_for_user()
353 data.add_key_to_key_index(&super_key) in install_per_boot_key_for_user()
355 data.user_keys.entry(user).or_default().per_boot = Some(super_key); in install_per_boot_key_for_user()
405 let super_key = legacy_blob_loader in unlock_user_key() localVariable
408 let super_key = match super_key { in unlock_user_key() localVariable
421 Self::encrypt_with_password(&super_key, pw).context("In create_new_key.") in unlock_user_key()
439 let super_key = self in unwrap_key_if_required() localVariable
445 key: Self::unwrap_key_with_key(blob, metadata, &super_key) in unwrap_key_if_required()
447 reencrypt_with: super_key.reencrypt_with.as_ref().unwrap_or(&super_key).clone(), in unwrap_key_if_required()
448 force_reencrypt: super_key.reencrypt_with.is_some(), in unwrap_key_if_required()
533 let super_key = self in check_and_unlock_super_key() localVariable
536 Ok(UserState::LskfUnlocked(super_key)) in check_and_unlock_super_key()
563 let super_key = generate_aes256_key() in check_and_initialize_super_key() localVariable
567 let (encrypted_super_key, blob_metadata) = Self::encrypt_with_password(&super_key, pw) in check_and_initialize_super_key()
580 let super_key = self in check_and_initialize_super_key() localVariable
588 Ok(UserState::LskfUnlocked(super_key)) in check_and_initialize_super_key()
602 let super_key = Self::extract_super_key_from_key_entry(algorithm, entry, pw, None) in populate_cache_from_super_key_blob() localVariable
606 self.install_per_boot_key_for_user(user_id, super_key.clone())?; in populate_cache_from_super_key_blob()
607 Ok(super_key) in populate_cache_from_super_key_blob()
661 super_key: &[u8], in encrypt_with_password()
671 let (encrypted_key, iv, tag) = aes_gcm_encrypt(super_key, &derived_key) in encrypt_with_password()
692 UserState::LskfUnlocked(super_key) => { in super_encrypt_on_key_init()
693 Self::encrypt_with_aes_super_key(key_blob, &super_key) in super_encrypt_on_key_init()
709 super_key: &SuperKey, in encrypt_with_aes_super_key()
711 if super_key.algorithm != SuperEncryptionAlgorithm::Aes256Gcm { in encrypt_with_aes_super_key()
716 let (encrypted_key, iv, tag) = aes_gcm_encrypt(key_blob, &(super_key.key)) in encrypt_with_aes_super_key()
720 super_key.id.add_to_metadata(&mut metadata); in encrypt_with_aes_super_key()
748 if let Some(super_key) = entry.screen_lock_bound.as_ref() { in handle_super_encryption_on_key_init()
749 Self::encrypt_with_aes_super_key(key_blob, &super_key).context(concat!( in handle_super_encryption_on_key_init()
783 let super_key = self in handle_super_encryption_on_key_init() localVariable
788 Self::encrypt_with_aes_super_key(key_blob, &super_key).context(concat!( in handle_super_encryption_on_key_init()
804 KeyBlob::Sensitive { reencrypt_with: super_key, .. } => { in reencrypt_if_required()
806 Self::encrypt_with_aes_super_key(key_after_upgrade, super_key) in reencrypt_if_required()
833 let (super_key, public_key) = match key_type.algorithm { in get_or_create_super_key()
855 Self::encrypt_with_password(&super_key, password) in get_or_create_super_key()
872 key: super_key, in get_or_create_super_key()
1085 Some(super_key) => Ok(UserState::LskfUnlocked(super_key)), in get()
1109 Some(super_key) => { in get_with_password_changed()
1121 Ok(UserState::LskfUnlocked(super_key)) in get_with_password_changed()
1143 Some(super_key) => { in get_with_password_unlock()
1145 Ok(UserState::LskfUnlocked(super_key)) in get_with_password_unlock()