Struct libp2p_noise::SecretKey
source · pub struct SecretKey<T: Zeroize>(_);
Expand description
DH secret key.
Implementations§
source§impl SecretKey<X25519>
impl SecretKey<X25519>
sourcepub fn from_ed25519(ed25519_sk: &SecretKey) -> Self
pub fn from_ed25519(ed25519_sk: &SecretKey) -> Self
Construct a X25519 secret key from a Ed25519 secret key.
Note: If the Ed25519 secret key is already used in the context of other cryptographic protocols outside of Noise, it should be preferred to create a new keypair for use in the Noise protocol.
See also:
Trait Implementations§
source§impl From<SecretKey<X25519Spec>> for Keypair<X25519Spec>
impl From<SecretKey<X25519Spec>> for Keypair<X25519Spec>
Promote a X25519 secret key into a keypair.
source§fn from(secret: SecretKey<X25519Spec>) -> Keypair<X25519Spec>
fn from(secret: SecretKey<X25519Spec>) -> Keypair<X25519Spec>
Converts to this type from the input type.