Interface MTCSignatureVerifier
- All Known Implementing Classes:
BcMTCSignatureVerifier, JcaMTCSignatureVerifier
public interface MTCSignatureVerifier
Operator interface for verifying a single cosigner signature over a
pre-encoded CosignedMessage, per Section 5.3.1 of
draft-ietf-plants-merkle-tree-certs.
An implementation is bound to a specific public key and algorithm at
construction; callers feed it the CosignedMessage bytes (built via
MTCCosignedMessage.encode(byte[], long, long, byte[], byte[])) and the candidate signature, and the
implementation returns whether the signature is valid.
JCA-free and lightweight-crypto-free. Concrete bindings:
org.bouncycastle.cert.plants.bc.BcMTCSignatureVerifier (lightweight)
and
org.bouncycastle.cert.plants.jcajce.JcaMTCSignatureVerifier (JCA).
-
Method Summary
-
Method Details
-
getAlgorithm
String getAlgorithm()- 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
boolean verify(byte[] cosignedMessage, byte[] signature) - Parameters:
cosignedMessage- the encoded CosignedMessage bytessignature- the candidate signature- Returns:
- true if the signature is valid for the bound public key and algorithm
-