All Superinterfaces:
AsymmetricJWK<ECPublicKey,ECPrivateKey>, JWK, X509JWK<ECPublicKey,ECPrivateKey>

public interface ECJWK extends X509JWK<ECPublicKey,ECPrivateKey>

Elliptic curve JSON Web key.

An Elliptic curve JWK is asymmetric. The public key is composed of the elliptic curve and the X and Y coordinates. The private key is defined by the ECC private key.

Since:
1.5
Author:
Jeremy Kuhn
  • Field Details

  • Method Details

    • getCurve

      String getCurve()

      Returns the JWA Elliptic curve name.

      Returns:
      the Elliptic curve name
    • getXCoordinate

      String getXCoordinate()

      Returns the X coordinate encoded as Base64URL.

      Returns:
      the Base64URL encoded X coordinate with no padding.
    • getYCoordinate

      String getYCoordinate()

      Returns the Y coordinate encoded as Base64URL.

      Returns:
      the Base64URL encoded Y coordinate with no padding.
    • getEccPrivateKey

      String getEccPrivateKey()

      Returns the ECC private key encoded as Base64URL.

      Returns:
      the Base64URL encoded ECC private key with no padding.
    • toPublicJWK

      ECJWK toPublicJWK()
      Description copied from interface: JWK

      Returns a public and safe to share representation of the key.

      Specified by:
      toPublicJWK in interface AsymmetricJWK<ECPublicKey,ECPrivateKey>
      Specified by:
      toPublicJWK in interface JWK
      Specified by:
      toPublicJWK in interface X509JWK<ECPublicKey,ECPrivateKey>
      Returns:
      a public representation of this JWK
    • minify

      ECJWK minify()
      Description copied from interface: JWK

      Returns a minified representation of the key only containing required data.

      Note that the returned JWK may contain private data.

      Specified by:
      minify in interface JWK
      Returns:
      a minified representation of this JWK
    • trust

      ECJWK trust()
      Description copied from interface: JWK

      Trusts the key explicitly.

      This should be used with care when the authenticity of an untrusted key has been established through external means.

      Specified by:
      trust in interface AsymmetricJWK<ECPublicKey,ECPrivateKey>
      Specified by:
      trust in interface JWK
      Specified by:
      trust in interface X509JWK<ECPublicKey,ECPrivateKey>
      Returns:
      this JWK