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
impl Ed25519SigningKey
sourcefn new(der: &PrivateKey, scheme: SignatureScheme) -> Result<Self, SignError>
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
impl SigningKey for Ed25519SigningKey
source§fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>
fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>
Choose a
SignatureScheme
from those offered. Read moresource§fn algorithm(&self) -> SignatureAlgorithm
fn algorithm(&self) -> SignatureAlgorithm
What kind of key we have.
Auto Trait Implementations§
impl Freeze for Ed25519SigningKey
impl RefUnwindSafe for Ed25519SigningKey
impl Send for Ed25519SigningKey
impl Sync for Ed25519SigningKey
impl Unpin for Ed25519SigningKey
impl UnwindSafe for Ed25519SigningKey
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