pub struct RustCryptoBackend;Implementations§
Source§impl RustCryptoBackend
impl RustCryptoBackend
pub const X25519_KEY_SIZE: usize = 32usize
pub fn new_secret_key_into( &self, rng: &mut (impl RngCore + CryptoRng), secret_key: &mut [u8; 32], )
pub fn new_secret_key(&self, rng: &mut (impl RngCore + CryptoRng)) -> [u8; 32]
pub fn public_key(&self, secret_key: &[u8; 32]) -> [u8; 32]
Trait Implementations§
Source§impl CryptoBackend for RustCryptoBackend
impl CryptoBackend for RustCryptoBackend
Source§type InitialCrypto = BuiltinTransportCrypto<ChaChaPoly, Blake2s>
type InitialCrypto = BuiltinTransportCrypto<ChaChaPoly, Blake2s>
Backend’s
InitialCrypto implementation.Source§type NoiseHandshake = HandshakeState<AnyAead, AnyHash>
type NoiseHandshake = HandshakeState<AnyAead, AnyHash>
Backend’s
NoiseHandshake implementation.Source§type TransportCrypto = BuiltinTransportCrypto<AnyAead, AnyHash>
type TransportCrypto = BuiltinTransportCrypto<AnyAead, AnyHash>
Backend’s
TransportCrypto implementation.Source§type TransportRekey = AskChain<AnyHash>
type TransportRekey = AskChain<AnyHash>
Backend’s
TransportRekey implementation.Source§fn protocol_supported(&self, noise_protocol: &str) -> bool
fn protocol_supported(&self, noise_protocol: &str) -> bool
Returns
true if the backend’s NoiseHandshake supports
noise_protocol.Source§fn initial_crypto(&self) -> Self::InitialCrypto
fn initial_crypto(&self) -> Self::InitialCrypto
Returns
InitialCrypto. Read moreSource§fn new_handshake(&self) -> Result<Self::NoiseHandshake, CryptoError>
fn new_handshake(&self) -> Result<Self::NoiseHandshake, CryptoError>
Returns a new, uninitialized
NoiseHandshake or an error if the
backend is not properly configured.Source§fn transport_crypto(
&self,
handshake: &Self::NoiseHandshake,
) -> Result<Self::TransportCrypto, CryptoError>
fn transport_crypto( &self, handshake: &Self::NoiseHandshake, ) -> Result<Self::TransportCrypto, CryptoError>
Returns
TransportCrypto for the handshake’s selected AEAD
and hash algorithm. Read moreSource§fn export_1rtt_rekey(
&self,
handshake: &mut Self::NoiseHandshake,
rekey: &mut Self::TransportRekey,
) -> Result<(), CryptoError>
fn export_1rtt_rekey( &self, handshake: &mut Self::NoiseHandshake, rekey: &mut Self::TransportRekey, ) -> Result<(), CryptoError>
Extract the 1-RTT rekey chain from a finished handshake.
Auto Trait Implementations§
impl Freeze for RustCryptoBackend
impl RefUnwindSafe for RustCryptoBackend
impl Send for RustCryptoBackend
impl Sync for RustCryptoBackend
impl Unpin for RustCryptoBackend
impl UnwindSafe for RustCryptoBackend
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