Index: net/cert/merkle_audit_proof.h |
diff --git a/net/cert/merkle_audit_proof.h b/net/cert/merkle_audit_proof.h |
index b214891ee145ee74218f488d8d21e1965fd5c7dd..d7c6e3c52f0ee27ae15898775eaff2a30ca373e4 100644 |
--- a/net/cert/merkle_audit_proof.h |
+++ b/net/cert/merkle_audit_proof.h |
@@ -24,17 +24,25 @@ NET_EXPORT uint64_t CalculateAuditPathLength(uint64_t leaf_index, |
// Audit proof for a Merkle tree leaf, as defined in section 2.1.1. of RFC6962. |
struct NET_EXPORT MerkleAuditProof { |
MerkleAuditProof(); |
MerkleAuditProof(uint64_t leaf_index, |
+ uint64_t tree_size, |
const std::vector<std::string>& audit_path); |
~MerkleAuditProof(); |
// Index of the tree leaf in the log. |
+ // Must be provided when fetching the proof from the log. |
uint64_t leaf_index = 0; |
+ // The proof works only in conjunction with an STH for this tree size. |
+ // Must be provided when fetching the proof from the log. |
+ uint64_t tree_size = 0; |
+ |
// Audit path nodes. |
+ // Using the leaf hash and these nodes, the STH hash can be reconstructed to |
+ // prove that leaf was included in the log's tree. |
std::vector<std::string> nodes; |
}; |
} // namespace ct |
} // namespace net |