Thanks for kind response.
Below are my comments & clarifictions in [].
On Jul 5, 2:34 am, Mark Salter <
marksal...@talktalk.net> wrote:
> On 04/07/2010 15:25, Jagn wrote:> We are checking with the JPOS 1.5 for DUKPT decryption, We tried
> > running the example test of SSM, we are not getting the clear PIN.
>
> I suspect the PIN block has not been produced using the key your tests
> are using? The "PIN Block Error" Exceptions are thrown upon finding bad
> data in a c;ear PIN block, so this is why I think the decryption is
> 'failing'. [ Correct ]
>
>
>
> > The input values for test_DUKPT method are:
>
> > EncryptedPIN pin = new EncryptedPIN("1b9c1845eb993a7a",
> > SMAdapter.FORMAT01, "4012345678909");
>
> Which key was used to produce 1b9c1845eb993a7a ? [ I used the test key provided in the keys-test file which is present in the cfg folder of ssm.zip
I am straight away using the clear BDK (bypassing the decryption from
LMK functionality)]
>
> > KeySerialNumber ksn = new KeySerialNumber("987654", "3210",
> > "e00001");
>
> I'm not at all sure what the code above has to do with the following
> Exception?
>
>
>
> > We are getting the below error:
> > org.jpos.security.SMException: PIN Block Error at
> > org.jpos.security.jceadapter.SSM.calculatePIN(SSM.java:808) at
> > org.jpos.security.jceadapter.SSM.translatePINImpl(SSM.java:249) at
> > org.jpos.security.BaseSMAdapter.translatePIN(BaseSMAdapter.java:313)
> > at com.mobibucks.pinblock.SSMTestCase.test_DUKPT(SSMTestCase.java:65)
>
> Can you show this code?
[ Please refer:
http://jpos.org/ee/modules/ssm.zip
Here I am using SSMTestCase.java, and method: test_DUKPT () and
changed the input values what I got from my Pinpad and the
dukptdecrypt.exe tool, here both the results are matching, but when
used the same inputs in the method test_DUKPT , its giving above error
Here is the result for the dukptdecrypt
input:
dukptdecrypt -bdk 0123456789abcdeffedcba9876543210 -ksn
ffff9876543210e00001 -epb 1b9c1845eb993a7a -pan 4012345678909
output:
clear pinblock 041274EDCBA9876F, pin: 1234]
>
> > We are verifying results against the dukptdecrypt.exe tool available
> > in the net.
> > The results are matching for 1-DES DUKPT and not for 3-DES.
> > For 3-DES we are getting the above errors
>
> So is the Encrypted PIN block (1b9c1845eb993a7a) encrypted under single
> or triple DES - and using which test key? [double length (128) BDK used: 0123456789abcdeffedcba9876543210]
>
> --
> Mark