pub struct AgileSigningKey { /* private fields */ }Expand description
Self-describing crypto-agile private signing key (zeroized on drop, redacted in Debug).
Implementations§
Source§impl AgileSigningKey
impl AgileSigningKey
Sourcepub const fn algorithm(&self) -> SignatureAlgorithm
pub const fn algorithm(&self) -> SignatureAlgorithm
Returns the signature algorithm of this signing key.
Sourcepub fn expose_raw_bytes(&self) -> &[u8] ⓘ
pub fn expose_raw_bytes(&self) -> &[u8] ⓘ
Exposes the raw signing key bytes.
Sourcepub fn from_raw(
policy: SecurityPolicy,
alg: SignatureAlgorithm,
raw: &[u8],
) -> Result<Self>
pub fn from_raw( policy: SecurityPolicy, alg: SignatureAlgorithm, raw: &[u8], ) -> Result<Self>
Imports raw signing key bytes while enforcing policy and algorithm validation.
Sourcepub fn expose_wire_bytes(&self) -> Vec<u8> ⓘ
pub fn expose_wire_bytes(&self) -> Vec<u8> ⓘ
Serializes into self-describing wire bytes (QASG || ver || alg_id || len || raw).
Sourcepub fn from_wire_bytes(policy: SecurityPolicy, bytes: &[u8]) -> Result<Self>
pub fn from_wire_bytes(policy: SecurityPolicy, bytes: &[u8]) -> Result<Self>
Deserializes from self-describing wire bytes while enforcing policy.
Sourcepub fn sign(
&self,
policy: SecurityPolicy,
msg: &[u8],
ctx: &[u8],
) -> Result<AgileSignature>
pub fn sign( &self, policy: SecurityPolicy, msg: &[u8], ctx: &[u8], ) -> Result<AgileSignature>
Signs msg with context ctx using fresh OS CSPRNG randomness (hedged mode).
Sourcepub fn sign_deterministic(
&self,
policy: SecurityPolicy,
msg: &[u8],
ctx: &[u8],
) -> Result<AgileSignature>
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
impl Debug for AgileSigningKey
Source§impl Drop for AgileSigningKey
impl Drop for AgileSigningKey
Auto Trait Implementations§
impl Freeze for AgileSigningKey
impl RefUnwindSafe for AgileSigningKey
impl Send for AgileSigningKey
impl Sync for AgileSigningKey
impl Unpin for AgileSigningKey
impl UnsafeUnpin for AgileSigningKey
impl UnwindSafe for AgileSigningKey
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