Electronic funds transfer operations.
See the HSM technical documentation.
Functions | |
String | generateDUKPT (byte[] baKSI, byte[] baDID_CTR, int dwParam) throws TacException |
It generates a DUKPT key within the HSM using a KSI (Key Serial Identification), a DID (Device ID) and a CTR (Transaction Counter) from the same KSN (Key Serial Number). | |
String | generateDUKPTName (byte[] baKSI, byte[] baDID_CTR) throws TacException |
Generates the name of the DUKPT from an entered KSI and CTR. | |
String | generateBDKName (byte[] baKSI) throws TacException |
Generates the BDK name from a KSI (Key Serial Identification). | |
byte[] | translatePINBlock (String srcPEK, String dstPEK, int transBlockType, String PAN, byte[] inPINBlock) throws TacException |
It translates a PIN block, decrypting it with one key and encrypting it with another. | |
byte[] | exportTR31 (String kbpk, String key, int usage, byte mode, byte export) throws TacException |
Exports a key in TR-31 format according to the ASC X9 TR 31-2018 standard. | |
void | importTR31 (String kbpk, String key, int keyAttributes, byte[] keyBlock) throws TacException |
Import a key in TR-31 format according to the ASC X9 TR 31-2018 standard. | |
String generateDUKPT | ( | byte[] | baKSI, |
byte[] | baDID_CTR, | ||
int | dwParam ) throws TacException |
It generates a DUKPT key within the HSM using a KSI (Key Serial Identification), a DID (Device ID) and a CTR (Transaction Counter) from the same KSN (Key Serial Number).
baKSI | Buffer of size TacNDJavaLib.MIN_KSI_LEN containing the KSI (first 05 bytes of the KSN). | ||||||||||||||
baDID_CTR | Buffer of size TacNDJavaLib.MIN_CTR_LEN containing the DID and CTR (last 05 bytes of the KSN). | ||||||||||||||
dwParam | Operating flags according to the table below.
|
TacException |
String generateDUKPTName | ( | byte[] | baKSI, |
byte[] | baDID_CTR ) throws TacException |
Generates the name of the DUKPT from an entered KSI and CTR.
baKSI | Buffer of size TacNDJavaLib.MIN_KSI_LEN containing the KSI (first 05 bytes of the KSN). |
baDID_CTR | Buffer of size TacNDJavaLib.MIN_CTR_LEN containing the DID and CTR (last 05 bytes of the KSN). |
TacException |
String generateBDKName | ( | byte[] | baKSI | ) | throws TacException |
Generates the BDK name from a KSI (Key Serial Identification).
baKSI | Buffer of size TacNDJavaLib.MIN_KSI_LEN containing the KSI (first 05 bytes of the KSN). |
TacException |
byte[] translatePINBlock | ( | String | srcPEK, |
String | dstPEK, | ||
int | transBlockType, | ||
String | PAN, | ||
byte[] | inPINBlock ) throws TacException |
It translates a PIN block, decrypting it with one key and encrypting it with another.
The incoming block format is identified automatically, and the outgoing block format can be defined by the caller, as long as the format change is not from a PAN Unbound to a PAN Bound. PAN Bound formats are those that use PAN information in their composition. It is therefore possible to perform both key translation and format translation. The caller can perform a forced validation of the format by indicating for the outgoing format, the same one they are using in the incoming PIN Block.
srcPEK | Identifier of the decryption key within the HSM. | ||||||||||||
dstPEK | Identifier of the encryption key within the HSM. | ||||||||||||
transBlockType | Output block format identifier. According to the table below.
| ||||||||||||
PAN | PAN (Primary Account Number). | ||||||||||||
inPINBlock | PIN Block input. The buffer must have the size of a PIN Block, TacNDJavaLib.DES_BLOCK (8 bytes) |
TacException |
byte[] exportTR31 | ( | String | kbpk, |
String | key, | ||
int | usage, | ||
byte | mode, | ||
byte | export ) throws TacException |
Exports a key in TR-31 format according to the ASC X9 TR 31-2018 standard.
kbpk | Name of the KBPK key (Key Block Protection Key) used to derive the encryption and authentication keys. | ||||||||||||||||||||||||||
key | Name of the key to be exported from the HSM. | ||||||||||||||||||||||||||
usage | Key usage identifier, as described in ASC X9 TR 31-2018 Section A.5.1 table 6. The following options are accepted. | ||||||||||||||||||||||||||
mode | Key usage mode identifier, as described in ASC X9 TR 31-2018 Section A.5.3 table 8. The following options are accepted.
| ||||||||||||||||||||||||||
export | Key exportability identifier, as described in ASC X9 TR 31-2018 Section A.5.5 table 10. The following options are accepted.
|
TacException |
KBPK algorithm | Export method |
---|---|
3DES | 5.3.2.1 Key Derivation Binding Method - TDEA |
AES | 5.3.2.3 Key Block Binding Method - AES |
void importTR31 | ( | String | kbpk, |
String | key, | ||
int | keyAttributes, | ||
byte[] | keyBlock ) throws TacException |
Import a key in TR-31 format according to the ASC X9 TR 31-2018 standard.
kbpk | Name of the KBPK key (Key Block Protection Key) used to derive the encryption and authentication keys. |
key | Name of the key to be imported into the HSM. |
keyAttributes | Additional key parameters. See the options in the createKey() method. |
keyBlock | key block |
TacException |
KBPK algorithm | Method |
---|---|
3DES | 5.3.2.1 Key Derivation Binding Method - TDEA |
AES | 5.3.2.3 Key Block Binding Method - AES |