Class BcMTCSignatureVerifier
java.lang.Object
org.bouncycastle.cert.plants.bc.BcMTCSignatureVerifier
- All Implemented Interfaces:
MTCSignatureVerifier
Lightweight implementation of
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 Summary
ConstructorsConstructorDescriptionBcMTCSignatureVerifier(String algorithm, org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey) -
Method Summary
-
Constructor Details
-
BcMTCSignatureVerifier
public BcMTCSignatureVerifier(String algorithm, org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey)
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceMTCSignatureVerifier- Returns:
- the MTC signature algorithm this verifier is bound to — one of
the
MTCSignatureAlgorithmconstants. Lets callers check a registered verifier against the algorithm a CA publishes for its cosigner (Section 5.5sigAlg).
-
verify
public boolean verify(byte[] cosignedMessage, byte[] signature) - Specified by:
verifyin interfaceMTCSignatureVerifier- Parameters:
cosignedMessage- the encoded CosignedSubtree bytessignature- the candidate signature- Returns:
- true if the signature is valid for the bound public key and algorithm
-