Class ConcatKeyDerivationFunction

java.lang.Object
org.jose4j.jwe.kdf.ConcatKeyDerivationFunction
All Implemented Interfaces:
ConcatenationKeyDerivationFunctionWithSha256

public class ConcatKeyDerivationFunction extends Object implements ConcatenationKeyDerivationFunctionWithSha256
An implementation of Concatenation Key Derivation Function (aka Concat KDF or ConcatKDF) from Section 5.8.1 of National Institute of Standards and Technology (NIST), "Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography", NIST Special Publication 800-56A, Revision 2, May 2013.
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • digestLength

      private int digestLength
    • messageDigest

      private MessageDigest messageDigest
  • Constructor Details

    • ConcatKeyDerivationFunction

      public ConcatKeyDerivationFunction(String hashAlgoritm)
    • ConcatKeyDerivationFunction

      public ConcatKeyDerivationFunction(String hashAlgoritm, String provider)
  • Method Details

    • init

      private void init()
    • kdf

      public byte[] kdf(byte[] sharedSecret, int keydatalen, byte[] algorithmId, byte[] partyUInfo, byte[] partyVInfo, byte[] suppPubInfo, byte[] suppPrivInfo)
    • kdf

      public byte[] kdf(byte[] sharedSecret, int keydatalen, byte[] otherInfo)
      Specified by:
      kdf in interface ConcatenationKeyDerivationFunctionWithSha256
    • getReps

      long getReps(int keydatalen)
    • traceLog

      private boolean traceLog()