Package com.nimbusds.jose.crypto.impl
Class MultiCryptoProvider
java.lang.Object
com.nimbusds.jose.crypto.impl.BaseJWEProvider
com.nimbusds.jose.crypto.impl.MultiCryptoProvider
- All Implemented Interfaces:
JCAAware<JWEJCAContext>,JOSEProvider,JWEProvider
- Direct Known Subclasses:
MultiDecrypter,MultiEncrypter
The base abstract class for multi-recipient encrypters and decrypters of
JWE objects with a shared symmetric
key.
Supports the following key management algorithms:
JWEAlgorithm.A128KWJWEAlgorithm.A192KWJWEAlgorithm.A256KWJWEAlgorithm.A128GCMKWJWEAlgorithm.A192GCMKWJWEAlgorithm.A256GCMKWJWEAlgorithm.DIRJWEAlgorithm.ECDH_ESJWEAlgorithm.ECDH_ES_A128KWJWEAlgorithm.ECDH_ES_A192KWJWEAlgorithm.ECDH_ES_A256KWJWEAlgorithm.RSA_OAEP_256JWEAlgorithm.RSA_OAEP_384JWEAlgorithm.RSA_OAEP_512JWEAlgorithm.RSA_OAEP(deprecated)JWEAlgorithm.RSA1_5(deprecated)
Supports the following elliptic curves:
Curve.P_256Curve.P_384Curve.P_521Curve.X25519(Curve25519)
Supports the following content encryption algorithms:
- Version:
- 2023-03-24
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<Integer,Set<JWEAlgorithm>> The JWE algorithms compatible with each key size in bits.static final Set<JWEAlgorithm>The supported JWE algorithms by the direct crypto provider class.The supported EC JWK curves by the ECDH crypto provider class.static final Set<EncryptionMethod>The supported encryption methods by the direct crypto provider class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new multi-recipient encryption / decryption provider. -
Method Summary
Modifier and TypeMethodDescriptionReturns the names of the supported elliptic curves.Methods inherited from class com.nimbusds.jose.crypto.impl.BaseJWEProvider
getCEK, getJCAContext, isCEKProvided, supportedEncryptionMethods, supportedJWEAlgorithms
-
Field Details
-
SUPPORTED_ALGORITHMS
The supported JWE algorithms by the direct crypto provider class. -
SUPPORTED_ENCRYPTION_METHODS
The supported encryption methods by the direct crypto provider class. -
COMPATIBLE_ALGORITHMS
The JWE algorithms compatible with each key size in bits. -
SUPPORTED_ELLIPTIC_CURVES
The supported EC JWK curves by the ECDH crypto provider class.
-
-
Constructor Details
-
MultiCryptoProvider
Creates a new multi-recipient encryption / decryption provider.- Parameters:
cek- The Content Encryption Key (CEK). Must be 128 bits (16 bytes), 192 bits (24 bytes), 256 bits (32 bytes), 384 bits (48 bytes) or 512 bits (64 bytes) long. Must not benull.- Throws:
KeyLengthException- If the CEK length is not compatible.
-
-
Method Details
-
supportedEllipticCurves
Returns the names of the supported elliptic curves. These correspond to thecrvEC JWK parameter.- Returns:
- The supported elliptic curves.
-