public final class KeyDerivationFunction
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
KeyDerivationFunction.KDF_AES |
Modifier and Type | Field and Description |
---|---|
(package private) static int |
AES_128 |
(package private) static int |
AES_192 |
(package private) static int |
AES_256 |
Constructor and Description |
---|
KeyDerivationFunction() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
getDerivation(KeyDerivationFunction.KDF_AES kdf,
byte[] K,
byte[] r,
int c)
Constructor for Key Derivation Function (KDF) siehe BSI TR-03110 Kapitel A.2.3
|
static byte[] |
getDerivation(KeyDerivationFunction.KDF_AES kdf,
byte[] K,
int c)
Constructor for Key Derivation Function (KDF) siehe BSI TR-03110 Kapitel A.2.3
|
static byte[] |
getMRZBytes(java.lang.String documentNr,
java.lang.String dateOfBirth,
java.lang.String dateOfExpiry)
Das MRZ-Passwort besteht aus dem SHA1-Wert der Dokumentennummer +
Geburtsdatum + Gültigkeitsdatum (jeweils mit Prüfziffer)
|
static final int AES_128
static final int AES_192
static final int AES_256
public static byte[] getMRZBytes(java.lang.String documentNr, java.lang.String dateOfBirth, java.lang.String dateOfExpiry)
documentNr
- Dokumentennummer plus PrüfzifferdateOfBirth
- Geburtsdatum aus der MRZ plus PrüfzifferdateOfExpiry
- Gültigkeitsdatum aus der MRZ plus Prüfzifferpublic static byte[] getDerivation(KeyDerivationFunction.KDF_AES kdf, byte[] K, int c) throws java.lang.IllegalArgumentException, java.io.IOException
K
- The shared secret Value (z.B. PIN, CAN, PUK als Byte Array oder abgeleitete
MRZ siehe BSI TR-03110 Tabelle A.4)c
- A 32-bit, big-endian integer counter. 1 for
en-/decoding, 2 for MAC (checksum),
3 for deriving encryption keys from a passwordjava.lang.Exception
- c must be 1, 2 or 3java.lang.IllegalArgumentException
java.io.IOException
public static byte[] getDerivation(KeyDerivationFunction.KDF_AES kdf, byte[] K, byte[] r, int c) throws java.lang.IllegalArgumentException, java.io.IOException
K
- The shared secret Value (z.B. PIN, CAN, PUK oder abgeleitete
MRZ siehe BSI TR-03110 Tabelle A.4)r
- a nonce rc
- A 32-bit, big-endian integer counter. 1 for
en-/decoding, 2 for MAC (checksum),
3 for deriving encryption keys from a passwordjava.lang.Exception
- c must be 1, 2 or 3java.lang.IllegalArgumentException
java.io.IOException