All pages
Powered by GitBook
1 of 10

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

0xE001 - Get Challenge

The host uses this command to request challenge data from the device, which the host can then use to perform a specific sensitive operation / modify a specific type of device setting. Information about how the host should pass the required challenge data to the device is included in the documentation for all commands that use this security mechanism.

The sequence of events is as follows:

1

The host already wants to perform a secured operation that requires a challenge (for example Command 0xEEEE - Send Secured Command to Device).

2

The host constructs the command request for Get Challenge - Command 0xE001 in the format below.

3

The host sends the command request to the device.

4

The device generates a random number for the challenge, stores it locally, and sends a response in the format below to the host.

5

The device starts a 5 minute countdown timer during which the challenge is valid. If the host takes no action within 5 minutes, the timer expires, the device erases the challenge data, and the device must retrieve a fresh challenge to perform the operation it wants to perform. This binding of the command to a specific time period allows the device to detect and reject commands that have been captured/intercepted at one point in time and replayed later.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Example (hex)
AA 00 81 04 01 13 E0 01 84 06 E0 01 81 02 F0 12
Example (hex)
AA 00 81 04 82 13 E0 01 82 04 00 00 00 00 84 16 A2 14 81 02 E0 01 82 04 B5 03 3D A0 83 08 
3B 4F A0 62 69 BB 73 38

Request Data for Get Challenge - Command 0xE001

Response Data for Get Challenge - Command 0xE001

Request Example - Command 0xE001

Response Example - Command 0xE001

E001 = Get Challenge - Command 0xE001

81

02

Request ID to be protected

B

R

End of any wrappers, at minimum including Request Message

E001 = Get Challenge - Command 0xE001

81

02

Request ID to be protected

B

R

82

04

Device Serial Number

B

R

83

08

Challenge Token A challenge token includes 8 byte random numbers and must be used within 5 minutes of being issued. Only one token can be active at a time. Attempts to use a token for requests other than the one specified will cause the token to be revoked/erased

B

R

End of any wrappers, at minimum including Response Message

0xEF11 - Get Key Info

The host uses this command to retrieve information about a key slot, including details about the key stored in that slot. It can be used for several purposes, including:

  • Determine if a key exists / has been loaded

  • Get key derivation data to derive a DUKPT key

  • Get transport key information to retrieve the appropriate transport key

Sequence of events:

1

The host constructs the command request in the format below.

2

The host sends the command request to the device.

3

The device sends a response in the format below to the host.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

EF11 = Get Key Info - Command 0xEF11

Example (hex)
AA 00 81 04 01 21 EF 11 84 06 EF 11 81 02 20 07
Example (hex)
AA 00 81 04 82 21 EF 11 82 04 00 00 00 00 84 34 A2 32 81 04 02 20 10 81 82 06 54 
42 31 54 58 03 84 0A FF FF 98 76 54 32 10 30 00 00 A6 04 81 02 00 3F 89 10 32 30 
32 30 30 39 30 32 54 31 35 35 38 30 32 5A

Construct request

Send request

Receive response

Request Data for Command 0xEF11 - Get Key Info

Response Data for Command 0xEF11 - Get Key Info

Request Example - Command 0xEF11

Response Example - Command 0xEF11

Note: For additional support, please contact MagTek Support.

EF11

Get Key Info - Command 0xEF11

81

02

Key Slot ID — See Table XX - Key Slot ID

B

R

End of any wrappers, at minimum including Request Message

81

04

Key Slot Information

B

R

82

06

Loaded Key Information

B

O

/null

(1)

Key Slot Status

· 0x00 = Empty

· 0x01 = Loaded (Key not assigned purpose)

· 0x02 = Loaded & Active

