DGI / CPS perso decoder
emv_dgi_decodeDecodes personalization data as Data Grouping Identifiers (EMV Card Personalization Specification v1.0 §2.2 and Annex A): DGI (2 bytes), length (1 byte, or FF and 2 bytes) and data, in plain framing or with an 8802 marker before each DGI. Names the common DGIs of CPS Annex A (record DGIs 01nn–1Enn, 8000 DES keys, 9000 key check values, 8010 reference PIN, 9010 PIN counters, 81xx–83xx ICC key parts, 9102 SELECT data, 9104 GPO data) and decodes their TLV content with EMV tag names. Encrypted DGIs (first byte 80–8F, CPS §2.2) are hidden unless reveal_encrypted is set. Optionally checks the presence of the CPS common DGIs. Scheme-specific DGIs are not named. Contains key material and card data. Use test keys and test data only.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data": "0101 10 70 0E 5A 08 4000 0000 0000 0002 5F34 01 00 9102 0C A5 0A 50 08 5445535420415050 9104 0A 82 02 5C00 94 04 08010100 8000 10 00112233445566778899AABBCCDDEEFF 9000 03 08D7B4",
"checklist": "cps-payment"
},
"name": "emv_dgi_decode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The DGI stream as hex (spaces allowed). | |
| framing | No | plain: DGI | length | data. marked: 8802 before each DGI. auto: marked when the stream starts with 8802 and parses that way. | auto |
| checklist | No | Presence checklist of the CPS Annex A common DGIs: payment application or PSE. | none |
| reveal_encrypted | No | Show the data of encrypted DGIs (80xx–8Fxx); hidden by default. |