Tools
EMV Test CA Public Keys
Test Certification Authority public keys of the payment systems for contactless, and of EMVCo for contact, as used to test and certify EMV Level 2 kernels and terminals with test tools. Download each set as JSON or in the moka key file format, or load it straight into the ODA Debugger.
Visa Contactless 6 keys
Visa test CA public keys for EMV contactless Level 2 testing. RID: A000000003.
| RID | Index | Size | Exponent | Checksum (SHA-1) |
|---|---|---|---|---|
A000000003Visa | 01 | 1024 bits | 03 | A87635E920335381A03FE30D1D75F3828D7F9929 |
A000000003Visa | 02 | 1024 bits | 010001 | 938F42E3DA7B074A2E9D13FA2CA6EDB12E3EAC15 |
A000000003Visa | 03 | 1408 bits | 03 | A5905811349D8D0DCD9A3EA35043831C75DEEDF8 |
A000000003Visa | 04 | 1984 bits | 03 | 89AE86A4FDC6D4914C09774BAD1F05C5E9F469B5 |
A000000003Visa | 05 | 1600 bits | 03 | 1BAE1059ACBC39DA1E3939F78BC56DFCB7008540 |
A000000003Visa | 51 | 1152 bits | 03 | B9D248075A3F23B522FE45573E04374DC4995D71 |
Mastercard Contactless 19 keys
Mastercard test CA public keys for EMV contactless Level 2 testing, with the dummy RID B012345678. RIDs: A000000004, B012345678.
| RID | Index | Size | Exponent | Checksum (SHA-1) |
|---|---|---|---|---|
A000000004Mastercard | 00 | 1280 bits | 03 | EC0A59D35D19F031E9E8CBEC56DB80E22B1DE130 |
A000000004Mastercard | 05 | 1024 bits | 03 | 53D04903B496F59544A84309AF169251F2896874 |
A000000004Mastercard | EF | 1984 bits | 03 | 21766EBB0EE122AFB65D7845B73DB46BAB65427A |
A000000004Mastercard | F1 | 1408 bits | 03 | D8E68DA167AB5A85D8C3D55ECB9B0517A1A5B4BB |
A000000004Mastercard | F3 | 1152 bits | 03 | A69AC7603DAF566E972DEDC2CB433E07E8B01A9A |
A000000004Mastercard | F4 | 1408 bits | 03 | BF6B5B9C47134E494571732A4903C935874682B9 |
A000000004Mastercard | F5 | 1984 bits | 010001 | C2239804C8098170BE52D6D5D4159E81CE8466BF |
A000000004Mastercard | F6 | 1792 bits | 03 | 502909ED545E3C8DBD00EA582D0617FEE9F6F684 |
A000000004Mastercard | F7 | 1024 bits | 010001 | EEB0DD9B2477BEE3209A914CDBA94C1C4A9BDED9 |
A000000004Mastercard | F8 | 1024 bits | 03 | F06ECC6D2AAEBF259B7E755A38D9A9B24E2FF3DD |
A000000004Mastercard | F9 | 1536 bits | 03 | 336712DCC28554809C6AA9B02358DE6F755164DB |
A000000004Mastercard | FA | 1152 bits | 03 | 5BED4068D96EA16D2D77E03D6036FC7A160EA99C |
B012345678Test RID | 00 | 1280 bits | 03 | 5D2970E64675727E60460765A8DB75342AE14783 |
B012345678Test RID | 02 | 1536 bits | 03 | 294BE20239AB15245A63BEA46CC6C175A25562D1 |
B012345678Test RID | 05 | 1024 bits | 03 | B9A1D65CAFE06B054EDD7EA82597AB85F130E663 |
B012345678Test RID | F1 | 1408 bits | 03 | FDEE82458A34C0DE4AC2AFC98B2774E7383B062F |
B012345678Test RID | F3 | 1024 bits | 010001 | 5694B0D278481814A05E12B558CEC1234865AA5D |
B012345678Test RID | F7 | 1152 bits | 03 | F78113E860F030A872923FCE93E3381C77A42A30 |
B012345678Test RID | F8 | 1536 bits | 03 | 66469C88E7DC111529C7D379D7938C8DF3E4C25E |
American Express Contactless 8 keys
American Express test CA public keys for EMV contactless Level 2 testing. RID: A000000025.
| RID | Index | Size | Exponent | Checksum (SHA-1) |
|---|---|---|---|---|
A000000025American Express | 01 | 1024 bits | 03 | 4C3681CD1D207B2BDC6E4DD5E33657F356496994 |
A000000025American Express | 02 | 1024 bits | 010001 | AECCAD45A2E189E30CB3CAE8FFEEB3432C23D5AC |
A000000025American Express | 03 | 1280 bits | 03 | 5479CA9E9A89EB4815F348C487553C1F45AB7AC1 |
A000000025American Express | 04 | 1536 bits | 03 | A8E8D35474958BB57CD9E0DCEEFF381F0B7E0AB3 |
A000000025American Express | 05 | 1792 bits | 03 | B43A837DD523785CEA963195CA8A58D1FD70D32D |
A000000025American Express | 06 | 1984 bits | 03 | 5EDE89510DED5FCC1824A08438327066B519FCF3 |
A000000025American Express | 07 | 1008 bits | 03 | 5DC21CFD0B4348E8F374ECD71406580DA62A4068 |
A000000025American Express | 09 | 1408 bits | 03 | 79896BD7B076C4F94AFF0B063A73861A593413F5 |
Discover Contactless 5 keys
Discover test CA public keys for EMV contactless Level 2 testing. RID: A000000152.
| RID | Index | Size | Exponent | Checksum (SHA-1) |
|---|---|---|---|---|
A000000152Discover | 5C | 1408 bits | 03 | 60154098CBBA350F5F486CA31083D1FC474E31F8 |
A000000152Discover | 5D | 1984 bits | 03 | B51EC5F7DE9BB6D8BCE8FB5F69BA57A04221F39B |
A000000152Discover | 60 | 1408 bits | 010001 | 3C87633034BC2A6D524217796D9D673B9EEF8293 |
A000000152Discover | 61 | 1984 bits | 010001 | CEE7336ED255051ABCCAB8070250E81AC828CF65 |
A000000152Discover | 99 | 1024 bits | 03 | 4C61B10E3FD67D25881378192C4C336D8ACC9B7F |
RuPay Contactless 16 keys
RuPay test CA public keys for EMV contactless Level 2 testing. RID: A000000524.
| RID | Index | Size | Exponent | Checksum (SHA-1) |
|---|---|---|---|---|
A000000524RuPay | 00 | 1152 bits | 03 | 8A75D59FA254DEA252CD99635ADE6E53C07CA7FE |
A000000524RuPay | 01 | 1984 bits | 010001 | 60F8ACB74EF90A3E7FA8FBCB4C20C3E144393216 |
A000000524RuPay | 02 | 1792 bits | 03 | 7F29D6CEB2ED02818E2F3609F9955F2719FC1F03 |
A000000524RuPay | 03 | 1024 bits | 010001 | C9F88AAABA4EA83587795B41E32E59E0DC547CFC |
A000000524RuPay | 04 | 1024 bits | 03 | 86374E7EB71D93352F1EED2AC71171CF4418ADFF |
A000000524RuPay | 05 | 1536 bits | 03 | 4B45A68F5B85A296A43DA5400BC2914C7C22CF5E |
A000000524RuPay | 06 | 1024 bits | 000003 | D26FECF91D843158CA32D3BFFBCCA841C2AF9283 |
A000000524RuPay | F1 | 1408 bits | 03 | 73AC3C95D7BB6F638D944EEFCA64C618C5CFF610 |
A000000524RuPay | F3 | 1152 bits | 03 | B1B355F5A648FBB24C2BC830E9E366AAA9DA2129 |
A000000524RuPay | F5 | 1984 bits | 010001 | C636CB5F022947E6F3EF594FC1D58F13C9D04BE8 |
A000000524RuPay | F6 | 1792 bits | 03 | 95C817D4C1904EE7E7720C532728A9B420E4542A |
A000000524RuPay | F7 | 1024 bits | 010001 | 402D7A51495DD7FBFCA7C4B9FF6ED0F76671743E |
A000000524RuPay | F8 | 1024 bits | 03 | 93805BE12983421F47AA81162B146D113F1B4879 |
A000000524RuPay | F9 | 1536 bits | 03 | FD299A4E5B6692AFA87D3C185EC30C90B005E51D |
A000000524RuPay | FA | 1280 bits | 03 | 1454FA6E567150B512A0DFFCF3BBB5E80EF4F6FD |
A000000524RuPay | FE | 1152 bits | 03 | 77CA72F41C909B8D57EAA25169660D9392ABFBCD |
EMVCo Contact 52 keys
EMVCo test CA public keys for EMV contact Level 2 testing, across several RIDs. RIDs: A000000003, A000000004, A000000010, A000000025, A000000065, A000000152, A000000333, B000001234, B012345678.
| RID | Index | Size | Exponent | Checksum (SHA-1) |
|---|---|---|---|---|
A000000003Visa | 03 | 1152 bits | 03 | 3D7B6A188BBC655381E2F94C3F668C375FC677D8 |
A000000003Visa | F5 | 1984 bits | 010001 | 962280FF6365084F1C36679C8893A89FE3549795 |
A000000004Mastercard | 00 | 1152 bits | 03 | 1930D41F2E473A66609092312250567B0E9BF136 |
A000000004Mastercard | 01 | 1984 bits | 010001 | 0A86684ABB1B1CFDAFBDBBFE7D3C8C1C0AB10B10 |
A000000004Mastercard | 02 | 1792 bits | 03 | B3B772ECC867DB06731CDB434B2A923C4793EA98 |
A000000004Mastercard | 03 | 1024 bits | 010001 | 17742BB2037BEB0EEC48AC51FC1253768498D1F7 |
A000000004Mastercard | 04 | 1024 bits | 03 | D4630EA4240B42E98DB971EAE6FD6BEB25C22EC8 |
A000000004Mastercard | 05 | 1536 bits | 03 | ACF11AC7DA02EBD05EC9A650A83999089EB82252 |
A000000004Mastercard | F1 | 1408 bits | 03 | A426D3DE90301D16CF6B36397AC92E3B6DADC425 |
A000000004Mastercard | F3 | 1152 bits | 03 | A69AC7603DAF566E972DEDC2CB433E07E8B01A9A |
A000000004Mastercard | F5 | 1984 bits | 010001 | C2239804C8098170BE52D6D5D4159E81CE8466BF |
A000000004Mastercard | F6 | 1792 bits | 03 | 502909ED545E3C8DBD00EA582D0617FEE9F6F684 |
A000000004Mastercard | F7 | 1024 bits | 010001 | EEB0DD9B2477BEE3209A914CDBA94C1C4A9BDED9 |
A000000004Mastercard | F8 | 1024 bits | 03 | F06ECC6D2AAEBF259B7E755A38D9A9B24E2FF3DD |
A000000004Mastercard | F9 | 1536 bits | 03 | 336712DCC28554809C6AA9B02358DE6F755164DB |
A000000004Mastercard | FA | 1280 bits | 03 | 0ABCADAD2C7558CA9C7081AE55DDDC714F8D45F8 |
A000000004Mastercard | FE | 1152 bits | 03 | 1F69E2A4C3422AC58FB9C3A2B6C7B6C7B11B6704 |
A000000010Mastercard (former RID) | 00 | 1152 bits | 03 | A68164DC3AB6CE40FC98146D535D4C74C7B4264C |
A000000010Mastercard (former RID) | 01 | 1984 bits | 010001 | E6C19E3150344E1994C343A7650613803DBA67E5 |
A000000010Mastercard (former RID) | 02 | 1792 bits | 03 | E202535450D61D063BB42F7BA8912108A0230850 |
A000000010Mastercard (former RID) | 03 | 1024 bits | 010001 | 803F30371459318483169CD5D327396BD9AD9BDD |
A000000010Mastercard (former RID) | 04 | 1024 bits | 03 | 058B38F97408266991BA565BED2E5DD91A609533 |
A000000010Mastercard (former RID) | 05 | 1536 bits | 03 | 22109E835EC1C4ED9AF9D56CF56974C0C244334D |
A000000010Mastercard (former RID) | F8 | 1024 bits | 03 | 0F4488568CF8AFB0C12EC653CF7A04D2D46DCD34 |
A000000025American Express | F5 | 1984 bits | 010001 | C1BF4A8BD204590683E5D58B0C17EAB56DB04C7A |
A000000025American Express | F8 | 1024 bits | 03 | C28CEA80F489A1F08BD460FFB0BC3670CFA54AA7 |
A000000065JCB | 03 | 1152 bits | 03 | C01173DCF7D76EBD9553A7C0DE699E0023FE0BA7 |
A000000065JCB | F5 | 1984 bits | 010001 | 7F278D28BC5A40D13AAB6DBDA367ADF3E6F8F737 |
A000000065JCB | F8 | 1024 bits | 03 | 650E67BA1832F541CBBF7CB111FBD68D18784ACA |
A000000152Discover | 03 | 1152 bits | 03 | 60787F3A45EEE6E89EDE0BBE488D2C5B8994FFAE |
A000000152Discover | 95 | 1152 bits | 010001 | C38B760FC44D447E1AC1F533FA793BC825FE6184 |
A000000152Discover | 98 | 896 bits | 010001 | 781DFA94DCE959324D88F15DC3B3B554C53FAC00 |
A000000152Discover | 99 | 1024 bits | 010001 | DBF60EDF282B5FCACC8C7D679F32CD9429BDBD99 |
A000000152Discover | F5 | 1984 bits | 010001 | EF0CB709980074A522BFA6B650F99171BFDAA402 |
A000000333UnionPay | 03 | 1152 bits | 03 | 4C0763B5C0044AC943C02DB812C584C69F6AA09C |
A000000333UnionPay | 95 | 1152 bits | 010001 | 731A20E1364BCED34EE868FCC9847900933A0BFE |
A000000333UnionPay | 98 | 896 bits | 010001 | 4DEF50F80E3D30A8B6D3309842A675B0627349BC |
A000000333UnionPay | 99 | 1024 bits | 010001 | F060E5168087A8475BBC85D1AA0252488EE6AE61 |
A000000333UnionPay | F5 | 1984 bits | 010001 | 937D1A48AC51722966D2C27AF5F3771B96B53098 |
B000001234Test RID | 01 | 1024 bits | 03 | 5DC47171F7095F90A8F3EBDA754D79FAB92CB281 |
B012345678Test RID | 00 | 1152 bits | 03 | 77BEAAAB3B2882A145AF1BEDD5362F7DDE262401 |
B012345678Test RID | 01 | 1984 bits | 010001 | 8B44D19C7F08EACE53673FF35022B8DCEB81F8BC |
B012345678Test RID | 02 | 1792 bits | 03 | F2643490A1557467D9AE061C2F9DBDC07E49C023 |
B012345678Test RID | 03 | 1024 bits | 010001 | CC1ED9EAE94CBA5F9B6BA592CCEA0016521B02B4 |
B012345678Test RID | 04 | 1024 bits | 03 | 4292D9F806065CE52D6405035ED547CE5B83AA79 |
B012345678Test RID | 05 | 1536 bits | 03 | AA415F3D21915D1D890F3C68F287426A4C2E60C4 |
B012345678Test RID | F3 | 1152 bits | 03 | 13AAE850317805D1EA97453FE36057C57DD6528B |
B012345678Test RID | F5 | 1984 bits | 010001 | B6E5632C033B9ABEB9A886C9DA0BA94030432F2F |
B012345678Test RID | F6 | 1792 bits | 03 | BF152B66E733E30C6FA21286D380FB3AA382A786 |
B012345678Test RID | F7 | 1024 bits | 010001 | 0EED6BB907A65C11C918B519A3108345CE95E297 |
B012345678Test RID | F8 | 1024 bits | 03 | 7E0992EE6E7156F7D385C43BF30AA8CC8536F329 |
B012345678Test RID | F9 | 1536 bits | 03 | 8CF1DE8C1BE0ECF67F552CD788278302562B40B7 |
Contact or contactless: one set at a time
The EMVCo set is used to test EMV contact transactions. The Visa, Mastercard, American Express, Discover and RuPay sets are used to test EMV contactless kernels. The suites are separate, so some RID and index pairs exist in both with different keys: for example A000000004 index 00 in the Mastercard and EMVCo sets, or A000000152 index 99 in the Discover and EMVCo sets. A contact test card is certified with the EMVCo key, a contactless one with the payment system’s key. Load the set that matches the interface and test plan you are testing. In the ODA Debugger, loading a set replaces any saved key with the same RID and index.
JSON key file format
An open format for EMV CA public keys, easy to read, diff and load in any language. It holds the same information as a moka format record (DF A0 23), without padding or separate length fields.
{
"format": "emv-ca-public-keys",
"version": 1,
"description": "Mastercard test CA keys",
"interface": "contactless",
"keys": [
{
"rid": "A000000004",
"index": "F3",
"scheme": "Mastercard",
"environment": "test",
"hashAlgorithm": "01",
"keyAlgorithm": "01",
"modulus": "98F0C770F23864C2…",
"exponent": "03",
"checksum": "A69AC7603DAF566E…",
"expiry": "2030-12-31",
"comment": "1152 bits"
}
]
}
| Field | Required | Content |
|---|---|---|
format, version | Yes | Always "emv-ca-public-keys" and 1. |
description | No | Free text about the set. |
interface | No | "contact" or "contactless": the interface the set is meant for. Information only. |
rid | Yes | 5 bytes: the Registered Application Provider Identifier, the first 5 bytes of the AID. |
index | Yes | 1 byte: the CA Public Key Index, as the card gives it in tag 8F. |
modulus | Yes | The modulus only, without padding. Its length is the key size: 176 bytes is a 1408-bit key. |
exponent | Yes | The exponent exactly as the payment system defines it, usually 03 or 010001 (65537). Leading zeros are kept: a test key may encode 3 as 000003 on purpose, to check that a terminal handles it, and the checksum covers those bytes. |
hashAlgorithm, keyAlgorithm | No | The EMV indicators: 01 for SHA-1 and RSA, the default. |
checksum | No | SHA-1 of RID, index, modulus and exponent. When present, a tool checks it and rejects the key if it does not match. |
scheme, environment, expiry, comment | No | Information only, never used in a calculation. environment is "test" or "production", so a tool can warn when a production key is loaded into a test page. expiry is a date, YYYY-MM-DD. |
Rules: hex values are uppercase, without spaces, with an even number of digits. A key is identified by rid and index: two entries with the same pair in one file are an error. A file holding several sets uses "sets", an object of sets, instead of "keys", as in all.json.
Converting: the ODA Debugger imports both this JSON and moka format key files, and exports the keys saved in your browser in either format.
moka key file format
A moka key file is a text file of hexadecimal bytes holding one or more CA public key records. Each record is a TLV with the tag DF A0 23, and always has the same fixed size: 290 bytes of content.
| Field | Length | Content |
|---|---|---|
| Tag | 3 bytes | DF A0 23 |
| Length | 3 bytes | 82 01 22: 290 bytes follow |
| RID | 5 bytes | Registered Application Provider Identifier, for example A0 00 00 00 04 |
| Key index | 1 byte | CA Public Key Index, as in tag 8F |
| Hash algorithm indicator | 1 byte | 01 for SHA-1 (00 is accepted) |
| Public key algorithm indicator | 1 byte | 01 for RSA (00 is accepted) |
| Modulus length | 2 bytes | Length of the modulus in bytes, most significant byte first, for example 00 B0 for 176 bytes (1408 bits) |
| Modulus | 256 bytes | The modulus, padded on the right with 00 up to 256 bytes. Only the number of bytes given by the modulus length is used. |
| Exponent length | 1 byte | 01 or 03 |
| Exponent | 3 bytes | The exponent value starts in the first byte; unused bytes after it are 00. So 03 00 00 with length 1 is 3, and 01 00 01 with length 3 is 65537. A test key can also encode 3 as 00 00 03 with length 3, on purpose: the leading zeros are then part of the value. In JSON, exponent holds exactly the bytes the length covers: "03", "010001" or "000003". |
| Checksum | 20 bytes | SHA-1 of RID, index, modulus and exponent (each at its real length, without padding), or all 00 when not provided |
Reading rules: spaces, line breaks and the brackets around a record are ignored. A label line such as visa capk#1 before a record is skipped. Any number of records can follow each other, and one file can mix RIDs from several payment systems. If the same RID and index appear twice, the last record wins.
Common mistakes: a modulus length that does not match the modulus bytes (the modulus must end with an odd byte, and only zeros may follow it), a modulus area longer or shorter than 256 bytes, which shifts every field after it, and a checksum computed over the padded fields. Tools that check the checksum will reject such records.
Example (the start of the Visa set, modulus shortened):
visa capk#1 (A000000003 01, 1024 bits)
[ DF A0 23 82 01 22
A0 00 00 00 03
01
01
01
00 80
A1 F5 E1 C9 BD 86 50 BD … (128 bytes of modulus)
00 00 00 00 00 00 00 00 … (128 bytes of padding)
01
03 00 00
A8 76 35 E9 20 33 53 81 … (20 bytes of checksum)]
The moka files on this page are generated from the same data as the JSON files, with the checksums filled in. The ODA Debugger reads and writes both formats.