pub struct SignedCheckpoint {
pub checkpoint: Checkpoint,
pub log_signature: TypedSignature,
pub log_public_key: Ed25519PublicKey,
pub witnesses: Vec<WitnessCosignature>,
pub ecdsa_checkpoint_signature: Option<EcdsaP256Signature>,
pub ecdsa_checkpoint_key: Option<EcdsaP256PublicKey>,
}Expand description
A checkpoint signed by the log operator (and optionally witnesses).
Args:
checkpoint— The unsigned checkpoint data.log_signature— Ed25519 signature from the log’s signing key.log_public_key— The log operator’s public key.witnesses— Optional witness cosignatures.
Usage:
ⓘ
let signed = SignedCheckpoint {
checkpoint,
log_signature: sig,
log_public_key: log_pk,
witnesses: vec![],
};Fields§
§checkpoint: Checkpoint§log_signature: TypedSignature§log_public_key: Ed25519PublicKey§witnesses: Vec<WitnessCosignature>§ecdsa_checkpoint_signature: Option<EcdsaP256Signature>ECDSA P-256 checkpoint signature (DER-encoded). Present when the log uses ECDSA instead of Ed25519 (e.g., Rekor production shard).
ecdsa_checkpoint_key: Option<EcdsaP256PublicKey>ECDSA P-256 public key for checkpoint verification (PKIX DER).
Implementations§
Source§impl SignedCheckpoint
impl SignedCheckpoint
Sourcepub fn verify_log_signature(
&self,
pinned_log_key: &Ed25519PublicKey,
) -> Result<(), TransparencyError>
pub fn verify_log_signature( &self, pinned_log_key: &Ed25519PublicKey, ) -> Result<(), TransparencyError>
Verify the log operator’s Ed25519 signature over this checkpoint’s C2SP note body against a pinned log key — never against the key the checkpoint itself carries (a self-chosen key verifying its own forged signature is the classic “trust the key I sent you” anti-pattern).
Two checks, both fail-closed:
- the embedded
log_public_keymust BE the pinned key (constant-time compare) — a checkpoint from a different operator is not this log’s, even if its own signature is internally consistent; log_signaturemust verify overCheckpoint::to_note_bodyunder the pinned key.
Pure and synchronous (ed25519-dalek), so every surface — native, FFI,
browser WASM — shares this one implementation.
Args:
pinned_log_key: The log operator’s Ed25519 key, obtained out of band.
Usage:
ⓘ
signed.verify_log_signature(&pinned_log_key)?;Trait Implementations§
Source§impl Clone for SignedCheckpoint
impl Clone for SignedCheckpoint
Source§fn clone(&self) -> SignedCheckpoint
fn clone(&self) -> SignedCheckpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignedCheckpoint
impl Debug for SignedCheckpoint
Source§impl<'de> Deserialize<'de> for SignedCheckpoint
impl<'de> Deserialize<'de> for SignedCheckpoint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignedCheckpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignedCheckpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SignedCheckpoint
impl PartialEq for SignedCheckpoint
Source§impl Serialize for SignedCheckpoint
impl Serialize for SignedCheckpoint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SignedCheckpoint
Auto Trait Implementations§
impl Freeze for SignedCheckpoint
impl RefUnwindSafe for SignedCheckpoint
impl Send for SignedCheckpoint
impl Sync for SignedCheckpoint
impl Unpin for SignedCheckpoint
impl UnsafeUnpin for SignedCheckpoint
impl UnwindSafe for SignedCheckpoint
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