Class JcaMTCCosignerVerifierProvider

java.lang.Object
org.bouncycastle.cert.plants.jcajce.JcaMTCCosignerVerifierProvider
All Implemented Interfaces:
MTCCosignerVerifierProvider

public class JcaMTCCosignerVerifierProvider extends Object implements MTCCosignerVerifierProvider
JCA-side MTCCosignerVerifierProvider that holds a table of cosigner trust anchor IDs mapped to MTCSignatureVerifier instances.

The convenience JcaMTCCosignerVerifierProvider.Builder.addCosigner(byte[], PublicKey) overload wraps a JCA PublicKey in a JcaMTCSignatureVerifier, auto-detecting the draft algorithm identifier from the key type:

  • ECPublicKey with a 256-bit field → ECDSA-P256-SHA256
  • ECPublicKey with a 384-bit field → ECDSA-P384-SHA384
  • getAlgorithm() equal to "Ed25519" or "EdDSA"Ed25519
  • getAlgorithm() equal to "ML-DSA-44" / "ML-DSA-65" / "ML-DSA-87" → same string

Callers needing a different algorithm string for the same key type, or a verifier from another module (e.g. a lightweight BcMTCSignatureVerifier), can use JcaMTCCosignerVerifierProvider.Builder.addCosigner(byte[], MTCSignatureVerifier) directly.

  • Method Details

    • get

      public MTCCosignerVerifier get(byte[] cosignerId)
      Specified by:
      get in interface MTCCosignerVerifierProvider
      Parameters:
      cosignerId - the binary trust anchor ID of the cosigner
      Returns:
      a verifier for the cosigner, or null if the cosigner is unknown