Class JcaMTCCosigner
- java.lang.Object
-
- org.bouncycastle.cert.plants.jcajce.JcaMTCCosigner
-
- All Implemented Interfaces:
MTCCosigner
public class JcaMTCCosigner extends java.lang.Object implements MTCCosigner
JCA-side implementation ofMTCCosignerfor the MTC signature algorithms enumerated in Section 6.1 of draft-ietf-plants-merkle-tree-certs:"ECDSA-P256-SHA256","ECDSA-P384-SHA384","Ed25519","ML-DSA-44","ML-DSA-65","ML-DSA-87".Symmetric counterpart of
JcaMTCSignatureVerifier— encapsulates theMTCCosignedMessageencode plus the underlying JCASignatureceremony. The draft identifiers are mapped to JCA Signature names internally; the plain (r||s) ECDSA encoding used by MTCProof requiresSHA256WITHPLAIN-ECDSA/SHA384WITHPLAIN-ECDSA, which BC's JCE provider registers (DER-encodedSHA256withECDSAis wire-incompatible with the MTCProof signature byte format).Instances are created via
JcaMTCCosigner.Builder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJcaMTCCosigner.BuilderBuilder forJcaMTCCosigner.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MTCSignaturecosignSubtree(MTCLog log, byte[] subtreeHash)Cosigns the subtree[log.getStart(), log.getEnd())of the issuance log identified bylog.getLogId().byte[]getCosignerId()
-
-
-
Method Detail
-
getCosignerId
public byte[] getCosignerId()
- Specified by:
getCosignerIdin interfaceMTCCosigner- Returns:
- the binary trust anchor ID of this cosigner — the value that
appears in
MTCSignature.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
public MTCSignature cosignSubtree(MTCLog log, byte[] subtreeHash) throws java.io.IOException
Description copied from interface:MTCCosignerCosigns the subtree[log.getStart(), log.getEnd())of the issuance log identified bylog.getLogId().- Specified by:
cosignSubtreein interfaceMTCCosigner- Throws:
java.io.IOException- if the CosignedMessage cannot be encoded or the underlying signing operation fails
-
-