pub struct SoftKeyStore<const N: usize> { /* private fields */ }Available on crate feature
rustcrypto only.Expand description
Private keys held in memory, zeroised when removed or dropped.
What a node without a secure element gets. It is not a weaker protocol — the keys are as strong — but the material is readable by anything that can read the process’s memory, which is the difference a secure element buys.
Implementations§
Source§impl<const N: usize> SoftKeyStore<N>
impl<const N: usize> SoftKeyStore<N>
Trait Implementations§
Source§impl<const N: usize> Debug for SoftKeyStore<N>
impl<const N: usize> Debug for SoftKeyStore<N>
Source§impl<const N: usize> Default for SoftKeyStore<N>
impl<const N: usize> Default for SoftKeyStore<N>
Source§impl<const N: usize> KeyStore for SoftKeyStore<N>
impl<const N: usize> KeyStore for SoftKeyStore<N>
Source§fn generate(
&mut self,
purpose: KeyPurpose,
random: &[u8; 32],
) -> Result<(KeyHandle, PublicKey)>
fn generate( &mut self, purpose: KeyPurpose, random: &[u8; 32], ) -> Result<(KeyHandle, PublicKey)>
Generates a key pair from 32 octets of randomness, returning its handle and
public key. Read more
Source§fn import(
&mut self,
purpose: KeyPurpose,
secret: &[u8; 32],
) -> Result<KeyHandle>
fn import( &mut self, purpose: KeyPurpose, secret: &[u8; 32], ) -> Result<KeyHandle>
Imports an existing private key. A store backed by hardware may refuse.
Source§fn sign(&self, handle: KeyHandle, message: &[u8]) -> Result<Signature>
fn sign(&self, handle: KeyHandle, message: &[u8]) -> Result<Signature>
Signs
message — ECDSA over SHA-256 (§3.5.3.1).Auto Trait Implementations§
impl<const N: usize> Forget for SoftKeyStore<N>
impl<const N: usize> Freeze for SoftKeyStore<N>
impl<const N: usize> Move for SoftKeyStore<N>
impl<const N: usize> RefUnwindSafe for SoftKeyStore<N>
impl<const N: usize> Send for SoftKeyStore<N>
impl<const N: usize> Sync for SoftKeyStore<N>
impl<const N: usize> Unpin for SoftKeyStore<N>
impl<const N: usize> UnsafeUnpin for SoftKeyStore<N>
impl<const N: usize> UnwindSafe for SoftKeyStore<N>
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