E.4 MAC using a 64 bit-length block cipher


E.4 MAC using a 64 bit-length block cipher

This appendix presents the computation of an s -byte MAC, with 4 s 8, according to ISO 9797 [7], using a 64 bit-length block cipher E , which can be DES. The following steps describe the computation of the MAC [2]:

  1. Pad the message M on which the MAC is computed according to method 2 of the ISO 9797. To this end add the mandatory byte 80h in the rightmost position of M . Then add the smallest number of bytes 00h, which makes the length of the padded message M ² = M ˜80 ˜00 ˜00 a multiple of 8 bytes. The message M ² is then divided in t blocks P i , i = 1, , t .

  2. The MAC session key K S consists of only a leftmost key of 8 bytes K S = K SL , or of the concatenation of a leftmost key K SL and a rightmost key K SR , such that K S = K SL K SR , which is 16 bytes in total.

  3. Use the 64 bit-length block cipher DES with the key K SL in the CBC mode on the blocks P i , i = 1, , t to obtain H i /I>, i = 1, , t as H i = DES( K SL )[ P i XOR H i ˆ’ 1 ], i = 1, , t . The initial vector IV is equal to H = ˜00 ˜00 ˜00 ˜00 ˜00 ˜00 ˜00 ˜00 .

  4. Compute an 8-byte final block H t +1 either according to the main process of ISO/IEC 9797 (i.e., H t + 1 = H t ), or according to the Optional Process 1 of ISO/IEC 9797 (i.e., H t + 1 = DES( K SL )[DES ˆ’ 1 ( K SR )[ H t ]]).

  5. The MAC is then computed as the most significant s bytes of H t +1 .




Implementing Electronic Card Payment Systems
Implementing Electronic Card Payment Systems (Artech House Computer Security Series)
ISBN: 1580533051
EAN: 2147483647
Year: 2003
Pages: 131
Authors: Cristian Radu

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net