MagTek MagneSafe V5 User Manual

Page 127

Advertising
background image

Appendix D. Command Examples

119

Note that all other fields are represented as Hexadecimal data, that is,
two ASCII characters together give the value of a single byte.

The data is coherent structurally, let's work on decryption.

First, we note the KSN = FFFF9876543210E00008, counter is 8.
For the standard ANSI key example, counter 8 gets us the following
Encryption Key: 27F66D5244FF621E AA6F6120EDEB427F

There are five encrypted fields:

1.

Track 1 encrypted data

2.

Track 2 encrypted data

3.

Track 3 encrypted data

4.

Encrypted MagnePrint data

5.

Encrypted Session ID


We will show the decryption of each of these fields in detail. For convenience each
will be grouped as blocks of eight bytes.

Track 1 encrypted data
Block # 1 C25C1D1197D31CAA
2 87285D59A8920474
3 26D9182EC11353C0
4 51ADD6D0F072A6CB
5 3436560B3071FC1F
6 D11D9F7E74886742
7 D9BEE0CFD1EA1064
8 C213BB55278B2F12

Appendix C tells us to decrypt the last block:
C213BB55278B2F12 TDES Dec with 27F66D5244FF621E AA6F6120EDEB427F
gets E98ED0F0D1EA1064
XOR D9BEE0CFD1EA1064
gets 3030303F00000000 (decrypted last block)

Continue on in reverse block order:
D9BEE0CFD1EA1064 TDES Dec with 27F66D5244FF621E AA6F6120EDEB427F
gets E12DA84C41B85772
XOR D11D9F7E74886742
gets 3030373235303030 (decrypted block 7)

Continue on in reverse block order:
D11D9F7E74886742 TDES Dec with 27F66D5244FF621E AA6F6120EDEB427F
gets 0704673B0041CC2F
XOR 3436560B3071FC1F
gets 3332313030303030 (decrypted block 6)

Continue on in reverse block order:
3436560B3071FC1F TDES Dec with 27F66D5244FF621E AA6F6120EDEB427F
gets 718DF68EC04A96FF
XOR 51ADD6D0F072A6CB
gets 2020205E30383034 (decrypted block 5)

Continue on in reverse block order:
51ADD6D0F072A6CB TDES Dec with 27F66D5244FF621E AA6F6120EDEB427F
gets 0989597B8D3373E0
XOR 26D9182EC11353C0
gets 2F5041554C202020 (decrypted block 4)

Continue on in reverse block order:

Advertising