MagTek Bluetooth MagneSafe V5 Swipe Reader User Manual

Page 79

Advertising
background image

Appendix D. Command Examples

71

; BE5C9835177E452A TDES Dec with FD0329B2DA3AA6EA B7979DF75D9B5DF5 =
7549AB6EB4840003
;
; Note that the final two bytes of the result = 0003, matching the KSN as
; transmitted in the clear. This provides Authentication to the host that
; the reader is what it claims to be (proves key knowledge).
;
; Decrypt Challenge 2 using Current Encryption Key variant as above
; A72D2DB236BF29D2 TDES Dec with FD0329B2DA3AA6EA B7979DF75D9B5DF5 =
34DB9230698281B4
;
; Build an Activation Challenge Reply command (cmd, len, cryptogram)
; 11 08 XXXXXXXXXXXXXXXX
;
; The clear text input for the cryptogram is composed of the first six bytes
; of the decrypted Challenge 1 followed by two bytes specifying how long to
; stay in the Authenticated Mode.
;
; CCCCCCCCCCCC TTTT
;
; Time examples:
; For 30 seconds use 002E
; For 99 seconds use 0063
; For 480 seconds use 01E0
; For 1200 seconds use 04B0
;
; These fields are concatenated to form an eight byte block, we will use 480
; seconds:
;
; CCCCCCCCCCCC01E0
;
; The block is encrypted using a variant of the Current Encryption Key
; (Current Encryption Key XOR with 3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C)
;
; Current Key 0DF3D9422ACA561A 47676D07AD6BAD05
; XOR 3C3C3C3C3C3C3C3C 3C3C3C3C3C3C3C3C
; = 31CFE57E16F66A26 7B5B513B91579139
;
; 7549AB6EB48401E0 TDES Enc with 31CFE57E16F66A26 7B5B513B91579139 =
RRRRRRRRRRRRRRRR
;
; Send the Activation Challenge Reply Command
11 08 A30DDE3BFD629ACD

; Build a Deactivate Authenticated Mode command (cmd, len, cryptogram)
; 12 08 XXXXXXXXXXXXXXXX
;
; The clear text input for the cryptogram is composed of the first seven bytes
; of the decrypted Challenge 2 followed by one byte specifying whether to
; increment the DUKPT KSN or not (00 = no increment, 01 = increment).
;
; DDDDDDDDDDDDDD II
;
; These fields are concatenated to form an eight byte block, we will specify
; No Increment:
;
; DDDDDDDDDDDDDD00
;

Advertising