public class LandmarkCertificateManager
extends java.lang.Object
buildLandmarkCertificate(long, long, org.bouncycastle.asn1.x509.TBSCertificateLogEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, org.bouncycastle.cert.plants.MerkleTreePrimitives.SubtreeInfo, java.util.List<byte[]>, org.bouncycastle.cert.plants.MerkleTreeHash) produces a landmark-relative
certificate (an X.509 wrapper around an MTCProof whose inclusion
proof targets a predistributed landmark subtree). The nested
LandmarkCertificateManager.TrustedSubtreeManager maintains a relying party's set of
trusted landmarks, accepting a new landmark
once it has been related to a sufficiently-cosigned reference checkpoint
via a subtree consistency proof.
| Modifier and Type | Class and Description |
|---|---|
static class |
LandmarkCertificateManager.TrustedSubtreeEntry
A trusted subtree along with the reference checkpoint that proved its
consistency, per Section 7.4.
|
static class |
LandmarkCertificateManager.TrustedSubtreeManager
Maintains a relying-party-side list of trusted subtrees by accepting new
landmarks that come with a cosigned reference checkpoint and a subtree
consistency proof.
|
| Constructor and Description |
|---|
LandmarkCertificateManager() |
| Modifier and Type | Method and Description |
|---|---|
static X509CertificateHolder |
buildLandmarkCertificate(long logNumber,
long index,
org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo,
MerkleTreePrimitives.SubtreeInfo landmarkSubtree,
java.util.List<byte[]> inclusionProof,
MerkleTreeHash hashFunc)
Builds a landmark-relative certificate (no signatures, only an inclusion
proof to a predistributed landmark subtree, Section 6.3.4).
|
static X509CertificateHolder |
buildLandmarkCertificate(MTCLog log,
long index,
org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo,
java.util.List<byte[]> inclusionProof)
Convenience overload of
buildLandmarkCertificate(long, long, TBSCertificateLogEntry, SubjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo, List, MerkleTreeHash)
taking the log number, landmark subtree window and hash function from an
MTCLog whose [start, end) is the landmark subtree. |
public static X509CertificateHolder buildLandmarkCertificate(long logNumber, long index, org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo landmarkSubtree, java.util.List<byte[]> inclusionProof, MerkleTreeHash hashFunc) throws java.io.IOException
serial = (log_number << 48) | index.logNumber - number of the issuance log containing the entry
(1 <= logNumber <= 2^16-1)index - the entry's index in the log (0 <= index <= 2^48-1)tbsCertEntry - the TBSCertificateLogEntry describing the entrysubjectPublicKeyInfo - the actual subject public key (its hash must match tbsCertEntry.subjectPublicKeyInfoHash)landmarkSubtree - the landmark subtree containing the entryinclusionProof - inclusion proof hashes from the entry to landmarkSubtreehashFunc - the log's hash functionjava.io.IOExceptionpublic static X509CertificateHolder buildLandmarkCertificate(MTCLog log, long index, org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, java.util.List<byte[]> inclusionProof) throws java.io.IOException
buildLandmarkCertificate(long, long, TBSCertificateLogEntry, SubjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo, List, MerkleTreeHash)
taking the log number, landmark subtree window and hash function from an
MTCLog whose [start, end) is the landmark subtree.java.io.IOException