Class LandmarkCertificateManager
java.lang.Object
org.bouncycastle.cert.plants.LandmarkCertificateManager
Issuance- and relying-party-side helpers for landmark subtrees, per
Sections 6.3 and 7.4 of draft-ietf-plants-merkle-tree-certs.
buildLandmarkCertificate(long, long, TBSCertificateLogEntry, SubjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo, List, 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA trusted subtree along with the reference checkpoint that proved its consistency, per Section 7.4.static classMaintains 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic X509CertificateHolderbuildLandmarkCertificate(long logNumber, long index, org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo landmarkSubtree, 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 X509CertificateHolderbuildLandmarkCertificate(MTCLog log, long index, org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, List<byte[]> inclusionProof) Convenience overload ofbuildLandmarkCertificate(long, long, TBSCertificateLogEntry, SubjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo, List, MerkleTreeHash)taking the log number, landmark subtree window and hash function from anMTCLogwhose[start, end)is the landmark subtree.
-
Constructor Details
-
LandmarkCertificateManager
public LandmarkCertificateManager()
-
-
Method Details
-
buildLandmarkCertificate
public static X509CertificateHolder buildLandmarkCertificate(long logNumber, long index, org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo landmarkSubtree, List<byte[]> inclusionProof, MerkleTreeHash hashFunc) throws IOException Builds a landmark-relative certificate (no signatures, only an inclusion proof to a predistributed landmark subtree, Section 6.3.4). The certificate serial number is packed from the log number and the entry's index per Section 6.1:serial = (log_number << 48) | index.- Parameters:
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 function- Returns:
- the landmark-relative certificate
- Throws:
IOException
-
buildLandmarkCertificate
public static X509CertificateHolder buildLandmarkCertificate(MTCLog log, long index, org.bouncycastle.asn1.x509.TBSCertificateLogEntry tbsCertEntry, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, List<byte[]> inclusionProof) throws IOException Convenience overload ofbuildLandmarkCertificate(long, long, TBSCertificateLogEntry, SubjectPublicKeyInfo, MerkleTreePrimitives.SubtreeInfo, List, MerkleTreeHash)taking the log number, landmark subtree window and hash function from anMTCLogwhose[start, end)is the landmark subtree.- Throws:
IOException
-