pub trait RustCryptoEd25519Ext {
// Required methods
fn ed25519_signing_key(&self) -> SigningKey;
fn ed25519_verifying_key(&self) -> VerifyingKey;
}Expand description
Extension trait to convert uselesskey Ed25519 fixtures into ed25519-dalek types.
§Examples
use uselesskey_core::Factory;
use uselesskey_ed25519::{Ed25519FactoryExt, Ed25519Spec};
use uselesskey_rustcrypto::RustCryptoEd25519Ext;
use ed25519_dalek::{Signer, Verifier};
let fx = Factory::random();
let keypair = fx.ed25519("my-service", Ed25519Spec::new());
let signing_key = keypair.ed25519_signing_key();
let signature = signing_key.sign(b"hello");
let verifying_key = keypair.ed25519_verifying_key();
verifying_key.verify(b"hello", &signature).unwrap();Required Methods§
Sourcefn ed25519_signing_key(&self) -> SigningKey
fn ed25519_signing_key(&self) -> SigningKey
Convert the Ed25519 fixture to an ed25519_dalek::SigningKey.
Sourcefn ed25519_verifying_key(&self) -> VerifyingKey
fn ed25519_verifying_key(&self) -> VerifyingKey
Derive the ed25519_dalek::VerifyingKey from the fixture.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl RustCryptoEd25519Ext for Ed25519KeyPair
Available on crate feature ed25519 only.
impl RustCryptoEd25519Ext for Ed25519KeyPair
Available on crate feature
ed25519 only.