pub struct HardwareBackedSigner { /* private fields */ }Expand description
Adapts a HardwareSigner to Signer: the Ed25519 half is produced in hardware, the
ML-DSA-65 half in software from the sealed ξ seed, and the two are combined into a
HybridSignature.
Implementations§
Source§impl HardwareBackedSigner
impl HardwareBackedSigner
Sourcepub fn enroll(
hardware: Arc<dyn HardwareSigner>,
key_alias: String,
ml_seed: &[u8; 32],
) -> Result<Self, CryptoError>
pub fn enroll( hardware: Arc<dyn HardwareSigner>, key_alias: String, ml_seed: &[u8; 32], ) -> Result<Self, CryptoError>
Enroll the device key: ensure the hardware Ed25519 key exists (returning its public
half) and build the published hybrid verifying key from it plus the software ML-DSA-65
public key derived from ml_seed (the ξ half of the sealed DSK seed).
Trait Implementations§
Source§impl Signer for HardwareBackedSigner
impl Signer for HardwareBackedSigner
Source§fn sign(&self, msg: &[u8]) -> Result<HybridSignature, CryptoError>
fn sign(&self, msg: &[u8]) -> Result<HybridSignature, CryptoError>
Sign
msg, producing both signature halves (Ed25519 ‖ ML-DSA-65). Read moreSource§fn verifying_key(&self) -> HybridVerifyingKey
fn verifying_key(&self) -> HybridVerifyingKey
The hybrid public key both halves of
sign verify against.Auto Trait Implementations§
impl !RefUnwindSafe for HardwareBackedSigner
impl !UnwindSafe for HardwareBackedSigner
impl Freeze for HardwareBackedSigner
impl Send for HardwareBackedSigner
impl Sync for HardwareBackedSigner
impl Unpin for HardwareBackedSigner
impl UnsafeUnpin for HardwareBackedSigner
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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>
Converts
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>
Converts
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 more