public static final class Jwts.KEY extends Object
public static final) constant for direct type-safe reference in application code. For example:
Jwts.builder()
// ... etc ...
.encryptWith(aKey, Jwts.KEY.ECDH_ES_A256KW, Jwts.ENC.A256GCM)
.build();
They are also available together as a Registry instance via the get() method.
get()| Modifier and Type | Field and Description |
|---|---|
static SecretKeyAlgorithm |
A128GCMKW
Key wrap algorithm with AES GCM using a 128-bit key, as defined by
RFC 7518 (JWA), Section 4.7.
|
static SecretKeyAlgorithm |
A128KW
AES Key Wrap algorithm with default initial value using a 128-bit key, as defined by
RFC 7518 (JWA), Section 4.4.
|
static SecretKeyAlgorithm |
A192GCMKW
Key wrap algorithm with AES GCM using a 192-bit key, as defined by
RFC 7518 (JWA), Section 4.7.
|
static SecretKeyAlgorithm |
A192KW
AES Key Wrap algorithm with default initial value using a 192-bit key, as defined by
RFC 7518 (JWA), Section 4.4.
|
static SecretKeyAlgorithm |
A256GCMKW
Key wrap algorithm with AES GCM using a 256-bit key, as defined by
RFC 7518 (JWA), Section 4.7.
|
static SecretKeyAlgorithm |
A256KW
AES Key Wrap algorithm with default initial value using a 256-bit key, as defined by
RFC 7518 (JWA), Section 4.4.
|
static KeyAlgorithm<SecretKey,SecretKey> |
DIRECT
Key algorithm reflecting direct use of a shared symmetric key as the JWE AEAD encryption key, as defined
by RFC 7518 (JWA), Section 4.5.
|
static KeyAlgorithm<PublicKey,PrivateKey> |
ECDH_ES
Key Agreement with
ECDH-ES using Concat KDF as defined by
RFC 7518 (JWA), Section 4.6. |
static KeyAlgorithm<PublicKey,PrivateKey> |
ECDH_ES_A128KW
Key Agreement with Key Wrapping via
ECDH-ES using Concat KDF and CEK wrapped with "A128KW" as defined by
RFC 7518 (JWA), Section 4.6. |
static KeyAlgorithm<PublicKey,PrivateKey> |
ECDH_ES_A192KW
Key Agreement with Key Wrapping via
ECDH-ES using Concat KDF and CEK wrapped with "A192KW" as defined by
RFC 7518 (JWA), Section 4.6. |
static KeyAlgorithm<PublicKey,PrivateKey> |
ECDH_ES_A256KW
Key Agreement with Key Wrapping via
ECDH-ES using Concat KDF and CEK wrapped with "A256KW" as defined by
RFC 7518 (JWA), Section 4.6. |
static KeyAlgorithm<Password,Password> |
PBES2_HS256_A128KW
Key encryption algorithm using
PBES2 with HMAC SHA-256 and "A128KW" wrapping
as defined by
RFC 7518 (JWA), Section 4.8. |
static KeyAlgorithm<Password,Password> |
PBES2_HS384_A192KW
Key encryption algorithm using
PBES2 with HMAC SHA-384 and "A192KW" wrapping
as defined by
RFC 7518 (JWA), Section 4.8. |
static KeyAlgorithm<Password,Password> |
PBES2_HS512_A256KW
Key encryption algorithm using
PBES2 with HMAC SHA-512 and "A256KW" wrapping
as defined by
RFC 7518 (JWA), Section 4.8. |
static KeyAlgorithm<PublicKey,PrivateKey> |
RSA_OAEP
Key Encryption with
RSAES OAEP using default parameters, as defined by
RFC 7518 (JWA), Section 4.3. |
static KeyAlgorithm<PublicKey,PrivateKey> |
RSA_OAEP_256
Key Encryption with
RSAES OAEP using SHA-256 and MGF1 with SHA-256, as defined by
RFC 7518 (JWA), Section 4.3. |
static KeyAlgorithm<PublicKey,PrivateKey> |
RSA1_5
Key Encryption with
RSAES-PKCS1-v1_5, as defined by
RFC 7518 (JWA), Section 4.2. |
| Modifier and Type | Method and Description |
|---|---|
static Registry<String,KeyAlgorithm<?,?>> |
get()
Returns all standard JWA standard Cryptographic
Algorithms for Key Management..
|
public static final KeyAlgorithm<SecretKey,SecretKey> DIRECT
public static final SecretKeyAlgorithm A128KW
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with a 128-bit shared symmetric key using the
AES Key Wrap algorithm, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final SecretKeyAlgorithm A192KW
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with a 192-bit shared symmetric key using the
AES Key Wrap algorithm, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final SecretKeyAlgorithm A256KW
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with a 256-bit shared symmetric key using the
AES Key Wrap algorithm, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final SecretKeyAlgorithm A128GCMKW
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with a 128-bit shared symmetric key using the
AES GCM Key Wrap algorithm with the generated Initialization Vector, producing encrypted key ciphertext
and GCM authentication tag.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final SecretKeyAlgorithm A192GCMKW
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with a 192-bit shared symmetric key using the
AES GCM Key Wrap algorithm with the generated Initialization Vector, producing encrypted key ciphertext
and GCM authentication tag.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final SecretKeyAlgorithm A256GCMKW
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with a 256-bit shared symmetric key using the
AES GCM Key Wrap algorithm with the generated Initialization Vector, producing encrypted key ciphertext
and GCM authentication tag.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<Password,Password> PBES2_HS256_A128KW
PBES2 with HMAC SHA-256 and "A128KW" wrapping
as defined by
RFC 7518 (JWA), Section 4.8.
During JWE creation, this algorithm:
pbes2Count value. If that value is not set, a suitable number of
iterations will be chosen based on
OWASP
PBKDF2 recommendations and then that value is set as the JWE header pbes2Count value.pbes2Salt value.SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the A128KW key wrap
algorithm using the 128-bit derived password-based Key Encryption Key from step #3,
producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated
AeadAlgorithm.For JWE decryption, this algorithm:
A128KW key unwrap
algorithm using the 128-bit derived password-based Key Encryption Key from step #3,
producing the decryption key plaintext.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<Password,Password> PBES2_HS384_A192KW
PBES2 with HMAC SHA-384 and "A192KW" wrapping
as defined by
RFC 7518 (JWA), Section 4.8.
During JWE creation, this algorithm:
pbes2Count value. If that value is not set, a suitable number of
iterations will be chosen based on
OWASP
PBKDF2 recommendations and then that value is set as the JWE header pbes2Count value.pbes2Salt value.SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the A192KW key wrap
algorithm using the 192-bit derived password-based Key Encryption Key from step #3,
producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated
AeadAlgorithm.For JWE decryption, this algorithm:
A192KW key unwrap
algorithm using the 192-bit derived password-based Key Encryption Key from step #3,
producing the decryption key plaintext.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<Password,Password> PBES2_HS512_A256KW
PBES2 with HMAC SHA-512 and "A256KW" wrapping
as defined by
RFC 7518 (JWA), Section 4.8.
During JWE creation, this algorithm:
pbes2Count value. If that value is not set, a suitable number of
iterations will be chosen based on
OWASP
PBKDF2 recommendations and then that value is set as the JWE header pbes2Count value.pbes2Salt value.SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the A256KW key wrap
algorithm using the 256-bit derived password-based Key Encryption Key from step #3,
producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated
AeadAlgorithm.For JWE decryption, this algorithm:
A256KW key unwrap
algorithm using the 256-bit derived password-based Key Encryption Key from step #3,
producing the decryption key plaintext.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<PublicKey,PrivateKey> RSA1_5
RSAES-PKCS1-v1_5, as defined by
RFC 7518 (JWA), Section 4.2.
This algorithm requires a key size of 2048 bits or larger.
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the RSA key wrap algorithm, using the JWE
recipient's RSA Public Key, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm. public static final KeyAlgorithm<PublicKey,PrivateKey> RSA_OAEP
RSAES OAEP using default parameters, as defined by
RFC 7518 (JWA), Section 4.3.
This algorithm requires a key size of 2048 bits or larger.
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the RSA OAEP with SHA-1 and MGF1 key wrap algorithm,
using the JWE recipient's RSA Public Key, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm. public static final KeyAlgorithm<PublicKey,PrivateKey> RSA_OAEP_256
RSAES OAEP using SHA-256 and MGF1 with SHA-256, as defined by
RFC 7518 (JWA), Section 4.3.
This algorithm requires a key size of 2048 bits or larger.
During JWE creation, this algorithm:
SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the RSA OAEP with SHA-256 and MGF1 key wrap
algorithm, using the JWE recipient's RSA Public Key, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm. public static final KeyAlgorithm<PublicKey,PrivateKey> ECDH_ES
ECDH-ES using Concat KDF as defined by
RFC 7518 (JWA), Section 4.6.
During JWE creation, this algorithm:
SecretKey with the Concat KDF algorithm using the
generated shared secret and any available
PartyUInfo and
PartyVInfo.SecretKey for JJWT to use to encrypt the entire JWE with the
associated AeadAlgorithm. Encrypted key ciphertext is not produced with this algorithm, so
the resulting JWE will not contain any embedded key ciphertext.For JWE decryption, this algorithm:
SecretKey with the Concat KDF algorithm using the
obtained shared secret and any available
PartyUInfo and
PartyVInfo.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<PublicKey,PrivateKey> ECDH_ES_A128KW
ECDH-ES using Concat KDF and CEK wrapped with "A128KW" as defined by
RFC 7518 (JWA), Section 4.6.
During JWE creation, this algorithm:
SecretKey with the Concat KDF algorithm using the
generated shared secret and any available
PartyUInfo and
PartyVInfo.SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the A128KW key wrap
algorithm using the derived symmetric Key Encryption Key from step #3, producing encrypted key ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey with the Concat KDF algorithm using the
obtained shared secret and any available
PartyUInfo and
PartyVInfo.#4, producing the decryption key plaintext.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<PublicKey,PrivateKey> ECDH_ES_A192KW
ECDH-ES using Concat KDF and CEK wrapped with "A192KW" as defined by
RFC 7518 (JWA), Section 4.6.
During JWE creation, this algorithm:
SecretKey with the Concat KDF algorithm using the
generated shared secret and any available
PartyUInfo and
PartyVInfo.SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the A192KW key wrap
algorithm using the derived symmetric Key Encryption Key from step #3, producing encrypted key
ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey with the Concat KDF algorithm using the
obtained shared secret and any available
PartyUInfo and
PartyVInfo.#4, producing the decryption key plaintext.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static final KeyAlgorithm<PublicKey,PrivateKey> ECDH_ES_A256KW
ECDH-ES using Concat KDF and CEK wrapped with "A256KW" as defined by
RFC 7518 (JWA), Section 4.6.
During JWE creation, this algorithm:
SecretKey with the Concat KDF algorithm using the
generated shared secret and any available
PartyUInfo and
PartyVInfo.SecretKey suitable for use with a
specified AeadAlgorithm (using KeyBuilderSupplier.key()).SecretKey with the A256KW key wrap
algorithm using the derived symmetric Key Encryption Key from step #3, producing encrypted key
ciphertext.SecretKey for JJWT to use to encrypt the entire JWE with associated AeadAlgorithm.For JWE decryption, this algorithm:
SecretKey with the Concat KDF algorithm using the
obtained shared secret and any available
PartyUInfo and
PartyVInfo.#4, producing the decryption key plaintext.SecretKey for JJWT to use to decrypt the entire
JWE using the JWE's identified "enc" AeadAlgorithm.public static Registry<String,KeyAlgorithm<?,?>> get()
Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.