pub struct Checkpoint {
pub origin: String,
pub tree_size: u64,
pub root_hash: Sha256Hash,
pub other_content: Vec<String>,
pub signatures: Vec<CheckpointSignature>,
pub signed_note_text: String,
}Expand description
A checkpoint (signed tree head) from a transparency log.
Also known as a “signed note” in the Go ecosystem. Contains the log state (origin, tree size, root hash) plus one or more cryptographic signatures.
Fields§
§origin: StringThe origin string identifying the log (e.g., “rekor.sigstore.dev - 2605736670972794746”)
tree_size: u64Tree size (number of leaves/entries in the log)
root_hash: Sha256HashRoot hash of the Merkle tree (32 bytes SHA-256)
other_content: Vec<String>Other data lines (optional extension data, e.g., “Timestamp: 1689177396617352539”)
signatures: Vec<CheckpointSignature>Signatures over the checkpoint
signed_note_text: StringRaw text of the checkpoint body (used for signature verification). This is the text before the blank line separator, with trailing newline.
Implementations§
Source§impl Checkpoint
impl Checkpoint
Sourcepub fn from_text(text: &str) -> Result<Self>
pub fn from_text(text: &str) -> Result<Self>
Parse a checkpoint from its text representation
Format:
<origin>
<tree_size>
<root_hash_base64>
[other_content...]
— <key_id_base64> <sig_base64>
[additional signatures...]Sourcepub fn to_signed_note_body(&self) -> String
pub fn to_signed_note_body(&self) -> String
Encode the checkpoint to its text representation (without signatures).
This returns the signed note body that can be used for signature verification.
Sourcepub fn find_signature_by_key_hint(
&self,
key_hint: &KeyHint,
) -> Option<&CheckpointSignature>
pub fn find_signature_by_key_hint( &self, key_hint: &KeyHint, ) -> Option<&CheckpointSignature>
Find a signature matching the given key hint (key ID).
The key hint is the first 4 bytes of SHA-256(public_key_der). Returns the signature if found, or None if no matching signature exists.
Sourcepub fn signed_data(&self) -> &[u8] ⓘ
pub fn signed_data(&self) -> &[u8] ⓘ
Get the raw signed note text for signature verification.
This is the checkpoint body (before the blank line) with trailing newline, which is what gets signed.
Trait Implementations§
Source§impl Clone for Checkpoint
impl Clone for Checkpoint
Source§fn clone(&self) -> Checkpoint
fn clone(&self) -> Checkpoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more