Rekor RFC 6962 Leaf & Interior Node Hashing Formula
merkle-math.txt
# Domain separation prevents second-preimage attacks in Rekor / Certificate Transparency:
LeafHash(leaf_bytes) = SHA256(0x00 || leaf_bytes)
NodeHash(left, right) = SHA256(0x01 || left || right)
# 1. Decode base64 canonicalizedBody -> leaf_bytes
# 2. Compute h = LeafHash(leaf_bytes)
# 3. Fold sibling hashes[] using binary bit decomposition of logIndex vs treeSize
# 4. Assert final computed root === inclusionProof.rootHash
# 5. Verify checkpoint.envelope signature against trusted Rekor log public key
Key Security & Architecture Takeaways
Rekor v1+ bundles shift verification away from trusting a standalone signedEntryTimestamp (SET) promise to verifying an explicit Merkle inclusionProof + signed checkpoint envelope.
Because Merkle proof size scales as O(log2 N), even a log with 150 million entries needs fewer than 28 SHA-256 sibling hashes (~900 bytes) to prove inclusion.
Decoding canonicalizedBody directly reveals the exact hashedrekord or dsse payload digest and verifier certificate anchored at integratedTime.
Common Production Pitfalls to Avoid
Ignoring checkpoint signature verification and checking only rootHash equality allows an attacker to fabricate a matching fake tree.
Mixing up hex-encoded vs base64-encoded rootHash/hashes[] across Rekor REST responses (hex) vs protobuf-JSON Sigstore bundles (base64 or hex depending on serializer).
Skipping inclusionProof verification on air-gapped CI runners leaves unsigned local clocks vulnerable to backdated certificate claims.
Sign release artifacts and attach CycloneDX/SPDX SBOMs in GitHub Actions without long-lived private keys using OIDC id-token: write, Fulcio ephemeral certificates, and Rekor transparency logs.
Publish verifiable npm packages with --provenance on GitHub Actions or GitLab CI, inspect DSSE in-toto SLSA statements, and enforce npm audit signatures in CI.
Attach CycloneDX/SPDX SBOMs and SLSA provenance to container images using docker buildx --sbom=true --provenance=true and enforce digest-pinned verification in Kubernetes/CI.
What is the difference between inclusionPromise (SET) and inclusionProof?
inclusionPromise is a signed promise by Rekor to include the entry later, whereas inclusionProof + checkpoint proves mathematically that the entry was already committed to Rekor's immutable Merkle tree.
Can I look up Rekor log entries by SHA-256 or logIndex via REST API?
Yes — RungLab RapidAPI Gateway v1.3.0 exposes GET /v1/rekor/entry/{uuidOrIndex} and POST /v1/rekor/lookup for programmatic CI and agent workflows.
Does this browser tool upload my Sigstore bundle to Rekor?
No. Strict CSP connect-src 'none' guarantees zero outbound requests — base64 decoding, ASN.1 X.509 parsing, and inclusionProof inspection run 100% locally.