Module jcifs

Class Smb3KeyDerivation

java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.Smb3KeyDerivation

public final class Smb3KeyDerivation extends Object
SMB3 SP800-108 Counter Mode Key Derivation
Author:
mbechler
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    deriveDecryptionKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
    Derives the SMB3 decryption key from the session key using the appropriate KDF for the dialect.
    static byte[]
    deriveEncryptionKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
    Derives the SMB3 encryption key from the session key using the appropriate KDF for the dialect.
    static byte[]
    deriveSigningKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
    Derives the SMB3 signing key from the session key using the appropriate KDF for the dialect.
    static byte[]
    dervieApplicationKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
    Derives the SMB3 application key from the session key using the appropriate KDF for the dialect.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • deriveSigningKey

      public static byte[] deriveSigningKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
      Derives the SMB3 signing key from the session key using the appropriate KDF for the dialect.
      Parameters:
      dialect - the SMB dialect version
      sessionKey - the base session key
      preauthIntegrity - the pre-authentication integrity hash (for SMB 3.1.1) or null
      Returns:
      derived signing key
    • dervieApplicationKey

      public static byte[] dervieApplicationKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
      Derives the SMB3 application key from the session key using the appropriate KDF for the dialect.
      Parameters:
      dialect - the SMB dialect version
      sessionKey - the base session key
      preauthIntegrity - the pre-authentication integrity hash (for SMB 3.1.1) or null
      Returns:
      derived application key
    • deriveEncryptionKey

      public static byte[] deriveEncryptionKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
      Derives the SMB3 encryption key from the session key using the appropriate KDF for the dialect.
      Parameters:
      dialect - the SMB dialect version
      sessionKey - the base session key
      preauthIntegrity - the pre-authentication integrity hash (for SMB 3.1.1) or null
      Returns:
      derived encryption key
    • deriveDecryptionKey

      public static byte[] deriveDecryptionKey(int dialect, byte[] sessionKey, byte[] preauthIntegrity)
      Derives the SMB3 decryption key from the session key using the appropriate KDF for the dialect.
      Parameters:
      dialect - the SMB dialect version
      sessionKey - the base session key
      preauthIntegrity - the pre-authentication integrity hash (for SMB 3.1.1) or null
      Returns:
      derived decryption key