All Implemented Interfaces:
AsymmetricJWK<XECPublicKey,XECPrivateKey>, JWK, OKPJWK<XECPublicKey,XECPrivateKey>, XECJWK, X509JWK<XECPublicKey,XECPrivateKey>

public class GenericXECJWK extends AbstractOKPJWK<XECPublicKey,XECPrivateKey> implements XECJWK

Generic Extended Elliptic Curve JSON Web Key implementation.

It supports the following algorithms:

  • ECDH-ES with extended elliptic curve X25519 or X448
  • ECDH-ES+A128KW with extended elliptic curve X25519 or X448
  • ECDH-ES+A192KW with extended elliptic curve X25519 or X448
  • ECDH-ES+A256KW with extended elliptic curve X25519 or X448
Since:
1.5
Author:
Jeremy Kuhn
  • Field Details

    • SUPPORTED_CURVES

      public static final Set<OKPCurve> SUPPORTED_CURVES
      The set of curves supported by the JWK.
  • Constructor Details

    • GenericXECJWK

      public GenericXECJWK(OKPCurve curve, String x)

      Creates an untrusted public generic XEC JWK with the specified curve and public key value.

      Parameters:
      curve - an elliptic curve
      x - the public key value encoded as Base64URL without padding
    • GenericXECJWK

      public GenericXECJWK(OKPCurve curve, String x, X509Certificate certificate)

      Creates a public generic XEC JWK with the specified curve, public key value and certificate.

      The JWK is considered trusted if the specified certificate, which is assumed to be validated, is not null.

      Parameters:
      curve - an elliptic curve
      x - the public key encoded as Base64URL without padding
      certificate - an X.509 certificate
    • GenericXECJWK

      public GenericXECJWK(OKPCurve curve, String x, String d)

      Creates an untrusted private generic XEC JWK with the specified curve, public key value and private key value.

      Parameters:
      curve - an elliptic curve
      x - the public key value encoded as Base64URL without padding
      d - the private key value encoded as Base64URL without padding
    • GenericXECJWK

      public GenericXECJWK(OKPCurve curve, String x, String d, XECPrivateKey key, boolean trusted)

      Creates a private generic XEC JWK with the specified curve, public key value, private key value and private key.

      Parameters:
      curve - an elliptic curve
      x - the public key value encoded as Base64URL without padding
      d - the private key value encoded as Base64URL without padding
      key - a private key
      trusted - true to create a trusted JWK, false otherwise
    • GenericXECJWK

      public GenericXECJWK(OKPCurve curve, String x, String d, X509Certificate certificate)

      Creates a public generic XEC JWK with the specified curve, public key value, private key value and certificate.

      The JWK is considered trusted if the specified certificate, which is assumed to be validated, is not null.

      Parameters:
      curve - an elliptic curve
      x - the public key value encoded as Base64URL without padding
      d - the private key value encoded as Base64URL without padding
      certificate - an X.509 certificate
    • GenericXECJWK

      public GenericXECJWK(OKPCurve curve, String x, String d, XECPrivateKey key, X509Certificate certificate, boolean trusted)

      Creates a private generic XEC JWK with the specified curve, public coordinates, private key value, OKP private key and certificate.

      Parameters:
      curve - an elliptic curve
      x - the public key value encoded as Base64URL without padding
      d - the private key value encoded as Base64URL without padding
      key - a private key
      certificate - an X.509 certificate
      trusted - true to create a trusted JWK, false otherwise
  • Method Details