Module org.apache.santuario.xmlsec
Class ConcatKDF
java.lang.Object
org.apache.xml.security.encryption.keys.content.derivedKey.ConcatKDF
- All Implemented Interfaces:
DerivationAlgorithm<ConcatKDFParams>
Key DerivationAlgorithm implementation, defined in Section 5.8.1 of NIST SP 800-56A [SP800-56A], and is equivalent
to the KDF3 function defined in ANSI X9.44-2007 [ANSI-X9-44-2007] when the contents of the OtherInfo parameter
is structured as in NIST SP 800-56A.
Identifier of the key derivation algorithm: http://www.w3.org/2009/xmlenc11#ConcatKDF
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]deriveKey(byte[] sharedSecret, ConcatKDFParams concatKDFParams) Derives a key from the shared secret and other concat kdf parameters.
-
Constructor Details
-
ConcatKDF
public ConcatKDF()
-
-
Method Details
-
deriveKey
public byte[] deriveKey(byte[] sharedSecret, ConcatKDFParams concatKDFParams) throws XMLSecurityException Derives a key from the shared secret and other concat kdf parameters.- Specified by:
deriveKeyin interfaceDerivationAlgorithm<ConcatKDFParams>- Parameters:
sharedSecret- The "shared" secret used for the key derivation (e.g. the secret key)concatKDFParams- The concat key derivation parameters- Returns:
- the derived key bytes
- Throws:
IllegalArgumentException- if the concat KDF parameters are not setXMLSecurityException- if the key derivation parameters are invalid
-