· 0x03 = Exhausted (End of DUKPT key sequence

· 0x04 = Expired (Reserved, certificate status)

0xFF = Not supported in this device

B

R

/null

(1)

Key Slot Type

First byte of the Key Slot ID in the host’s request message.

B

R

/null

(2)

Transport Key Slot ID

This specifies the key used to secure and load the key that the host is retrieving information about. See Table 59 - Key Slot ID

B

R

82

06

Loaded Key Information

B

O

/null

(1)

Key Environment — ‘T’ = Test, ‘P’ = Production

A

R

/null

(4)

TR-31 Attributes — See Table XX - TR-31 Key Type Table - Usage/Algorithm/Mode.

B

R

/null

(1)

Encoding of Algorithm & Length: - 0x01 = DEA - 0x02 = 2TDEA - 0x03 = 3TDEA - 0x04 = AES128 - 0x05 = AES192 - 0x06 = AES256

B

R

83

var

Key Check Value: - For AES-CMAC, 5 bytes. - For TDES-CMAC or TDES-CBCMAC, 3 bytes.

B

O

84

var

Key Derivation Information — Contains the derivation block, key serial number (KSN), or key label, as appropriate for the key type.

B

O

A6

var

Restrictions — Reserved. Do not include.

B

O

81

02

DUKPT Restrictions — These restrictions come from the TR-31 block.

B

O

89

var

Timestamp — This comes from the TR-31 block or from device’s real-time clock.

B

O

0xEF06 - Change Device Lock State

The host can use this command to change the device’s lock state. To get the device’s lock state or to set it using MagTek security see Device Lock State - Property 1.2.5.2.1.1. The value of the device lock state will revert to the value of Device Lock State After Reset - Property 1.2.5.2.1.2 after a reset or a power cycle. See Device Lock Feature for more information.

Change Device Lock State - Request Data for Command 0xEF06

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

-

-

EF06 = Change Device Lock State - Command 0xEF06

-

Beginning of any wrappers, at minimum including Response Message

-

Example (Hex)
AA00 81 04 0155EF06 84 0E EF06 810100 820100 8304 34333231
Example (Hex)
AA00 81048255EF06 820400000000 8402EF06

Response Data for Change Device Lock State - Command 0xEF06

Request Example - Command 0xEF06

Response Example - Command 0xEF06

81

01

Device Lock State - 0x00 = Unlocked - 0x01 = Locked

B

M

82

01

Passcode Format - 0x00 = Clear - 0x01 = Fixed SHA-256 - 0x02 = Variable SHA-256

B

M

83

04-63

Passcode — The value of the passcode depends on the value of the passcode format parameter.

  • If the passcode format is set to Clear (0x00), then the value of the passcode is the passcode in the clear and can have a length of 4–63 bytes.

  • If the passcode format is set to Fixed SHA-256 (0x01), then the value of the passcode is the 32-byte SHA-256 hash value of the passcode

  • If the passcode format is set to Variable SHA-256 (0x02), then the value of the passcode is the 32-byte SHA-256 hash value of: an 8-byte random challenge token followed by the 4–63 byte passcode. The challenge token must have been retrieved from the device within the last 5 minutes using Command 0xE001 - Get Challenge

B

M

-

-

End of any wrappers, at minimum including Request Message

EF06 = Change Device Lock State - Command 0xEF06

-

-

-

No parameters.

-

-

End of any wrappers, at minimum including Response Message

0xEF07 - Change Device Lock Passcode

The host can use this command to change the device’s lock passcode. The value of the device lock passcode is stored in non-volatile memory so changes made to it will persist after the device is reset or power cycled. To change the device lock passcode using MagTek security or to see its default value see Device Lock Passcode - Property 1.2.5.2.1.3. See Device Lock Feature for more information.

Change Device Lock Passcode - Request Data for Command 0xEF07

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

EF07 = Change Device Lock Passcode - Command 0xEF07

81

4–63

Current Passcode. The current passcode in the clear. This must match the value of the current passcode or the command will fail.

B

M

82

04–63

New Passcode. The new passcode in the clear. It can only contain printable ASCII characters or the command will fail.

B

M

End of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Example (Hex)
AA00 81 04 0155EF07 84 0E EF07 810434333231 820434333231
Example (Hex)
AA00 81048255EF07 820400000000 8402EF07

Response Data for Change Device Lock Passcode - Command 0xEF07

Request example - Command 0xEF07

Response example - Command 0xEF07

EF07 = Change Device Lock Passcode - Command 0xEF07

No parameters.

End of any wrappers, at minimum including Response Message

0xEF01 - Load Key Using TR-31

The host uses this command to load a key into one of several available slots in the device’s secure memory.

Device Key ID / Slot

ID
Label
Description
Load TK

1000

TMPTK

To inject a specific key in the above table, the corresponding Load TK shall be injected previously.

As shown in the table, MTK injection requires that a TMPTK has been created. See Establish Ephemeral KBPK - Command 0xF017.

After MTK has been injected successfully, the sequence of injecting other keys is as follows:

1

The host uses Command 0xE001 - Get Challenge to establish a secure session with the device.

2

The host constructs a TR-31 (X9.143) key block for the key it is going to load. (Note that the Load Key must be injected previously.)

3

The host constructs the command request for Command 0xEF01 - Load Key Using TR-31 in the format below.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

4

The host sends the command request to the device.

5

The device sends a response in the format below to the host.

Temporary KBPK

agree

1001

MTK

Master Transport

TMPTK

1002

DEVTK

Device Master

MTK

1003

FINTK

Financial Master

MTK

1021

PRODTK

Production - MagTek Internal Only

DEVTK

1022

MFGTK

MagTek Only Internal/External

DEVTK

1081

MKIFTK

MagTek KIF Financial Keys

FINTK

1101

FREQMK

Factory Request MAC

PRODTK

1102

MREQMK

Mfg Device Request MAC

MFGTK

1111

MFRQMK

Mfg Financial Request MAC

MKIFTK

20xx

DKPTM0-1F

MagTek DUKPT Initial Key

MKIFTK

Beginning of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Example (Hex)
AA 00 81 04 01 1A EF 01 84 82 01 36 EF 01 84 82 01 30 44 30 33 30 34 42 31 54 58 30 30 
4E 30 36 30 30 49 4B 31 38 46 46 46 46 39 38 37 36 35 34 33 32 31 30 33 30 30 30 30 30 
32 31 35 38 4D 47 54 4B 31 30 30 31 54 31 31 30 34 32 30 30 37 31 32 30 34 31 30 38 31 
32 31 30 34 30 30 33 46 33 31 30 37 42 35 30 41 46 44 32 33 32 31 30 43 39 33 36 31 39 
44 44 41 41 32 31 33 36 43 37 33 33 31 30 32 30 32 30 31 32 30 34 54 31 37 31 36 33 30 
5A 4B 50 30 45 30 31 39 33 36 46 41 33 32 45 4B 43 30 41 30 30 34 35 30 30 54 53 31 34 
32 30 32 30 30 39 30 32 54 31 35 35 38 30 32 5A 50 42 30 34 35 37 32 31 37 46 33 34 37 
31 34 43 32 42 38 38 46 33 39 35 35 32 32 32 46 46 35 39 41 41 30 35 37 44 39 39 41 46 
38 32 41 37 35 37 32 46 39 33 38 46 38 33 38 42 43 36 35 45 45 35 34 46 39 34 37 46 35 
39 41 30 36 43 44 34 35 35 31 39 32 32 37 41 32 35 35 43 37 44 35 44 37 43 38 36 37 34 
35 30 33 46 41 43 36 46 41 37 31 33 32 43 38 46 41 39 39 36 42 34 45 42 36 41 41 31 31 
34 46 45
Response Example (Hex)
AA 00 81 04 82 1A EF 01 82 04 00 00 00 00

Establish a secure session (Get Challenge)

Construct TR-31 key block

Construct command request

Load Key Using TR-31 - Request Data for Command 0xEF01

Load Key Using TR-31 - Response Data for Command 0xEF01

Request Example - Command 0xEF01

Response Example - Command 0xEF01

EF01 = Load Key Using TR-31 - Command 0xEF01

84

var

Key Block — This is a populated, secured MIFARE Card Data Type (EMV Contactless Only) Table XX – MIFARE Card Data Type

B

R

DFDFDF40

var

MIFARE Card Data in ASCII terminated with NULL character

DFDFDF41

var

MIFARE Card Data in Binary (optional)

O

TR-31 Key Block Type.

End of any wrappers, at minimum including Request Message

EF01 = Load Key Using TR-31 - Command 0xEF01

No parameters.

End of any wrappers, at minimum including Response Message

Send the command

Device response

0xEEEE - Send Secured Command to Device

The host uses this command to transmit another command securely. This “secure wrapper” mechanism provides the device a means to ensure the wrapped command originated from an authentic, authorized host. In addition, its implementation includes an operation that starts a countdown timer, which ensures the command is current and is not an unauthorized replay of a previously intercepted / stored command. This command can use multiple authentication methods, including MAC or ECDSA Signature. The method and parameters to use are specific to the command being wrapped, and are specified in the documentation for that command.

The sequence of events is as follows:

1

Determine command and compose Message Payload

The host determines what command it wants to call from Section 6 Commands, determines the command must be secured, and uses the Request Data table for that command to compose Message Payload.

2

The host uses Get Challenge - Command 0xE001 to retrieve a Challenge Token and unlock the device for receiving the desired command for a limited period of time. When the time expires, the device will no longer accept the Challenge Token and the host will have to retrieve another one.

3

The host creates an instance of Send Secured Command to Device - Command 0xEEEE in the format below and includes the Message Payload and Challenge Token inside it. In the Request Message, it fills in Command ID as the command number of the wrapped Message Payload, instead of 0xEEEE. Some parameters are command-specific; see the documentation for the command that is being wrapped to determine what values to use.

4

The host sends the resulting composite command request to the device.

5

The device validates the serial number and challenge token, then examines the parameters to determine which authentication method is being used and authenticates the command accordingly.

6

If the device determines the command request is authentic, it will start executing the secure command defined by the Message Payload.

7

The device sends a response to the host reporting success or failure. In both cases, the response uses the format that corresponds to the command invoked by the Message Payload. See the documentation for that command to determine the format of the response.

Tag
Len
Value / Description
Typ
Req
Default

Example (Hex):

Beginning of any wrappers, at minimum including Request Message

This example wraps [**Command 0xD811 - Start Send File to Device (Secured)
AA 00 81 04 01 04 D8 11 84 81 8F EE EE A1 19 81 05 03 03 06 02 08 84 00 85 00 A8 0A 81 02 11 02 82 00 86 00 88 00 A9 00 82 04 FF FF FF F0 83 08 C9 65 45 F2 97 69 85 B1 84 4E D8 11 81 04 00 00 03 00 A2 2B 81 04 00 00 02 99 82 01 04 83 20 87 A4 B3 54 61 C5 CB D3 1D DC BA 9D 65 25 5A D4 6A 22 FA 51 5E FD 65 87 AF AC A8 8C 4F AF 80 9B A3 14 38 31 30 38 33 30 33 30 33 30 33 30 33 33 33 30 33 30 87 01 01 9E 10 7D E4 27 C8 A0 70 72 08 19 0A 1E 0A 3F 48 BB F1
This example wraps [**Command 0xF015 - Read Log & Clear Tamper (MAGTEK INTERNAL ONLY)**](#_bookmark52):
AA 00 // Marker
81 04 01 0F F0 15 // Message Information
84 81 C8 // Request Payload
EE EE // 0xEEEE, Secure Wrapper
A1 24 // P4-A1, Security Parameters
81 04 02 01 04 05 // 02=Cmd Auth-sign, 01=ECDSA, 04=SHA-256, 05=P-521
84 00 // Data (for IV, nonce, as needed)
85 00 // Extra data item (reserved for future use)
A8 16 // Key Info
 81 02 00 00 // Key Slot ID
 82 07 45 43 43 53 49 47 4E // Key Label, “ECCSIGN”
 86 05 45 43 44 53 41 // KSN or derive info, ECDSA
 88 00 // Added Info
A9 00 // 2nd Key Info (reserved for future use)
82 04 B5 03 3D A0 // P4-P2, Device Serial Number
83 08 5B 6B 45 4B 00 5B CE 31 // P4-P3, Challenge Token
84 02 F0 15 // P4-P4, Payload Command 0xF015
9E 81 89 // P4-P30, Signature for Secure Wrapper
30 81 86 02 41 // Sig->R
 52 5B 04 9A C7 CC 56 DE 5A EA 89 62 47 BB B8 0D 93 80 CE C8 AD 6E 16 F7 6E DA 08 42 0B 9C 69 77 61 B0 99 FC 05 7D AE AF 75 79 9C 7B B3 81 72 5C 4E 5B 92 DC F3 B6 85 5E B3 A2 71 0D 1D 93 B5 0D 0C
02 41 // Sig->S
 46 47 0A EF 6F D5 97 ED 4F 41 E8 3C FD 20 A1 CE 7D E5 CA D3 E8 22 3B ED BC 2A 8A A0 BF 73 72 81 35 4F CB 52 B6 A9 07 6F 36 7F 5D 35 D5 29 3D 5D 78 17 0E B2 D6 AA A5 0D B3 4D B9 04 2C 03 6A AC A5

Retrieve Challenge Token

Build the 0xEEEE request

Send the composite command

Device validates and authenticates

Device executes secure command

Device responds

Request Data for Send Secured Command to Device - Command 0xEEEE

Request Example Using MAC

Request Example Using ECDSA

EEEE = Send Secured Command to Device - Command 0xEEEE

A1

var

Security Parameters — This parameter describes how the Signature parameter in this data object is calculated, and is a Security Parameters Type TLV data object. To determine which values to use in that TLV data object, see the documentation for the command being wrapped.

T

R

82

04

Serial Number

B

R

83

08

Challenge Token — The token the device returned when the host called Get Challenge - Command 0xE001.

B

R

84

var

Message Payload

B

R

9E

var

MAC or Signature

B

R

End of any wrappers, at minimum including Request Message

0xEF02 - Generate CSR Keys (WLAN Only)

The host uses this command to generate a key pair to be used for a certificate signing request (CSR). The key pair generated will be 256 bit elliptic-curve (EC) keys. The key pair generated will be saved to non-volatile memory in the device and will overwrite any existing CSR key pair. The key pair will persist in non-volatile memory associated with a CSR until it is either overwritten or until a leaf certificate is loaded into the device with Start Send File to Device (Secured) - Command 0xD811 that contains a public key that matches the key pair at which point the key pair will be associated with that certificate instead of a CSR.

The sequence of events is as follows:

1

Host sends command request

The host constructs the command request in the format below and sends it to the device.

2

The device sends a response in the format below to the host to indicate that key pair generation has been started.

3

Once the device finishes generating the key pair, it will send Device Information Update - Notification 0x1001 with the category set to key management and the reason set to CSR keys generated to indicate that the key pair generation process has completed.

The device typically takes around a second or two to generate a 256 bit EC key pair. If this command is extended in the future to support 2048 bit RSA keys, then it will take an average of 30 seconds and sometimes much longer to generate the RSA keys. That is why a notification is used to indicate that the key pair has been generated instead of a command response that indicates that it is complete.

4

The host will typically send Generate CSR (WLAN Only) - Command 0xEF03 as the next step. See that command for more detail and more potential steps.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Example (Hex):

Beginning of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Example (hex)
AA00 81 04 0155EF02 84 02 EF02
AA00 81 04 8205EF02 82 04 01000000 84 02 EF02

Device sends immediate response

Device sends notification when generation completes

Host typically requests CSR next

Generate CSR keys (WLAN Only) - Request Data for Command 0xEF02

Response Data for Generate CSR keys (WLAN Only) - Command 0xEF02

Request Example - Command 0xEF02

Response Example - Command 0xEF02

EF02 = Generate CSR keys (WLAN Only) - Command 0xEF02

No parameters.

End of any wrappers, at minimum including Request Message

EF02 = Generate CSR keys (WLAN Only) - Command 0xEF02

No parameters.

End of any wrappers, at minimum including Response Message

0xEF09 - Encrypt User Data

The host uses this command to request that the device encrypt a block of user data embedded in the command string. The SRED ID 2 Key will be used for encryption. The TLVs of KSN and Encryption Type will be provided at the end of the string for decryption.

1

Host request and device processing

The sequence of events is as follows:

  • The host composes a command request in the format below and sends it to the device.

  • The device will fetch the Real-Time Clock Date/Timestamp, retrieve the device's Serial Number, extract the data within 0xA3 TLV in the command string. And then concatenate all the collected TLVs as follows: + + <User Data TLV(s)>. The format of the encrypted data string is shown in the Response Data below.

  • If the command is invalid or encryption fails, then a response of failure will be sent to the host.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Beginning of any wrappers, at minimum including Response Message

Example (hex)
AA-00 81-04-01-03-EF-09 // P1, Message Info, 0xEF09 Command
84-3E-EF-09 // P4, Request Payload
A3-3A // User data parameters, total 58 bytes
81-20 // User data item #0, 32 bytes
00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F
10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F
82-06 // User data item #1, 6 bytes
00-01-02-03-04-05
83-06 // User data item #2, 6 bytes
06-07-08-09-0A-0B
84-06 // User data item #3, 6 bytes
0C-0D-0E-0F-10-11
Example (hex)
AA-00
81-04-82-03-EF-09 // P1, Message Info, 0xEF09 Response
82-04-00-00-00-00 // P2, Response Status
84-82-00-6F-EF-09 // P4, Response payload
F8-82-00-69 // Encrypted Data Container
DF-DF-59-82-00-50 // Encrypted Data Primitive
31-4D-0E-4B-52-EB-96-33-FD-D4-D6-9D-C9-D8-12-56
2C-09-CF-2A-E6-09-34-F9-55-AF-57-42-EB-AE-F4-B3
7B-2D-94-DF-E5-35-6F-4F-9D-36-5F-D1-F7-9F-40-F2
B6-1D-B6-97-C8-0E-2F-E2-1B-04-62-E8-3D-0A-EF-87
77-06-F6-07-0F-8C-9C-0A-51-76-E8-D3-78-05-AF-13
DF-DF-56-0A // Encryption KSN
FF-FF-98-76-54-32-10-20-00-02
DF-DF-57-01 // Encryption Type

Request Data for Command 0xEF09 - Encrypt User Data

Response Data for Command 0xEF09 – Encrypt User Data

Response Data for Encrypt User Data (after decryption) - Command 0xEF09

Request Example - Command 0xEF09

Response Example - Command 0xEF09

EF09 = Encrypt User Data - Command 0xEF09

A3

var

User data parameters for item #0 to item #3. The maximum total size of 0xA3 TLV is 4,000 bytes.

B

R

/81

var

User data item #0, required, minimum 1 byte.

B

R

/82

var

User data item #1, optional

B

O

/83

var

User data item #2, optional

B

O

/84

var

User data Item #3, optional

B

O

End of any wrappers, at minimum including Request Message

EF09 = Encrypt User Data - Command 0xEF09

F8

var

Container for Encrypted Data

T

R

/DFDF59

var

Encrypted Data Primitive ( length includes padding) Decrypt the value of this TLV data object using the algorithm and variant specified in the Encrypted Data KSN parameter and the Encryption Type parameter below to read its contents.

B

R

/DFDF56

var

Encrypted Data KSN

B

R

/DFDF57

01

Encrypted Data Encryption Type See Encryption Type for a list of valid values.

B

R

End of any wrappers, at minimum including Response Message

EF09 = Encrypt User Data - Command 0xEF09

F8

var

Container for Encrypted Data

T

R

/DFDF59

var

Encrypted Data Primitive, length includes padding

T

R

//FC

var

Decrypted Data Container, length excludes padding

T

R

///81

04

Real Time Clock, Epoch Time in seconds, unsigned 32 bits. The date and time shall be Universal Time Coordinated (UTC).

B

R

///82

04

Device Serial Number

B

R

///A3

var

User data parameters for item #0 to item #3. The maximum total size of 0xA3 TLV is 4,000 bytes.

B

R

////81

var

User data item #0, required, minimum 1 byte

B

R

////82

var

User data item #1, optional

B

O

////83

var

User data item #2, optional

B

O

////84

var

User data item #3, optional

B

O

PKCS7 padding, maximum 16 bytes, minimum 1 byte

/DFDF56

var

Encrypted Data KSN

B

R

/DFDF57

01

Encrypted Data Encryption Type See section 4.4 Encryption Type for a list of valid values.

B

R

End of any wrappers, at minimum including Response Message

0xEnnn - Security

Security

This section of the DynaFamily Programmer's Manual lists available security commands to utilize various functions in the device.

Applies to: All Dyna Family products

Information in this group

Section

Information

The host uses this command to request challenge data from the device, which the host can then use to perform a specific sensitive operation / modify a specific type of device setting.

The host uses this command to transmit another command securely. T

0xEF01 - Load Key Using TR-31

The host uses this command to load a key into one of several available slots in the device’s secure memory.

0xEF02 - Generate CSR Keys (WLAN Only)

The host uses this command to generate a key pair to be used for a certificate signing request (CSR).

0xEF03 - Generate CSR (WLAN Only)

The host uses this command to generate a certificate signing request (CSR) in PEM format.

0xEF06 - Change Device Lock State

The host can use this command to change the device’s lock state.

0xEF09 - Encrypt User Data

The host uses this command to request that the device encrypt a block of user data embedded in the command string.

0xEF11 - Get Key Info

The host uses this command to retrieve information about a key slot, including details about the key stored in that slot.

Need More Help

Need Help?

For additional support, please contact MagTek Support:

Technical Support:

  • 📧 Email: support@magtek.com

  • 📞 Phone: 1-562-546-6800 (US)

  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

Online Resources:

  • 🌐 Support Portal: developer.magtek.com

Documentation Feedback:

Help us improve this documentation!

0xE001 - Get Challenge
0xEEEE - Send Secured Command to Device
feedback@magtek.com

0xEF03 - Generate CSR (WLAN Only)

The host uses this command to generate a certificate signing request (CSR) in PEM format. The CSR generated will be saved to volatile memory in the device and will overwrite any existing CSR. The CSR will persist in volatile memory until it is overwritten, fetched with Start Get File from Device - Command 0xD821 or the device is power cycled or reset.

The sequence of events is as follows:

1

Generate CSR — Step

The host will use Generate CSR keys (WLAN Only) - Command 0xEF02 if it wants generate a CSR using a new CSR key pair.

2

The host constructs the command request in the format below and sends it to the device.

3

The device sends a response in the format below to the host to indicate that CSR generation has completed.

4

The host fetches the CSR with Start Get File from Device - Command 0xD821.

5

The CSR is used to create a certificate.

6

The host loads the certificate into the device with Start Send File to Device (Secured) - Command 0xD811.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Example (hex)
AA00 81 04 0155EF03 84 02 EF03
Example (hex)
AA00 81 04 8255EF03 82 04 00000000 84 02 EF03

Construct and send request

Device response

Fetch CSR

Create certificate

Load certificate into device

Request Data for Command 0xEF03 – Generate CSR (WLAN Only)

Response Data for Command 0xEF03 – Generate CSR (WLAN Only)

Request Example - Command 0xEF03

Response Example - Command 0xEF03

EF03 = Generate CSR (WLAN Only) - Command 0xEF03

81

1

Key Identifier The key identifier to use to generate the CSR. The key pair associated with the identifier must already be present in the device for the command to succeed.

0 = CSR keys

1 = Apollo server cert keys

2 = Customer server cert keys

3 = Commercial server cert keys 4 = Apollo client cert keys

B

O

0

82

var

Subject

Including this optional parameter will override the default subject. This parameter should contain a null terminated string. This string should contain a list of attributes separated bycommas. If an attribute’s value contains a comma, the comma should be replaced with “\,” Each attribute value should be prefixed with its attribute name followed by “=”. The following is a list of valid attribute names.

"CN" "commonName" "C" "countryName” "O" "organizationName" “L” “locality” "R" “OU” "organizationalUnitName" “ST” "stateOrProvinceName" "emailAddress" "serialNumber" “postalAddress” "postalCode" “dnQualifier” "title" “surname” "SN" “givenName” "GN" “initials” "pseudonym" "generationQualifier" “domainComponent” "DC" “O=MagTek Inc,CN= test1.com” is an example with two attributes.

“serialNum ber=XXXX XXX,CN= df- xxxxxxx” where XXXXXX X is Property 2.2.1.1.1.1****Serial Number and so is xxxxxxx but in lower case

83

var

Subject Alternative Names

Including this optional parameter will override the default subject alternative names. This parameter should contain a null terminated string. Only DNS names and IP addresses are supported and only a maximum of two each. DNS names must be prefixed with “DNS=” and IP addresses must be prefixed with “IPA=”. All Subject Alternative Names

Must be separated with a comma and not spaces. Subject Alternative Names may not be ordered in the CSR the same as they are ordered here.

"DNS=test1.com,DNS=test2.,IPA=1.10.16.255,IPA=2.10.16.25

4" is an example.

B

O

“DNS=df-

xxxxxxx,IP A=192.168

.0.1” where xxxxxxx is Property 2.2.1.1.1.1

Serial Number but in lower case

End of any wrappers, at minimum including Request Message

EF03 = Generate CSR (WLAN Only) - Command 0xEF03

No parameters.

End of any wrappers, at minimum including Response Message