public class LegacyConcatKDF extends Object
A128CBC+HS256
and A256CBC+HS512
encryption 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.
Modifier and Type | Method and Description |
---|---|
static SecretKey |
generateCEK(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 SecretKey |
generateCIK(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.
|
public static SecretKey generateCEK(SecretKey key, EncryptionMethod enc, byte[] epu, byte[] epv) throws JOSEException
key
- The Content Master Key (CMK). Must not be null
.enc
- The JOSE encryption method. Must not be null
.epu
- The value of the encryption PartyUInfo header parameter,
null
if not specified.epv
- The value of the encryption PartyVInfo header parameter,
null
if not specified.JOSEException
- If CEK generation failed.public static SecretKey generateCIK(SecretKey key, EncryptionMethod enc, byte[] epu, byte[] epv) throws JOSEException
key
- The Content Master Key (CMK). Must not be null
.enc
- The JOSE encryption method. Must not be null
.epu
- The value of the encryption PartyUInfo header parameter,
null
if not specified.epv
- The value of the encryption PartyVInfo header parameter,
null
if not specified.JOSEException
- If CIK generation failed.Copyright © 2019 Connect2id Ltd.. All rights reserved.