public class BcMTCSignatureVerifier extends java.lang.Object implements MTCSignatureVerifier
MTCSignatureVerifier.
Bound to an AsymmetricKeyParameter and one of the canonical
algorithm names in MTCSignatureAlgorithm,
one of 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".
| Constructor and Description |
|---|
BcMTCSignatureVerifier(java.lang.String algorithm,
org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithm() |
boolean |
verify(byte[] cosignedMessage,
byte[] signature) |
public BcMTCSignatureVerifier(java.lang.String algorithm,
org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey)
public java.lang.String getAlgorithm()
getAlgorithm in interface MTCSignatureVerifierMTCSignatureAlgorithm constants. Lets callers check
a registered verifier against the algorithm a CA publishes for
its cosigner (Section 5.5 sigAlg).public boolean verify(byte[] cosignedMessage,
byte[] signature)
verify in interface MTCSignatureVerifiercosignedMessage - the encoded CosignedSubtree bytessignature - the candidate signature