Skip to main content

Ed25519

Struct Ed25519 

Source
pub struct Ed25519;
Expand description

RFC 8032 Ed25519 (PureEdDSA over Curve25519 with SHA-512).

Trait Implementations§

Source§

impl Algorithm for Ed25519

Source§

const ID: &'static str = "ed25519"

Stable ontology identifier for this algorithm.
Source§

const NAME: &'static str = "Ed25519"

Human-facing display name (for example "SHA-256").
Source§

impl SelfTest for Ed25519

Source§

fn self_test() -> Result<()>

Run the algorithm’s known-answer test. Read more
Source§

impl SignatureScheme for Ed25519

Source§

const PRIVATE_KEY_LEN: usize = 32

Seed / private key length in bytes.
Source§

const PUBLIC_KEY_LEN: usize = 32

Public key length in bytes.
Source§

const SIGNATURE_LEN: usize = 64

Signature length in bytes.
Source§

fn public_key(private_key: &[u8], out: &mut [u8]) -> Result<()>

Derive the public key from a private key.
Source§

fn sign(private_key: &[u8], message: &[u8], signature: &mut [u8]) -> Result<()>

Sign message, writing exactly Self::SIGNATURE_LEN bytes.
Source§

fn verify(public_key: &[u8], message: &[u8], signature: &[u8]) -> Result<()>

Verify a signature, returning crate::ErrorKind::AuthenticationFailed when it does not check out.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.