- All Superinterfaces:
AsymmetricJWK<ECPublicKey,
,ECPrivateKey> JWK
,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 Summary
Modifier and TypeFieldDescriptionstatic final String
Elliptic Curve key type as defined by RFC7518 Section 6.1Fields inherited from interface io.inverno.mod.security.jose.jwk.JWK
DEFAULT_THUMBPRINT_DIGEST, KEY_OP_DECRYPT, KEY_OP_DERIVE_BITS, KEY_OP_DERIVE_KEY, KEY_OP_ENCRYPT, KEY_OP_SIGN, KEY_OP_UNWRAP_KEY, KEY_OP_VERIFY, KEY_OP_WRAP_KEY, USE_ENC, USE_SIG
-
Method Summary
Modifier and TypeMethodDescriptiongetCurve()
Returns the JWA Elliptic curve name.Returns the ECC private key encoded as Base64URL.Returns the X coordinate encoded as Base64URL.Returns the Y coordinate encoded as Base64URL.minify()
Returns a minified representation of the key only containing required data.Returns a public and safe to share representation of the key.trust()
Trusts the key explicitly.Methods inherited from interface io.inverno.mod.security.jose.jwk.AsymmetricJWK
toPrivateKey, toPublicKey
Methods inherited from interface io.inverno.mod.security.jose.jwk.JWK
cipher, cipher, equals, getAlgorithm, getKeyId, getKeyOperations, getKeyType, getPublicKeyUse, hashCode, isTrusted, keyManager, keyManager, signer, signer, supportsAlgorithm, toJWKThumbprint, toJWKThumbprint
Methods inherited from interface io.inverno.mod.security.jose.jwk.X509JWK
getX509Certificate, getX509CertificateChain, getX509CertificateSHA1Thumbprint, getX509CertificateSHA256Thumbprint, getX509CertificateURL
-
Field Details
-
KEY_TYPE
Elliptic Curve key type as defined by RFC7518 Section 6.1- See Also:
-
-
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 interfaceAsymmetricJWK<ECPublicKey,
ECPrivateKey> - Specified by:
toPublicJWK
in interfaceJWK
- Specified by:
toPublicJWK
in interfaceX509JWK<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.
-
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 interfaceAsymmetricJWK<ECPublicKey,
ECPrivateKey> - Specified by:
trust
in interfaceJWK
- Specified by:
trust
in interfaceX509JWK<ECPublicKey,
ECPrivateKey> - Returns:
- this JWK
-