Hi, i'm newbie on HSM field, i don't know about this until i get this project.
i will write app on java language that act like ATM.
after reading on this board, i think i need this step :
for the first time, i need to create pin block, it's constructed by pin XOR PAN ( both in ISO 9564 format 0)
then encrypted in DES/ECB/NoPadding with TAK as key.
but, DES encryption give more than 16 Hexchar as result.
i look at DES.vb (byteDESEncrypt()) @this link , and found this code :
csMyCryptoStream = New CryptoStream(outStream, desProvider.CreateEncryptor(bKey, bNullVector), CryptoStreamMode.Write)
csMyCryptoStream.Write(bData, 0, 8)
in my mind,
result from encryption is more than 16 hexcar but it grab from first byte until 8th byte,
so converted to Hex is 16 hexcar as result.
is it right ?
please advice if i'm in wrong direction.
note : i use thales sim V0.9.6
i will write app on java language that act like ATM.
after reading on this board, i think i need this step :
for the first time, i need to create pin block, it's constructed by pin XOR PAN ( both in ISO 9564 format 0)
then encrypted in DES/ECB/NoPadding with TAK as key.
but, DES encryption give more than 16 Hexchar as result.
i look at DES.vb (byteDESEncrypt()) @this link , and found this code :
csMyCryptoStream = New CryptoStream(outStream, desProvider.CreateEncryptor(bKey, bNullVector), CryptoStreamMode.Write)
csMyCryptoStream.Write(bData, 0, 8)
in my mind,
result from encryption is more than 16 hexcar but it grab from first byte until 8th byte,
so converted to Hex is 16 hexcar as result.
is it right ?
please advice if i'm in wrong direction.
note : i use thales sim V0.9.6