New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 608868 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 506227



Sign in to add a comment

Certificate Transparency: Implement serialization and hashing of MerkleTreeLeaf

Project Member Reported by robpercival@chromium.org, May 3 2016

Issue description

In order to audit CT logs, we must request audit proofs for SCTs that Chrome receives. To do this, we need the leaf hash corresponding to each SCT (see https://tools.ietf.org/html/rfc6962#section-4.5). This could be generated by building a net::ct::MerkleTreeLeaf from a certificate and its SCT, serializing it to TLS wire format and then hashing it.

Serialization functions should be added to net/cert/ct_serialization.{h,cc}.

A hash function could be added to net/cert/merkle_tree_leaf.{h,cc}. It should use `crypto::SecureHash::Create(crypto::SecureHash::SHA256)` to hash the serialized MerkleTreeLeaf.


 
Following further research, `crypto::SHA256HashString()` seems more appropriate than `crypto::SecureHash`.
Project Member

Comment 2 by bugdroid1@chromium.org, May 7 2016

Project Member

Comment 4 by bugdroid1@chromium.org, May 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b1732191f54e031e740a6907dc5608c8d32ecfd

commit 1b1732191f54e031e740a6907dc5608c8d32ecfd
Author: robpercival <robpercival@chromium.org>
Date: Tue May 10 17:24:38 2016

Adds a function for encoding a Merkle tree leaf in TLS wire format.

This will be useful for producing a leaf hash, as required for requesting audit
proofs from Certificate Transparency logs. A leaf hash is a SHA-256 hash of a
Merkle tree leaf encoded in TLS wire format.

BUG= 608868 

Review-Url: https://codereview.chromium.org/1943313003
Cr-Commit-Position: refs/heads/master@{#392636}

[modify] https://crrev.com/1b1732191f54e031e740a6907dc5608c8d32ecfd/net/cert/ct_serialization.cc
[modify] https://crrev.com/1b1732191f54e031e740a6907dc5608c8d32ecfd/net/cert/ct_serialization.h
[modify] https://crrev.com/1b1732191f54e031e740a6907dc5608c8d32ecfd/net/cert/ct_serialization_unittest.cc
[modify] https://crrev.com/1b1732191f54e031e740a6907dc5608c8d32ecfd/net/test/ct_test_util.cc
[modify] https://crrev.com/1b1732191f54e031e740a6907dc5608c8d32ecfd/net/test/ct_test_util.h

Project Member

Comment 5 by bugdroid1@chromium.org, May 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34ef59d7bcd81a747334eadb0aac0dbac54ef1a5

commit 34ef59d7bcd81a747334eadb0aac0dbac54ef1a5
Author: robpercival <robpercival@chromium.org>
Date: Tue May 10 20:41:52 2016

Adds function for generating MerkleTreeLeaf hash.

This will be used when requesting audit proofs from Certificate Transparency
logs.

BUG= 608868 

Review-Url: https://codereview.chromium.org/1945183005
Cr-Commit-Position: refs/heads/master@{#392703}

[modify] https://crrev.com/34ef59d7bcd81a747334eadb0aac0dbac54ef1a5/net/cert/merkle_tree_leaf.cc
[modify] https://crrev.com/34ef59d7bcd81a747334eadb0aac0dbac54ef1a5/net/cert/merkle_tree_leaf.h
[modify] https://crrev.com/34ef59d7bcd81a747334eadb0aac0dbac54ef1a5/net/cert/merkle_tree_leaf_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment