All pages
Powered by GitBook
1 of 1

Loading...

TR-31 Key Blocks

TR-31 is an ANSI standard format for securely transporting a cryptographic key from one system to another. Instead of sending a key as raw bytes, the sender wraps it in a key block that binds the key to information about how it may be used β€” so a key can't be moved to a device and then used for a purpose it was never intended for. Dyna-family readers use TR-31 to load keys into their secure key slots.

Two pieces work together:

  • TR-31 Key Block (data object) β€” the format itself: a header describing the key's attributes (type, algorithm, allowed usage, mode) plus the encrypted key and a MAC that protects the whole block from tampering. This is what you build and hand to the device.

  • β€” the command that delivers a TR-31 key block to the reader and loads it into a key slot. The device validates the block, then stores the key for use.

Loading or rotating a key on the device β€” for example, provisioning an initial DUKPT key or updating a key later in the field. The TR-31 format is how the key gets there safely; how DUKPT then uses that key per transaction is covered in the security guides.

Reference Section

Information Available

TR-31 Key Block

The data object, its tags, and structure (in the command reference).

0xEF01 - Load Key using TR-31

Loads a key into one of the device's secure key slots.

Security & Key Management

DUKPT, key serial numbers (KSN), and how keys are used once loaded.

When you'll use it

Learn more

Need Help?

For additional support, please contact MagTek Support:

Technical Support:

  • πŸ“§ Email: support@magtek.com

  • πŸ“ž Phone: 1-800-788-6835 (US) | +1-562-546-6616 (International)

  • πŸ• Hours: Monday-Friday, 6:00 AM - 5:00 PM PST

Online Resources:

  • 🌐 Official Site:

  • πŸ’¬ Developer Forum:

Documentation Feedback:

Help us improve this documentation!

Load Key Using TR-31 (command)
https://www.magtek.com
https://forum.magtek.com
Submit feedback