pub struct SoftwareBackend;Expand description
Software-only fallback backend (stub in Phase 1).
WARNING: Unlike hardware TEE backends, key material in memory is readable by the OS and any privileged process.
Implementations§
Trait Implementations§
Source§impl TeeBackend for SoftwareBackend
impl TeeBackend for SoftwareBackend
Source§fn is_available() -> bool
fn is_available() -> bool
Check if this backend is available on the current system.
Source§fn initialize_primary_key(&mut self) -> Result<()>
fn initialize_primary_key(&mut self) -> Result<()>
Initialize the Primary Key (load if exists, create + persist if not).
Called once per device.
Source§fn generate_data_key(&mut self) -> Result<WrappedKey>
fn generate_data_key(&mut self) -> Result<WrappedKey>
Generate a Data Key and wrap it with the Primary Key.
The returned WrappedKey blob cannot be unwrapped without the TEE.
Source§fn seal(&mut self, _key: &WrappedKey, _data: &[u8]) -> Result<Vec<u8>>
fn seal(&mut self, _key: &WrappedKey, _data: &[u8]) -> Result<Vec<u8>>
Unwrap the Data Key, encrypt data, and seal with PCR policy.
Source§fn unseal(&mut self, _key: &WrappedKey, _sealed: &[u8]) -> Result<Vec<u8>>
fn unseal(&mut self, _key: &WrappedKey, _sealed: &[u8]) -> Result<Vec<u8>>
Unseal data. Fails if PCR values have changed.
Source§fn backend_type(&self) -> BackendType
fn backend_type(&self) -> BackendType
Return the backend type identifier.
Auto Trait Implementations§
impl Freeze for SoftwareBackend
impl RefUnwindSafe for SoftwareBackend
impl Send for SoftwareBackend
impl Sync for SoftwareBackend
impl Unpin for SoftwareBackend
impl UnsafeUnpin for SoftwareBackend
impl UnwindSafe for SoftwareBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more