Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: net/cert/merkle_audit_proof.h

Issue 2182533002: Adds a VerifyAuditProof method to CTLogVerifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/ct_log_verifier_unittest.cc ('k') | net/cert/merkle_audit_proof.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/cert/ct_log_verifier_unittest.cc ('k') | net/cert/merkle_audit_proof.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698