Class MTCCertAuth
java.lang.Object
org.bouncycastle.cert.plants.MTCCertAuth
Identity-side helper for an MTC Certification Authority, per Section 5 of
draft-ietf-plants-merkle-tree-certs. Bundles the CA's trust anchor ID (in
both dotted-decimal and binary forms) along with the log hash and cosigner
signature algorithm identifiers, and exposes the per-issuance derivations
that depend on this identity:
logId(long)— the issuance log's binary trust anchor IDissuerName()— the X.500 Name used in the cert's issuer fieldcertSerial(long, long)— a packed(log_number, index)cert serial-
— the
invalid reference
#authorityInfo(BigInteger)MTCCertificationAuthorityextension value the relying party needs out-of-band
Identity-only: the CA's signing keypair stays separate so the same
MTCCertAuth can be shared between an issuer (which holds the private
key for cosigning) and a relying party (which holds the matching public key
for verification).
-
Constructor Summary
ConstructorsConstructorDescriptionMTCCertAuth(byte[] caId, MerkleTreeHash hashFunc, org.bouncycastle.asn1.ASN1ObjectIdentifier sigAlgOid) MTCCertAuth(String dottedCaId, MerkleTreeHash hashFunc, org.bouncycastle.asn1.ASN1ObjectIdentifier sigAlgOid) -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.MTCCertificationAuthorityauthorityInfo(BigInteger minSerial, BigInteger maxSerial) Builds theMTCCertificationAuthorityextension value that the relying party needs to validate certs from this CA.certSerial(long logNumber, long index) certSerial(MTCLog log, long index) Equivalent tocertSerial(long, long)with the log number taken fromlog.getLogNumber().byte[]getCaId()org.bouncycastle.asn1.x500.X500Namebyte[]logId(long logNumber)
-
Constructor Details
-
MTCCertAuth
public MTCCertAuth(String dottedCaId, MerkleTreeHash hashFunc, org.bouncycastle.asn1.ASN1ObjectIdentifier sigAlgOid) - Parameters:
dottedCaId- dotted-decimal form of the CA's trust anchor ID (e.g."32473.1")hashFunc- hash function used by all issuance logs operated by this CA (Section 5.5) — itsalgorithm identifieris published in the CA'slogHashsigAlgOid- CA cosigner's signature algorithm (Section 5.5)
-
MTCCertAuth
public MTCCertAuth(byte[] caId, MerkleTreeHash hashFunc, org.bouncycastle.asn1.ASN1ObjectIdentifier sigAlgOid) - Parameters:
caId- binary form of the CA's trust anchor IDhashFunc- hash function used by all issuance logs operated by this CA (Section 5.5)sigAlgOid- CA cosigner's signature algorithm (Section 5.5)
-
-
Method Details
-
getCaId
public byte[] getCaId()- Returns:
- the CA's binary trust anchor ID (defensive copy).
-
getDottedCaId
- Returns:
- the CA's trust anchor ID in dotted-decimal form.
-
getHashFunc
- Returns:
- the hash function used by all issuance logs operated by this CA.
-
logId
public byte[] logId(long logNumber) - Parameters:
logNumber- log number (1 <= logNumber <= 2^16-1, Section 5.2)- Returns:
- the binary trust anchor ID of issuance log
logNumberoperated by this CA
-
issuerName
public org.bouncycastle.asn1.x500.X500Name issuerName()- Returns:
- the issuer
X500Namefor certs issued by this CA, carrying the trust anchor ID via the experimentalid_rdna_trustAnchorIDattribute
-
certSerial
- Parameters:
logNumber- log number (1 <= logNumber <= 2^16-1)index- entry index in the log (0 <= index <= 2^48-1)- Returns:
- the 64-bit cert serial composed per Section 6.1
-
certSerial
Equivalent tocertSerial(long, long)with the log number taken fromlog.getLogNumber(). -
authorityInfo
public org.bouncycastle.asn1.x509.MTCCertificationAuthority authorityInfo(BigInteger minSerial, BigInteger maxSerial) Builds theMTCCertificationAuthorityextension value that the relying party needs to validate certs from this CA. Combines the CA's log hash and cosigner signature algorithm with the supplied serial range.- Parameters:
minSerial- minimum allowed cert serial from this CA (Section 5.5 / 6.1)maxSerial- maximum allowed cert serial from this CA (Section 5.5 / 6.1)
-