Package org.bouncycastle.cert.plants
Interface MTCSignatureVerifier
-
- All Known Implementing Classes:
BcMTCSignatureVerifier,JcaMTCSignatureVerifier
public interface MTCSignatureVerifierOperator 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) andorg.bouncycastle.cert.plants.jcajce.JcaMTCSignatureVerifier(JCA).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAlgorithm()booleanverify(byte[] cosignedMessage, byte[] signature)
-
-
-
Method Detail
-
getAlgorithm
java.lang.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
-
-