> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/resources/getting-started-with-magteks-ai-search.md).

# Getting Started with MagTek's AI Search

## Stop Searching. Start Asking.

**MagTek Support & Developer Site · Search**

The new Magtek developer site is not just a repository of user documentation; it's designed to help you find exactly the information you need through its AI search mechanism. This is a bit different than the standard keyword searches you may be used to. The site works best when it answers questions rather than searches for words.&#x20;

You ask the site for information it the way you'd ask a colleague and be sure to always name the product you're working with.&#x20;

Here's why this changes everything.

### Two ways to search the same thing

#### ❌ Keyword search — the old habit

You type:

> `MagneSafe decrypt`

You get a stack of pages, which might be confusing based on the question you actually want answered:

* Decrypt - [`/products/dynaflex/security`](https://developer.magtek.com/services/magensa/decrypt#hid-demo)
* Decrypt & Forward APIs - [`/products/tdynamo/security`](https://developer.magtek.com/services/magensa/decrypt-and-forward#decrypt-and-forward-apis)
* MagneSafe IntelliHead -  [`/products/edynamo/dev`](https://developer.magtek.com/products/oem-readers-and-components/oem-components/magnesafe-intellihead#magnesafe-intellihead-support)
* MagneSafe ASIC - [`/security/magnesafe`](https://developer.magtek.com/products/oem-readers-and-components/oem-components/magnesafe-asic#magnesafe-asic-support)

You do the reading, the comparing, and the guessing about which page actually applies to you.

#### ✅ AI search — the new habit

You ask:

> How does my host derive the DUKPT key to decrypt EMV ARQC data from a DynaFlex II PED?

**Synthesized answer**

Your host derives the working key from the transaction’s **KSN** and the matching provisioned key—not from the ARQC itself. For a DynaFlex II, use the encrypted-data fields to identify the algorithm and variant.

* In the `F8` container, `DFDF59` is the encrypted payload, `DFDF56` is its KSN, `DFDF57` identifies the encryption type, and `DFDF58` gives the padding-byte count. The decrypted payload contains an `FC` TLV container. See [<mark style="color:red;">**EMV ARQC Type**</mark>](https://developer.magtek.com/api-and-command-reference/dynafamily-programmers-manual/data-types-and-shared-tlv-data-objects/emv-arqc-type).
* **For TDES DUKPT:** use the KSN’s Initial KSN portion to locate the BDK or corresponding Initial Key. The 21-bit counter identifies the transaction key to derive. Then apply the encryption variant specified by the encryption type; ARQC data uses the Data Encryption, Request, or Both Ways variant. See [<mark style="color:red;">**Key Serial Numbers (KSNs)**</mark>](https://developer.magtek.com/guides/guides/security-and-key-management/key-serial-numbers-ksns) and [<mark style="color:red;">**Encryption & Decryption**</mark>](https://developer.magtek.com/guides/guides/security-and-key-management/encryption-and-decryption).
* Decrypt `DFDF59` and remove the padding indicated by `DFDF58`. For TDES ARQC data, the documented decryption uses 8-byte blocks and CBC-like chaining without an IV.

DynaFlex II supports TDES and AES DUKPT. The derivation steps above are for TDES; for AES, use an AES-compatible host or processor configured for the PED’s keyset. The [<mark style="color:red;">**DUKPT: 3DES/TDEA -> AES Migration**</mark>](https://developer.magtek.com/guides/guides/security-and-key-management/dukpt-3des-tdea-greater-than-aes-migration) notes that AES requires AES-capable decryption support.

**Instead of just putting in terms, try something like these:**

* **Instead of:** KSN
  * **Try**: How do I separate the Initial KSN from the encryption counter in the KSN a DynaProx sends?
  * **Sources Used:** Key Serial Numbers (KSNs); 0xEF09 - Encrypt User Data
* **Instead of:** firmware update
  * **Try:** How do I load and commit a new firmware file on a DynaFlex II Go, and how do I know it succeeded?
  * **Sources Used:** 0xD801 - Load Firmware File; 0xD901 - Commit Firmware from File; 0x0905 - Firmware Update Successful
* **Instead of:** usb not connecting
  * **Try:** Why does my DynaFlex II SCR show up over USB but my host app can’t connect to it?
  * **Sources Used:** DynaFlex II SCR, How to Connect to Devices Using DynaFlex Utility
* **Instead of:** EMV transaction
  * **Try:** How do I run an EMV transaction on a DynaFlex II PED with the Universal SDK for Android?
  * **Sources Used:** Android Universal SDK; Appendix B (API Walk Through); Appendix C (EMV Transaction Flow)
* **Instead of:** magensa decrypt
  * **Try:** How do I send encrypted swipe data from a tDynamo to Magensa Decrypt?
  * **Sources Used:** Encryption & Decryption, Decrypt, tDynamo (Gen I, II)

You get an answer written for *your* device, the questions you'd ask next, and the exact in-site pages behind it — so you can open each one and verify.

### Two habits that make it work

**1. Ask a question.** Write a full question, not a pile of nouns. Start with "How do I…", "Why is…", or "What's the command to…". The more it reads like a sentence, the better the answer.

**2. Always name the exact product, model, platform and connections.** Always say which reader, scanner, or SDK you mean. That means using "DynaFlex II PED," not "DynaFlex," "Android" rather than "the SDK," and specifics like "over USB" or "over Bluetooth LE." The more specific details you provide, the better the answer you'll get.

> **Why providing details matters so much:** Any one topic — say, decrypting a swipe — will have different commands and settings that vary by hardware and software platform. Even the order of implementation steps may have variations based on specific details. The more details you provide, the less the AI has to guess or blend instructions from hardware you might not have.

### Rule of thumb

If you could paste it into a message to a colleague, it's a good query.

* ❌ `decrypt ARQC`
* ✅ How does my host derive the DUKPT key to decrypt EMV ARQC data from a DynaFlex II PED?

{% hint style="info" %}
**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:** [https://www.magtek.com](https://www.magtek.com/)
* 💬 **Developer Forum:** [https://forum.magtek.com](https://forum.magtek.com/)

**Documentation Feedback:**

Help us improve this documentation! [Submit feedback](broken://spaces/1lWLescKFIPsMeIJI6Cd/pages/5314c528980689961380bea0044c1256aaeb39bc)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/resources/getting-started-with-magteks-ai-search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
