Skip to main content

AgileSigningKey

Struct AgileSigningKey 

Source
pub struct AgileSigningKey { /* private fields */ }
Expand description

Self-describing crypto-agile private signing key (zeroized on drop, redacted in Debug).

Implementations§

Source§

impl AgileSigningKey

Source

pub const fn algorithm(&self) -> SignatureAlgorithm

Returns the signature algorithm of this signing key.

Source

pub fn expose_raw_bytes(&self) -> &[u8] ⓘ

Exposes the raw signing key bytes.

Source

pub fn from_raw( policy: SecurityPolicy, alg: SignatureAlgorithm, raw: &[u8], ) -> Result<Self>

Imports raw signing key bytes while enforcing policy and algorithm validation.

Source

pub fn expose_wire_bytes(&self) -> Vec<u8> ⓘ

Serializes into self-describing wire bytes (QASG || ver || alg_id || len || raw).

Source

pub fn from_wire_bytes(policy: SecurityPolicy, bytes: &[u8]) -> Result<Self>

Deserializes from self-describing wire bytes while enforcing policy.

Source

pub fn sign( &self, policy: SecurityPolicy, msg: &[u8], ctx: &[u8], ) -> Result<AgileSignature>

Signs msg with context ctx using fresh OS CSPRNG randomness (hedged mode).

Source

pub fn sign_deterministic( &self, policy: SecurityPolicy, msg: &[u8], ctx: &[u8], ) -> Result<AgileSignature>

Signs msg with context ctx in deterministic mode.

Trait Implementations§

Source§

impl Debug for AgileSigningKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for AgileSigningKey

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Zeroize for AgileSigningKey

Source§

fn zeroize(&mut self)

Overwrites all sensitive memory owned by self with zeros.

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

Source§

type Output = T

Should always be Self
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.