MagTek MagneSafe V5 User Manual

Page 116

Advertising
background image

MagneSafe V5

108

|------- Current KSN -------| |---- Challenge 1 ---
-| |---- Challenge 2 ----|
Response : RC= 00, LEN=1A, DATA=FF FF 98 76 54 32 10 E0 00 03 BE 5C 98 35 17 7E 45
2A A7 2D 2D B2 36 BF 29 D2
; Challenge 1 Encrypted: BE5C9835177E452A
; Challenge 2 Encrypted: A72D2DB236BF29D2

; Note that the KSN now ends with a counter of 3!
; Decrypt Challenge 1 using variant of Current Encryption Key
; (Current Encryption Key XOR with F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0)
;
; Current Key 0DF3D9422ACA561A 47676D07AD6BAD05
; XOR F0F0F0F0F0F0F0F0 F0F0F0F0F0F0F0F0
; = FD0329B2DA3AA6EA B7979DF75D9B5DF5
;
; 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 001E
; 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 =
A30DDE3BFD629ACD
;
; Send the Activation Challenge Reply Command
11 08 A30DDE3BFD629ACD

Advertising