pub struct SoftwareVaultForSecureChannels { /* private fields */ }
Expand description
[SecureChannelVault
] implementation using software
Implementations§
source§impl SoftwareVaultForSecureChannels
impl SoftwareVaultForSecureChannels
sourcepub async fn import_static_x25519_secret(
&self,
secret: X25519SecretKey
) -> Result<X25519SecretKeyHandle>
pub async fn import_static_x25519_secret( &self, secret: X25519SecretKey ) -> Result<X25519SecretKeyHandle>
Import static X25519 Secret key.
sourcepub fn get_secret_buffer(&self, handle: &SecretBufferHandle) -> Option<Vec<u8>>
pub fn get_secret_buffer(&self, handle: &SecretBufferHandle) -> Option<Vec<u8>>
Return Secret Buffer.
sourcepub fn import_ephemeral_x25519_secret(
&self,
secret: X25519SecretKey
) -> X25519SecretKeyHandle
pub fn import_ephemeral_x25519_secret( &self, secret: X25519SecretKey ) -> X25519SecretKeyHandle
Import ephemeral X25519 Secret key.
sourcepub async fn number_of_static_x25519_secrets(&self) -> Result<usize>
pub async fn number_of_static_x25519_secrets(&self) -> Result<usize>
Return the total number of static x25519 secrets present in the Vault
sourcepub fn number_of_ephemeral_x25519_secrets(&self) -> usize
pub fn number_of_ephemeral_x25519_secrets(&self) -> usize
Return the total number of ephemeral x25519 secrets present in the Vault
sourcepub fn number_of_ephemeral_buffer_secrets(&self) -> usize
pub fn number_of_ephemeral_buffer_secrets(&self) -> usize
Return the total number of ephemeral buffer secrets present in the Vault
sourcepub fn number_of_ephemeral_aead_secrets(&self) -> usize
pub fn number_of_ephemeral_aead_secrets(&self) -> usize
Return the total number of ephemeral AEAD secrets present in the Vault
Trait Implementations§
source§impl VaultForSecureChannels for SoftwareVaultForSecureChannels
impl VaultForSecureChannels for SoftwareVaultForSecureChannels
source§fn x25519_ecdh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 X25519SecretKeyHandle,
peer_public_key: &'life2 X25519PublicKey
) -> Pin<Box<dyn Future<Output = Result<SecretBufferHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn x25519_ecdh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 X25519SecretKeyHandle,
peer_public_key: &'life2 X25519PublicKey
) -> Pin<Box<dyn Future<Output = Result<SecretBufferHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Perform X25519 ECDH.
[1]: http://www.noiseprotocol.org/noise.html#dh-functions
source§fn hash<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<HashOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn hash<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<HashOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Compute Hash.
[1]: http://www.noiseprotocol.org/noise.html#hash-functions
source§fn hkdf<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
salt: &'life1 SecretBufferHandle,
input_key_material: Option<&'life2 SecretBufferHandle>,
number_of_outputs: HKDFNumberOfOutputs
) -> Pin<Box<dyn Future<Output = Result<HkdfOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn hkdf<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
salt: &'life1 SecretBufferHandle,
input_key_material: Option<&'life2 SecretBufferHandle>,
number_of_outputs: HKDFNumberOfOutputs
) -> Pin<Box<dyn Future<Output = Result<HkdfOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Compute HKDF.
[1]: http://www.noiseprotocol.org/noise.html#hash-functions
source§fn aead_encrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 AeadSecretKeyHandle,
plain_text: &'life2 [u8],
nonce: &'life3 [u8],
aad: &'life4 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn aead_encrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 AeadSecretKeyHandle,
plain_text: &'life2 [u8],
nonce: &'life3 [u8],
aad: &'life4 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Perform AEAD encryption.
[1]: http://www.noiseprotocol.org/noise.html#cipher-functions
source§fn aead_decrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 AeadSecretKeyHandle,
cipher_text: &'life2 [u8],
nonce: &'life3 [u8],
aad: &'life4 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn aead_decrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 AeadSecretKeyHandle,
cipher_text: &'life2 [u8],
nonce: &'life3 [u8],
aad: &'life4 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Perform AEAD decryption.
[1]: http://www.noiseprotocol.org/noise.html#cipher-functions
source§fn generate_static_x25519_secret_key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<X25519SecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_static_x25519_secret_key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<X25519SecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate a fresh static (persisted) X25519 Key.
source§fn delete_static_x25519_secret_key<'life0, 'async_trait>(
&'life0 self,
secret_key_handle: X25519SecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_static_x25519_secret_key<'life0, 'async_trait>(
&'life0 self,
secret_key_handle: X25519SecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete static X25519 Key.
source§fn generate_ephemeral_x25519_secret_key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<X25519SecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_ephemeral_x25519_secret_key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<X25519SecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate a fresh ephemeral (not persisted) X25519 Key.
source§fn delete_ephemeral_x25519_secret_key<'life0, 'async_trait>(
&'life0 self,
secret_key_handle: X25519SecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_ephemeral_x25519_secret_key<'life0, 'async_trait>(
&'life0 self,
secret_key_handle: X25519SecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete ephemeral X25519 Key.
source§fn get_x25519_public_key<'life0, 'life1, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 X25519SecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<X25519PublicKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_x25519_public_key<'life0, 'life1, 'async_trait>(
&'life0 self,
secret_key_handle: &'life1 X25519SecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<X25519PublicKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get
X25519PublicKey
of the corresponding X25519 Secret Key given its Handle.source§fn get_x25519_secret_key_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
public_key: &'life1 X25519PublicKey
) -> Pin<Box<dyn Future<Output = Result<X25519SecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_x25519_secret_key_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
public_key: &'life1 X25519PublicKey
) -> Pin<Box<dyn Future<Output = Result<X25519SecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get Handle to a X25519 Secret Key given its
X25519PublicKey
.source§fn import_secret_buffer<'life0, 'async_trait>(
&'life0 self,
buffer: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<SecretBufferHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn import_secret_buffer<'life0, 'async_trait>(
&'life0 self,
buffer: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<SecretBufferHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Import a Secret Buffer.
source§fn delete_secret_buffer<'life0, 'async_trait>(
&'life0 self,
secret_buffer_handle: SecretBufferHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_secret_buffer<'life0, 'async_trait>(
&'life0 self,
secret_buffer_handle: SecretBufferHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete Secret Buffer.
source§fn convert_secret_buffer_to_aead_key<'life0, 'async_trait>(
&'life0 self,
secret_buffer_handle: SecretBufferHandle
) -> Pin<Box<dyn Future<Output = Result<AeadSecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn convert_secret_buffer_to_aead_key<'life0, 'async_trait>(
&'life0 self,
secret_buffer_handle: SecretBufferHandle
) -> Pin<Box<dyn Future<Output = Result<AeadSecretKeyHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Convert a Secret Buffer to an AEAD Key.
source§fn delete_aead_secret_key<'life0, 'async_trait>(
&'life0 self,
secret_key_handle: AeadSecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_aead_secret_key<'life0, 'async_trait>(
&'life0 self,
secret_key_handle: AeadSecretKeyHandle
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete AEAD Key.
Auto Trait Implementations§
impl !RefUnwindSafe for SoftwareVaultForSecureChannels
impl Send for SoftwareVaultForSecureChannels
impl Sync for SoftwareVaultForSecureChannels
impl Unpin for SoftwareVaultForSecureChannels
impl !UnwindSafe for SoftwareVaultForSecureChannels
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