pub struct CoseAuditSigner<'a> { /* private fields */ }Expand description
Hybrid (EdDSA + ML-DSA-65) signer for audit records, policy-aware.
Construct with CoseAuditSigner::new, passing the node’s enforced
CryptoPolicy. Under Hybrid the
ML-DSA-65 key is REQUIRED (fail-closed at sign time if absent); under
Classical it is OPTIONAL and a classical EdDSA-only signature is
emitted (the explicit, policy-selected pinned suite).
Implementations§
Source§impl<'a> CoseAuditSigner<'a>
impl<'a> CoseAuditSigner<'a>
Sourcepub fn new(
ed_sk: &'a SigningKey,
pq_sk: Option<&'a MlDsaSigningKey>,
policy: CryptoPolicy,
) -> Self
pub fn new( ed_sk: &'a SigningKey, pq_sk: Option<&'a MlDsaSigningKey>, policy: CryptoPolicy, ) -> Self
Construct a policy-aware audit signer.
policy is the node’s enforced crypto policy. pq_sk is the
provisioned ML-DSA-65 audit signing key (from the node’s
MlDsaSigningKeyStore). Under Hybrid: pq_sk = Some produces a
hybrid composite (EdDSA + ML-DSA-65); pq_sk = None makes
construction succeed but every AuditSigner::sign FAILS CLOSED
(an audit record cannot be downgraded to classical under a Hybrid
policy — use Self::can_sign to check ahead of a hot path;
production MUST provision the PQ key under Hybrid). Under
Classical: pq_sk is ignored and EdDSA-only signatures are
emitted (the policy-selected suite).
Sourcepub fn can_sign(&self) -> bool
pub fn can_sign(&self) -> bool
Whether this signer can produce a signature under its policy: under Hybrid this requires the PQ key; under Classical it always can. Production wiring SHOULD check this at startup and fail to boot if false under Hybrid (no audit signer ⇒ no Permit, per the S7 fail-closed contract).
Trait Implementations§
Source§impl AuditSigner for CoseAuditSigner<'_>
impl AuditSigner for CoseAuditSigner<'_>
Source§fn sign(&self, signing_input: &[u8]) -> Result<Vec<u8>, AuditError>
fn sign(&self, signing_input: &[u8]) -> Result<Vec<u8>, AuditError>
audit_signing_input).Auto Trait Implementations§
impl<'a> Freeze for CoseAuditSigner<'a>
impl<'a> RefUnwindSafe for CoseAuditSigner<'a>
impl<'a> Send for CoseAuditSigner<'a>
impl<'a> Sync for CoseAuditSigner<'a>
impl<'a> Unpin for CoseAuditSigner<'a>
impl<'a> UnsafeUnpin for CoseAuditSigner<'a>
impl<'a> UnwindSafe for CoseAuditSigner<'a>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request