Struct rustls::sign::Ed25519SigningKey

source ·
struct Ed25519SigningKey {
    key: Arc<Ed25519KeyPair>,
    scheme: SignatureScheme,
}
Expand description

A SigningKey that uses exactly one TLS-level SignatureScheme and one ring-level signature::SigningAlgorithm.

Compare this to RsaSigningKey, which for a particular key is willing to sign with several algorithms. This is quite poor cryptography practice, but is necessary because a given RSA key is expected to work in TLS1.2 (PKCS#1 signatures) and TLS1.3 (PSS signatures) – nobody is willing to obtain certificates for different protocol versions.

Currently this is only implemented for Ed25519 keys.

Fields§

§key: Arc<Ed25519KeyPair>§scheme: SignatureScheme

Implementations§

source§

impl Ed25519SigningKey

source

fn new(der: &PrivateKey, scheme: SignatureScheme) -> Result<Self, SignError>

Make a new Ed25519SigningKey from a DER encoding in PKCS#8 format, expecting a key usable with precisely the given signature scheme.

Trait Implementations§

source§

impl SigningKey for Ed25519SigningKey

source§

fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>

Choose a SignatureScheme from those offered. Read more
source§

fn algorithm(&self) -> SignatureAlgorithm

What kind of key we have.

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.