Skip to main content

SigningKey

Struct SigningKey 

Source
pub struct SigningKey<'a, M: RawMutex, PHY> { /* private fields */ }

Implementations§

Source§

impl<'a, M: RawMutex, PHY> SigningKey<'a, M, PHY>

Source

pub fn verifying_key(&'a mut self) -> VerifyingKey<'a, M, PHY>

Source§

impl<'a, M, PHY> SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source

pub async fn sign_digest(&self, digest: &Digest) -> Result<Signature, Error>

Takes a 32-byte message to be signed, typically the SHA256 hash of the full message.

Source

pub async fn sign(&self, msg: &[u8]) -> Result<Signature, Error>

Source§

impl<'a, M, PHY> SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source

pub fn sign_digest_blocking(&self, digest: &Digest) -> Result<Signature, Error>

Takes a 32-byte message to be signed, typically the SHA256 hash of the full message.

Source

pub fn sign_blocking(&self, msg: &[u8]) -> Result<Signature, Error>

Trait Implementations§

Source§

impl<'a, M, PHY, D> DigestSigner<D, Signature<NistP256>> for SigningKey<'a, M, PHY>
where PHY: I2c, D: Digest, M: RawMutex,

Source§

fn try_sign_digest(&self, digest: D) -> Result<Signature>

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong.
Source§

fn sign_digest(&self, digest: D) -> S

Sign the given prehashed message Digest, returning a signature. Read more
Source§

impl<'a, M, PHY, D> DigestSigner<D, Signature<NistP256>> for SigningKey<'a, M, PHY>
where PHY: I2c, D: Digest, M: RawMutex,

Source§

fn try_sign_digest(&self, digest: D) -> Result<DerSignature>

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong.
Source§

fn sign_digest(&self, digest: D) -> S

Sign the given prehashed message Digest, returning a signature. Read more
Source§

impl<'a, M, PHY> Keypair for SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source§

type VerifyingKey = PublicKey

Verifying key type for this keypair.
Source§

fn verifying_key(&self) -> Self::VerifyingKey

Get the verifying key which can verify signatures produced by the signing key portion of this keypair.
Source§

impl<'a, M, PHY> PrehashSigner<Signature<NistP256>> for SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source§

fn sign_prehash(&self, prehash: &[u8]) -> Result<Signature>

Attempt to sign the given message digest, returning a digital signature on success, or an error if something went wrong. Read more
Source§

impl<'a, M, PHY> PrehashSigner<Signature<NistP256>> for SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source§

fn sign_prehash(&self, prehash: &[u8]) -> Result<DerSignature>

Attempt to sign the given message digest, returning a digital signature on success, or an error if something went wrong. Read more
Source§

impl<'a, M, PHY> Signer<Signature<NistP256>> for SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source§

fn try_sign(&self, msg: &[u8]) -> Result<Signature>

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
Source§

fn sign(&self, msg: &[u8]) -> S

Sign the given message and return a digital signature
Source§

impl<'a, M, PHY> Signer<Signature<NistP256>> for SigningKey<'a, M, PHY>
where PHY: I2c, M: RawMutex,

Source§

fn try_sign(&self, msg: &[u8]) -> Result<DerSignature>

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
Source§

fn sign(&self, msg: &[u8]) -> S

Sign the given message and return a digital signature

Auto Trait Implementations§

§

impl<'a, M, PHY> !RefUnwindSafe for SigningKey<'a, M, PHY>

§

impl<'a, M, PHY> !UnwindSafe for SigningKey<'a, M, PHY>

§

impl<'a, M, PHY> Forget for SigningKey<'a, M, PHY>

§

impl<'a, M, PHY> Freeze for SigningKey<'a, M, PHY>
where &'a AtCaClient<M, PHY>: Freeze,

§

impl<'a, M, PHY> Move for SigningKey<'a, M, PHY>

§

impl<'a, M, PHY> Send for SigningKey<'a, M, PHY>
where &'a AtCaClient<M, PHY>: Send,

§

impl<'a, M, PHY> Sync for SigningKey<'a, M, PHY>
where &'a AtCaClient<M, PHY>: Sync,

§

impl<'a, M, PHY> Unpin for SigningKey<'a, M, PHY>
where &'a AtCaClient<M, PHY>: Unpin,

§

impl<'a, M, PHY> UnsafeUnpin for SigningKey<'a, M, PHY>
where &'a AtCaClient<M, PHY>: UnsafeUnpin,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S, T> SignerMut<S> for T
where T: Signer<S>,

Source§

fn try_sign(&mut self, msg: &[u8]) -> Result<S, Error>

Attempt to sign the given message, updating the state, and returning a digital signature on success, or an error if something went wrong. Read more
Source§

fn sign(&mut self, msg: &[u8]) -> S

Sign the given message, update the state, and return a digital signature.
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.