Example: Changing From Security Level 2 To Security Level 3 - Magtek mDynamo Programmer's Manual

Oem secure card reader authenticator
Hide thumbs Also See for mDynamo:
Table of Contents

Advertisement

Appendix A - Examples
A.1.2 Example: Changing from Security Level 2 to Security Level 3
; This script demonstrates changing from Security Level 2 to Security
Level 3.
; It assumes the device is at Security Level 2 with the ANS X9.24
Example
; key loaded and the KSN counter set to 1.
09 00
; Get current KSN (should be FFFF9876543210E00001)
Request
: CMND=09, LEN=00, DATA=
Response
: RC=
; For KSN 1, MAC Key: 042666B4918430A3 68DE9628D03984C9
;
; The command to change Security Level looks like: 15 05 03 nnnnnnnn
;
where nnnnnnnn is the MAC.
;
; The data to be MACd is: 15 05 03
; Data to be MACd must be in blocks of eight bytes, so we left justify
and
; zero fill the block to get: 15 05 03 00 00 00 00 00 (This is the
block to MAC)
; For convenience show it as the compacted form: 1505030000000000
;
; The MAC algorithm run with this data uses the following
cryptographic
; operations:
;
;
Single DES Encrypt the data to be MACd with the left half of the
MAC Key:
;
1505030000000000 1DES Enc with 042666B4918430A3 =
BFBA7AE4C1597E3D
;
;
Single DES Decrypt the result with the right half of the MAC Key:
;
BFBA7AE4C1597E3D 1DES Dec with 68DE9628D03984C9 =
DA91AB9A8AD9AB4C
;
;
Single DES Encrypt the result with the left half of the MAC Key:
;
DA91AB9A8AD9AB4C 1DES Enc with 042666B4918430A3 =
E7E2FA3882BB386C
;
; The leftmost four bytes of the final result are the MAC = E7E2FA38
;
; Send the MACd Set Security Level command
15 05 03 E7E2FA38
Request
: CMND=15, LEN=05, DATA=03 E7 E2 FA 38
Response
: RC=
02 00
; Reset so changes take effect
Request
: CMND=02, LEN=00, DATA=
Response
: RC=
Delay
: (waited 5 seconds)
mDynamo| OEM Secure Card Reader Authenticator | Programmer's Manual (COMMANDS)
00, LEN=0A, DATA=FF FF 98 76 54 32 10 E0 00 01
00, LEN=00, DATA=
00, LEN=00, DATA=
Page 125 of 167 (D998200151-200)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the mDynamo and is the answer not in the manual?

Questions and answers

Table of Contents