Class CBORAsymKeyValidator

java.lang.Object
org.webpki.cbor.CBORValidator
org.webpki.cbor.CBORAsymKeyValidator

public class CBORAsymKeyValidator extends CBORValidator
Class for CBOR asymmetric key signature validation.

Also see CBORValidator.

  • Constructor Details

    • CBORAsymKeyValidator

      public CBORAsymKeyValidator(PublicKey publicKey)
      Initializes a validator with a public key.

      This constructor presumes that the validation key is given by the context and that the supplied algorithm meets the policy.

      Parameters:
      publicKey - The anticipated public key
      See Also:
    • CBORAsymKeyValidator

      public CBORAsymKeyValidator(CBORAsymKeyValidator.KeyLocator keyLocator)
      Initializes a validator with a key locator.

      This constructor provides full control for the verifier regarding in-lined public keys and key identifiers.

      If no public key is found in the signature object, the CBORAsymKeyValidator.KeyLocator will be called BEFORE signature validation with a null public key argument. This permits applications to retrieve a suitable key for validation. This is usually done by requiring a key identifier.

      If on the other a public is found in the signature object, it will be used for signature validation. AFTER successful signature validation, the CBORAsymKeyValidator.KeyLocator will be called with the public key argument holding the public key of the signature object. This permits applications to first validate the signature and then lookup the key which may simplify database design.

      Parameters:
      keyLocator - KeyLocator implementation