public class Authentication
extends java.lang.Object
LogicalDevice
Modifier and Type | Class and Description |
---|---|
static class |
Authentication.CryptographicAlgorithm
Cryptographic algorithm identify the algorithm for which a derived secret symmetrical key will be used.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getAuthenticationKey() |
org.openmuc.jdlms.internal.AuthenticationMechanism |
getAuthenticationMechanism() |
Authentication.CryptographicAlgorithm |
getCryptographicAlgorithm() |
byte[] |
getGlobalEncryptionKey() |
static Authentication |
newGmacAuthentication(byte[] authenticationKey,
byte[] encryptionKey)
Create a new GMAC Authentication.
|
static Authentication |
newGmacAuthentication(byte[] authenticationKey,
byte[] encryptionKey,
Authentication.CryptographicAlgorithm cryptographicAlgorithm)
Create a new GMAC Authentication using encryption.
|
static Authentication |
newMd5Authentication(byte[] authenticationKey)
Use High Level Security (HLS) 3 that uses MD5.
|
static Authentication |
newMd5Authentication(byte[] authenticationKey,
byte[] globalEncryptionKey,
Authentication.CryptographicAlgorithm cryptographicAlgorithm)
Use High Level Security (HLS) 3 that uses MD5 and using encryption.
|
static Authentication |
newNoneAuthentication()
Creates a Authentication without any restrictions.
|
static Authentication |
newNoneAuthentication(byte[] authenticationKey,
byte[] globalEncryptionKey,
Authentication.CryptographicAlgorithm cryptographicAlgorithm)
Creates a Authentication object without authentication and using encryption.
|
static Authentication |
newPasswordAuthentication(byte[] authenticationKey)
Creates a Low Level Security (LLS) that uses a pre-shared password for authentication.
|
static Authentication |
newPasswordAuthentication(byte[] authenticationKey,
byte[] globalEncryptionKey,
Authentication.CryptographicAlgorithm cryptographicAlgorithm)
Creates a Low Level Security (LLS) that uses a pre-shared password for authentication and using encryption.
|
public static Authentication newPasswordAuthentication(byte[] authenticationKey)
authenticationKey
- the password.public static Authentication newPasswordAuthentication(byte[] authenticationKey, byte[] globalEncryptionKey, Authentication.CryptographicAlgorithm cryptographicAlgorithm)
authenticationKey
- the password.globalEncryptionKey
- the symmetrical encryption key.cryptographicAlgorithm
- the algorithm used to encrypt the DLMS messages.public static Authentication newNoneAuthentication()
public static Authentication newNoneAuthentication(byte[] authenticationKey, byte[] globalEncryptionKey, Authentication.CryptographicAlgorithm cryptographicAlgorithm)
authenticationKey
- authentication key for encryption.globalEncryptionKey
- the symmetrical encryption key.cryptographicAlgorithm
- the algorithm used to encrypt the DLMS messages.public static Authentication newMd5Authentication(byte[] authenticationKey)
authenticationKey
- the passwordpublic static Authentication newMd5Authentication(byte[] authenticationKey, byte[] globalEncryptionKey, Authentication.CryptographicAlgorithm cryptographicAlgorithm)
authenticationKey
- the password.globalEncryptionKey
- the symmetrical encryption key.cryptographicAlgorithm
- the algorithm used to encrypt the DLMS messages.public static Authentication newGmacAuthentication(byte[] authenticationKey, byte[] encryptionKey)
authenticationKey
- the key used to authenticate.encryptionKey
- the symmetrical encryption key.public static Authentication newGmacAuthentication(byte[] authenticationKey, byte[] encryptionKey, Authentication.CryptographicAlgorithm cryptographicAlgorithm)
GMAC, an authentication-only variant of Galois/Counter_Mode for symmetric key cryptographic block ciphers.
authenticationKey
- the key used to authenticate.encryptionKey
- the symmetrical encryption key.cryptographicAlgorithm
- the algorithm used to encrypt the DLMS messages.public Authentication.CryptographicAlgorithm getCryptographicAlgorithm()
public byte[] getAuthenticationKey()
public org.openmuc.jdlms.internal.AuthenticationMechanism getAuthenticationMechanism()
public byte[] getGlobalEncryptionKey()