pub struct SecureStorageLocation {
pub namespace: String,
pub key: String,
pub sub_key: Option<String>,
}Expand description
Location within secure storage
Fields§
§namespace: StringNamespace for organizing secure data
key: StringUnique key within the namespace
sub_key: Option<String>Optional sub-key for hierarchical organization
Implementations§
Source§impl SecureStorageLocation
impl SecureStorageLocation
Sourcepub fn new(
namespace: impl Into<String>,
key: impl Into<String>,
) -> SecureStorageLocation
pub fn new( namespace: impl Into<String>, key: impl Into<String>, ) -> SecureStorageLocation
Create a new secure storage location
Sourcepub fn with_sub_key(
namespace: impl Into<String>,
key: impl Into<String>,
sub_key: impl Into<String>,
) -> SecureStorageLocation
pub fn with_sub_key( namespace: impl Into<String>, key: impl Into<String>, sub_key: impl Into<String>, ) -> SecureStorageLocation
Create with a sub-key for hierarchical organization
Create a location for storing a guardian’s FROST share.
Guardian shares are stored by:
- namespace: “guardian_shares”
- key: account authority being protected
- sub_key: guardian authority holding the share
§Security Note
Guardian shares MUST be encrypted with the guardian’s public key before storage. The share data stored here is the encrypted share bytes, not the raw FROST SigningShare.
Create a location for storing authority FROST keys.
Authority keys are stored by:
- namespace: “authority_keys”
- key: authority ID
- sub_key: epoch number
§Security Note
This stores the SigningShare and PublicKeyPackage for the authority. The SigningShare is the secret key material that must never leave secure storage unencrypted.
Source§impl SecureStorageLocation
Helper functions for common secure storage operations
impl SecureStorageLocation
Helper functions for common secure storage operations
Sourcepub fn frost_nonce(
session_id: &str,
participant_id: u16,
) -> SecureStorageLocation
pub fn frost_nonce( session_id: &str, participant_id: u16, ) -> SecureStorageLocation
Create a location for storing FROST nonces
Create a location for storing signing shares
Sourcepub fn device_attestation(device_id: &str) -> SecureStorageLocation
pub fn device_attestation(device_id: &str) -> SecureStorageLocation
Create a location for device attestation certificates
Create a location for storing Biscuit token authority data.
Stores the serialized Biscuit token and root public key for an authority:
- namespace: “biscuit”
- key: authority ID
- sub_key: “token_authority”
Sourcepub fn amp_bootstrap_key(
context: &ContextId,
channel: &ChannelId,
bootstrap_id: &Hash32,
) -> SecureStorageLocation
pub fn amp_bootstrap_key( context: &ContextId, channel: &ChannelId, bootstrap_id: &Hash32, ) -> SecureStorageLocation
Create a location for AMP channel bootstrap keys.
Trait Implementations§
Source§impl Clone for SecureStorageLocation
impl Clone for SecureStorageLocation
Source§fn clone(&self) -> SecureStorageLocation
fn clone(&self) -> SecureStorageLocation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecureStorageLocation
impl Debug for SecureStorageLocation
Source§impl<'de> Deserialize<'de> for SecureStorageLocation
impl<'de> Deserialize<'de> for SecureStorageLocation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecureStorageLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecureStorageLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for SecureStorageLocation
impl Hash for SecureStorageLocation
Source§impl PartialEq for SecureStorageLocation
impl PartialEq for SecureStorageLocation
Source§impl Serialize for SecureStorageLocation
impl Serialize for SecureStorageLocation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for SecureStorageLocation
impl StructuralPartialEq for SecureStorageLocation
Auto Trait Implementations§
impl Freeze for SecureStorageLocation
impl RefUnwindSafe for SecureStorageLocation
impl Send for SecureStorageLocation
impl Sync for SecureStorageLocation
impl Unpin for SecureStorageLocation
impl UnsafeUnpin for SecureStorageLocation
impl UnwindSafe for SecureStorageLocation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.