Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get the last 32 bits in ANSI X9.19 MAC generation ( very urgent )

843811Jun 22 2007 — edited Jun 25 2007
I am trying to generate the MAC of 256bits of data according to ANSI X9.19 standard.

I am trying to do this in the following way

1) Encrypt the whole 256 bits using DES in CBC mode ( blocksize=64bits and hence 4 blocks)

2) Taking the last 8 bytes (i.e., last 64bits) I am decrypting it with DES in ECB mode using another key

3)Taking the ciphertext from above step, i am encrypting the ciphertext using DES ECB mode with key used in step1

Is the above steps are correct according to ANSI X9.19 MAC standard.

If so how to generate the final 32 bits from the 64 bits of the final block according to the X9.19 standard.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2007
Added on Jun 22 2007
5 comments
792 views