Package com.nimbusds.jose.crypto.impl
Class LegacyConcatKDF
- java.lang.Object
-
- com.nimbusds.jose.crypto.impl.LegacyConcatKDF
-
public class LegacyConcatKDF extends Object
Legacy implementation of a Concatenation Key Derivation Function (KDF) for use by the deprecatedA128CBC+HS256andA256CBC+HS512encryption methods. Provides static methods for deriving the Content Encryption Key (CEK) and the Content Integrity Key (CIK) from a Content Master Key (CMKs).See draft-ietf-jose-json-web-encryption-08, appendices A.4 and A.5.
See NIST.800-56A.
- Version:
- 2018-01-04
- Author:
- Vladimir Dzhuvinov
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SecretKeygenerateCEK(SecretKey key, EncryptionMethod enc, byte[] epu, byte[] epv)Generates a Content Encryption Key (CEK) from the specified Content Master Key (CMK) and JOSE encryption method.static SecretKeygenerateCIK(SecretKey key, EncryptionMethod enc, byte[] epu, byte[] epv)Generates a Content Integrity Key (CIK) from the specified Content Master Key (CMK) and JOSE encryption method.
-
-
-
Method Detail
-
generateCEK
public static SecretKey generateCEK(SecretKey key, EncryptionMethod enc, byte[] epu, byte[] epv) throws JOSEException
Generates a Content Encryption Key (CEK) from the specified Content Master Key (CMK) and JOSE encryption method.- Parameters:
key- The Content Master Key (CMK). Must not benull.enc- The JOSE encryption method. Must not benull.epu- The value of the encryption PartyUInfo header parameter,nullif not specified.epv- The value of the encryption PartyVInfo header parameter,nullif not specified.- Returns:
- The generated AES CEK.
- Throws:
JOSEException- If CEK generation failed.
-
generateCIK
public static SecretKey generateCIK(SecretKey key, EncryptionMethod enc, byte[] epu, byte[] epv) throws JOSEException
Generates a Content Integrity Key (CIK) from the specified Content Master Key (CMK) and JOSE encryption method.- Parameters:
key- The Content Master Key (CMK). Must not benull.enc- The JOSE encryption method. Must not benull.epu- The value of the encryption PartyUInfo header parameter,nullif not specified.epv- The value of the encryption PartyVInfo header parameter,nullif not specified.- Returns:
- The generated HMAC SHA CIK.
- Throws:
JOSEException- If CIK generation failed.
-
-