public class BcMTCCosigner extends java.lang.Object implements MTCCosigner
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 BcMTCSignatureVerifier — encapsulates
the MTCCosignedSubtree encode plus the underlying lightweight
Signer ceremony.
| Constructor and Description |
|---|
BcMTCCosigner(byte[] cosignerId,
org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey) |
BcMTCCosigner(java.lang.String algorithm,
byte[] cosignerId,
org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
Override constructor that takes an explicit MTC algorithm string instead
of detecting it from the key type.
|
| Modifier and Type | Method and Description |
|---|---|
MTCCosignature |
cosignSubtree(MTCLog log,
byte[] subtreeHash)
Cosigns the subtree
[log.getStart(), log.getEnd()) of the
issuance log identified by log.getLogId(). |
byte[] |
getCosignerId() |
public BcMTCCosigner(byte[] cosignerId,
org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
cosignerId - binary trust anchor ID of this cosigner — the CA's own
trust anchor ID when the CA itself cosigns (Section
5.3); the cosigner's own trust anchor ID otherwiseprivateKey - lightweight private key whose type determines the MTC
signature algorithm (see
BcMTCSigners.detectAlgorithm(org.bouncycastle.crypto.params.AsymmetricKeyParameter))public BcMTCCosigner(java.lang.String algorithm,
byte[] cosignerId,
org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
key-type dispatch doesn't apply.public byte[] getCosignerId()
getCosignerId in interface MTCCosignerMTCCosignature.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.public MTCCosignature cosignSubtree(MTCLog log, byte[] subtreeHash) throws java.io.IOException
MTCCosigner[log.getStart(), log.getEnd()) of the
issuance log identified by log.getLogId().cosignSubtree in interface MTCCosignerjava.io.IOException - if the CosignedSubtree cannot be encoded or the
underlying signing operation fails