Skip to main content

SecureElement

Trait SecureElement 

Source
pub trait SecureElement {
    type Error: Debug;

    // Required methods
    fn sign(&mut self, msg: &[u8]) -> Result<[u8; 64], Self::Error>;
    fn pubkey(&self) -> [u8; 32];
}
Expand description

A hardware-backed signing key (e.g. ATECC608 / SE050 / Nitrokey). The private material never leaves the device; signing happens via sign(msg).

Required Associated Types§

Required Methods§

Source

fn sign(&mut self, msg: &[u8]) -> Result<[u8; 64], Self::Error>

Sign msg and return the 64-byte ed25519 signature.

Source

fn pubkey(&self) -> [u8; 32]

Return the 32-byte ed25519 public key bound to this element.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§