pub trait CryptoKeyProviderAsync<C: Curve>: CryptoKeyProvider<C> {
// Required methods
fn generate_static_key_async(
&mut self,
) -> impl Future<Output = Result<Self::PrivateKey, Self::Error>> + Send;
fn generate_ephemeral_key_async(
&mut self,
) -> impl Future<Output = Result<Self::PrivateKey, Self::Error>> + Send;
}Expand description
Asynchronous key generation — the async mirror of
CryptoKeyProvider’s generation methods.
For backends whose key generation genuinely suspends (the Apple Secure
Enclave offloads its blocking call to a worker thread; remote/WASM
backends await I/O). Independent of the DH and signing surfaces, so a
sign-only curve can still be generated asynchronously. Both methods
return Send futures and are suffixed _async to avoid clashing with
the synchronous methods when a backend implements both.
Required Methods§
Sourcefn generate_static_key_async(
&mut self,
) -> impl Future<Output = Result<Self::PrivateKey, Self::Error>> + Send
fn generate_static_key_async( &mut self, ) -> impl Future<Output = Result<Self::PrivateKey, Self::Error>> + Send
Generate a long-term static key pair.
Sourcefn generate_ephemeral_key_async(
&mut self,
) -> impl Future<Output = Result<Self::PrivateKey, Self::Error>> + Send
fn generate_ephemeral_key_async( &mut self, ) -> impl Future<Output = Result<Self::PrivateKey, Self::Error>> + Send
Generate an ephemeral key pair for a single Noise handshake.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".