java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.Smb3KeyDerivation
SMB3 SP800-108 Counter Mode Key Derivation
- Author:
- mbechler
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 versionsessionKey- the base session keypreauthIntegrity- 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 versionsessionKey- the base session keypreauthIntegrity- 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 versionsessionKey- the base session keypreauthIntegrity- 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 versionsessionKey- the base session keypreauthIntegrity- the pre-authentication integrity hash (for SMB 3.1.1) or null- Returns:
- derived decryption key
-