Module org.apache.santuario.xmlsec
Class ConcatKDF
- java.lang.Object
-
- org.apache.xml.security.encryption.keys.content.derivedKey.ConcatKDF
-
- All Implemented Interfaces:
DerivationAlgorithm<ConcatKDFParams>
public class ConcatKDF extends Object implements 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 Constructor Description ConcatKDF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]deriveKey(byte[] sharedSecret, ConcatKDFParams concatKDFParams)Derives a key from the shared secret and other concat kdf parameters.
-
-
-
Method Detail
-
deriveKey
public byte[] deriveKey(byte[] sharedSecret, ConcatKDFParams concatKDFParams) throws XMLSecurityExceptionDerives 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
-
-