pub struct LogSigningKey { /* private fields */ }Expand description
The log operator’s Ed25519 checkpoint-signing key, parsed and
curve-checked at construction so signing can never fail on curve drift.
The C2SP signed-note log_signature field is Ed25519-pinned by spec;
non-Ed25519 keys are rejected here, once, at the boundary.
Implementations§
Source§impl LogSigningKey
impl LogSigningKey
Sourcepub fn generate() -> Result<Self, TransparencyError>
pub fn generate() -> Result<Self, TransparencyError>
Generate a fresh Ed25519 signing key from OS randomness.
Usage:
ⓘ
let key = LogSigningKey::generate()?;
std::fs::write(key_path, key.to_pkcs8_der()?)?;Sourcepub fn from_pkcs8_der(der: &[u8]) -> Result<Self, TransparencyError>
pub fn from_pkcs8_der(der: &[u8]) -> Result<Self, TransparencyError>
Parse a signing key from PKCS#8 DER bytes.
Args:
der— PKCS#8 DER as previously produced bySelf::to_pkcs8_der.
Sourcepub fn from_seed(seed: [u8; 32]) -> Result<Self, TransparencyError>
pub fn from_seed(seed: [u8; 32]) -> Result<Self, TransparencyError>
Build a signing key from a raw 32-byte Ed25519 seed.
A witness node uses ONE Ed25519 identity for both its cosignatures and its log checkpoints — verifiers pin a single member key — so the node derives both signers from the same stable seed.
Args:
seed— The 32-byte Ed25519 seed.
Usage:
ⓘ
let key = LogSigningKey::from_seed(node_seed)?;Sourcepub fn to_pkcs8_der(&self) -> Result<Vec<u8>, TransparencyError>
pub fn to_pkcs8_der(&self) -> Result<Vec<u8>, TransparencyError>
PKCS#8 DER bytes for persisting the key alongside the log.
Sourcepub fn public_key(&self) -> Ed25519PublicKey
pub fn public_key(&self) -> Ed25519PublicKey
The log’s public key — what verifiers pin as the log identity.
Auto Trait Implementations§
impl Freeze for LogSigningKey
impl RefUnwindSafe for LogSigningKey
impl Send for LogSigningKey
impl Sync for LogSigningKey
impl Unpin for LogSigningKey
impl UnsafeUnpin for LogSigningKey
impl UnwindSafe for LogSigningKey
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