pub struct SigningKey(/* private fields */);Expand description
A signing key for minting receipts: Ed25519 secret key material, held
locally by the operator’s server. The secret never enters the store
abstraction — the server persists it as a 0600 file under
{store_path}/keys/ and keeps only the public half in the key history,
so a database backend can never hold what it must not leak.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn generate() -> Self
pub fn generate() -> Self
A fresh keypair drawn from OS entropy (two v4 UUID draws — 32 bytes
of getrandom entropy, the same source the runtime’s id minting
already trusts; ed25519-dalek carries no RNG feature here).
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Wrap 32 bytes of secret key material (the stored secret-file form).
Sourcepub fn to_bytes(&self) -> [u8; 32]
pub fn to_bytes(&self) -> [u8; 32]
The 32 secret bytes — what the server’s 0600 secret file holds.
Sourcepub fn from_hex(hex: &str) -> Option<Self>
pub fn from_hex(hex: &str) -> Option<Self>
Rehydrate from the hex form (SigningKey::to_hex).
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
The public half.
Sourcepub fn key_id(&self) -> String
pub fn key_id(&self) -> String
This key’s content-addressed id (derive_key_id).