All Implemented Interfaces:
AsymmetricJWK<EdECPublicKey,EdECPrivateKey>, JWK, EdECJWK, OKPJWK<EdECPublicKey,EdECPrivateKey>, X509JWK<EdECPublicKey,EdECPrivateKey>

public class GenericEdECJWK extends AbstractOKPJWK<EdECPublicKey,EdECPrivateKey> implements EdECJWK

Generic Edward-Curve JSON Web Key implementation.

It supports the following algorithms:

  • EdDSA with elliptic curve Ed25519 and Ed448.
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

    • GenericEdECJWK

      public GenericEdECJWK(OKPCurve curve, String x)

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

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

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

      Creates a public generic EdEC 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
    • GenericEdECJWK

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

      Creates an untrusted private generic EdEC 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
    • GenericEdECJWK

      public GenericEdECJWK(OKPCurve curve, String x, String d, EdECPrivateKey key, boolean trusted)

      Creates a private generic EdEC 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
    • GenericEdECJWK

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

      Creates a public generic EdEC 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
    • GenericEdECJWK

      public GenericEdECJWK(OKPCurve curve, String x, String d, EdECPrivateKey key, X509Certificate certificate, boolean trusted)

      Creates a private generic EdEC 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