Class JcaMTCCosigner
java.lang.Object
org.bouncycastle.cert.plants.jcajce.JcaMTCCosigner
- All Implemented Interfaces:
MTCCosigner
JCA-side implementation of
MTCCosigner for the MTC signature
algorithms named in MTCSignatureAlgorithm,
the algorithms this package binds (the draft itself fixes no list; see
MTCSignatureAlgorithm):
"ECDSA-P256-SHA256", "ECDSA-P384-SHA384", "Ed25519",
"ML-DSA-44", "ML-DSA-65", "ML-DSA-87".
Symmetric counterpart of JcaMTCSignatureVerifier — encapsulates
the MTCCosignedSubtree encode plus the underlying JCA
Signature ceremony. The algorithm names are mapped to JCA Signature
names internally; the two ECDSA names map to SHA256withECDSA /
SHA384withECDSA, so an ECDSA cosignature is the DER-encoded X9.62
ECDSA-Sig-Value, the form the working group's reference
implementation uses.
Instances are created via JcaMTCCosigner.Builder.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncosignSubtree(MTCLog log, byte[] subtreeHash) Cosigns the subtree[log.getStart(), log.getEnd())of the issuance log identified bylog.getLogId().byte[]
-
Method Details
-
getCosignerId
public byte[] getCosignerId()- Specified by:
getCosignerIdin interfaceMTCCosigner- Returns:
- the binary trust anchor ID of this cosigner — the value that
appears in
MTCCosignature.getCosignerId()on every signature produced by this instance. Per Section 5.3 of the draft, when the CA itself is acting as a cosigner this is the CA's own trust anchor ID.
-
cosignSubtree
Description copied from interface:MTCCosignerCosigns the subtree[log.getStart(), log.getEnd())of the issuance log identified bylog.getLogId().- Specified by:
cosignSubtreein interfaceMTCCosigner- Throws:
IOException- if the CosignedSubtree cannot be encoded or the underlying signing operation fails
-