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.

Test keys only. These keys verify test card certificates. They are not production keys and must never be loaded in a terminal used for live payments. Always check them against the keys listed in your own test plan: payment systems update test keys, and the same RID and index can hold a different key in another test suite.

Visa Contactless 6 keys

Visa test CA public keys for EMV contactless Level 2 testing. RID: A000000003.

RIDIndexSizeExponentChecksum (SHA-1)
A000000003Visa011024 bits03A87635E920335381A03FE30D1D75F3828D7F9929
A000000003Visa021024 bits010001938F42E3DA7B074A2E9D13FA2CA6EDB12E3EAC15
A000000003Visa031408 bits03A5905811349D8D0DCD9A3EA35043831C75DEEDF8
A000000003Visa041984 bits0389AE86A4FDC6D4914C09774BAD1F05C5E9F469B5
A000000003Visa051600 bits031BAE1059ACBC39DA1E3939F78BC56DFCB7008540
A000000003Visa511152 bits03B9D248075A3F23B522FE45573E04374DC4995D71

Mastercard Contactless 19 keys

Mastercard test CA public keys for EMV contactless Level 2 testing, with the dummy RID B012345678. RIDs: A000000004, B012345678.

RIDIndexSizeExponentChecksum (SHA-1)
A000000004Mastercard001280 bits03EC0A59D35D19F031E9E8CBEC56DB80E22B1DE130
A000000004Mastercard051024 bits0353D04903B496F59544A84309AF169251F2896874
A000000004MastercardEF1984 bits0321766EBB0EE122AFB65D7845B73DB46BAB65427A
A000000004MastercardF11408 bits03D8E68DA167AB5A85D8C3D55ECB9B0517A1A5B4BB
A000000004MastercardF31152 bits03A69AC7603DAF566E972DEDC2CB433E07E8B01A9A
A000000004MastercardF41408 bits03BF6B5B9C47134E494571732A4903C935874682B9
A000000004MastercardF51984 bits010001C2239804C8098170BE52D6D5D4159E81CE8466BF
A000000004MastercardF61792 bits03502909ED545E3C8DBD00EA582D0617FEE9F6F684
A000000004MastercardF71024 bits010001EEB0DD9B2477BEE3209A914CDBA94C1C4A9BDED9
A000000004MastercardF81024 bits03F06ECC6D2AAEBF259B7E755A38D9A9B24E2FF3DD
A000000004MastercardF91536 bits03336712DCC28554809C6AA9B02358DE6F755164DB
A000000004MastercardFA1152 bits035BED4068D96EA16D2D77E03D6036FC7A160EA99C
B012345678Test RID001280 bits035D2970E64675727E60460765A8DB75342AE14783
B012345678Test RID021536 bits03294BE20239AB15245A63BEA46CC6C175A25562D1
B012345678Test RID051024 bits03B9A1D65CAFE06B054EDD7EA82597AB85F130E663
B012345678Test RIDF11408 bits03FDEE82458A34C0DE4AC2AFC98B2774E7383B062F
B012345678Test RIDF31024 bits0100015694B0D278481814A05E12B558CEC1234865AA5D
B012345678Test RIDF71152 bits03F78113E860F030A872923FCE93E3381C77A42A30
B012345678Test RIDF81536 bits0366469C88E7DC111529C7D379D7938C8DF3E4C25E

American Express Contactless 8 keys

American Express test CA public keys for EMV contactless Level 2 testing. RID: A000000025.

RIDIndexSizeExponentChecksum (SHA-1)
A000000025American Express011024 bits034C3681CD1D207B2BDC6E4DD5E33657F356496994
A000000025American Express021024 bits010001AECCAD45A2E189E30CB3CAE8FFEEB3432C23D5AC
A000000025American Express031280 bits035479CA9E9A89EB4815F348C487553C1F45AB7AC1
A000000025American Express041536 bits03A8E8D35474958BB57CD9E0DCEEFF381F0B7E0AB3
A000000025American Express051792 bits03B43A837DD523785CEA963195CA8A58D1FD70D32D
A000000025American Express061984 bits035EDE89510DED5FCC1824A08438327066B519FCF3
A000000025American Express071008 bits035DC21CFD0B4348E8F374ECD71406580DA62A4068
A000000025American Express091408 bits0379896BD7B076C4F94AFF0B063A73861A593413F5

Discover Contactless 5 keys

Discover test CA public keys for EMV contactless Level 2 testing. RID: A000000152.

RIDIndexSizeExponentChecksum (SHA-1)
A000000152Discover5C1408 bits0360154098CBBA350F5F486CA31083D1FC474E31F8
A000000152Discover5D1984 bits03B51EC5F7DE9BB6D8BCE8FB5F69BA57A04221F39B
A000000152Discover601408 bits0100013C87633034BC2A6D524217796D9D673B9EEF8293
A000000152Discover611984 bits010001CEE7336ED255051ABCCAB8070250E81AC828CF65
A000000152Discover991024 bits034C61B10E3FD67D25881378192C4C336D8ACC9B7F

RuPay Contactless 16 keys

RuPay test CA public keys for EMV contactless Level 2 testing. RID: A000000524.

RIDIndexSizeExponentChecksum (SHA-1)
A000000524RuPay001152 bits038A75D59FA254DEA252CD99635ADE6E53C07CA7FE
A000000524RuPay011984 bits01000160F8ACB74EF90A3E7FA8FBCB4C20C3E144393216
A000000524RuPay021792 bits037F29D6CEB2ED02818E2F3609F9955F2719FC1F03
A000000524RuPay031024 bits010001C9F88AAABA4EA83587795B41E32E59E0DC547CFC
A000000524RuPay041024 bits0386374E7EB71D93352F1EED2AC71171CF4418ADFF
A000000524RuPay051536 bits034B45A68F5B85A296A43DA5400BC2914C7C22CF5E
A000000524RuPay061024 bits000003D26FECF91D843158CA32D3BFFBCCA841C2AF9283
A000000524RuPayF11408 bits0373AC3C95D7BB6F638D944EEFCA64C618C5CFF610
A000000524RuPayF31152 bits03B1B355F5A648FBB24C2BC830E9E366AAA9DA2129
A000000524RuPayF51984 bits010001C636CB5F022947E6F3EF594FC1D58F13C9D04BE8
A000000524RuPayF61792 bits0395C817D4C1904EE7E7720C532728A9B420E4542A
A000000524RuPayF71024 bits010001402D7A51495DD7FBFCA7C4B9FF6ED0F76671743E
A000000524RuPayF81024 bits0393805BE12983421F47AA81162B146D113F1B4879
A000000524RuPayF91536 bits03FD299A4E5B6692AFA87D3C185EC30C90B005E51D
A000000524RuPayFA1280 bits031454FA6E567150B512A0DFFCF3BBB5E80EF4F6FD
A000000524RuPayFE1152 bits0377CA72F41C909B8D57EAA25169660D9392ABFBCD

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.

RIDIndexSizeExponentChecksum (SHA-1)
A000000003Visa031152 bits033D7B6A188BBC655381E2F94C3F668C375FC677D8
A000000003VisaF51984 bits010001962280FF6365084F1C36679C8893A89FE3549795
A000000004Mastercard001152 bits031930D41F2E473A66609092312250567B0E9BF136
A000000004Mastercard011984 bits0100010A86684ABB1B1CFDAFBDBBFE7D3C8C1C0AB10B10
A000000004Mastercard021792 bits03B3B772ECC867DB06731CDB434B2A923C4793EA98
A000000004Mastercard031024 bits01000117742BB2037BEB0EEC48AC51FC1253768498D1F7
A000000004Mastercard041024 bits03D4630EA4240B42E98DB971EAE6FD6BEB25C22EC8
A000000004Mastercard051536 bits03ACF11AC7DA02EBD05EC9A650A83999089EB82252
A000000004MastercardF11408 bits03A426D3DE90301D16CF6B36397AC92E3B6DADC425
A000000004MastercardF31152 bits03A69AC7603DAF566E972DEDC2CB433E07E8B01A9A
A000000004MastercardF51984 bits010001C2239804C8098170BE52D6D5D4159E81CE8466BF
A000000004MastercardF61792 bits03502909ED545E3C8DBD00EA582D0617FEE9F6F684
A000000004MastercardF71024 bits010001EEB0DD9B2477BEE3209A914CDBA94C1C4A9BDED9
A000000004MastercardF81024 bits03F06ECC6D2AAEBF259B7E755A38D9A9B24E2FF3DD
A000000004MastercardF91536 bits03336712DCC28554809C6AA9B02358DE6F755164DB
A000000004MastercardFA1280 bits030ABCADAD2C7558CA9C7081AE55DDDC714F8D45F8
A000000004MastercardFE1152 bits031F69E2A4C3422AC58FB9C3A2B6C7B6C7B11B6704
A000000010Mastercard (former RID)001152 bits03A68164DC3AB6CE40FC98146D535D4C74C7B4264C
A000000010Mastercard (former RID)011984 bits010001E6C19E3150344E1994C343A7650613803DBA67E5
A000000010Mastercard (former RID)021792 bits03E202535450D61D063BB42F7BA8912108A0230850
A000000010Mastercard (former RID)031024 bits010001803F30371459318483169CD5D327396BD9AD9BDD
A000000010Mastercard (former RID)041024 bits03058B38F97408266991BA565BED2E5DD91A609533
A000000010Mastercard (former RID)051536 bits0322109E835EC1C4ED9AF9D56CF56974C0C244334D
A000000010Mastercard (former RID)F81024 bits030F4488568CF8AFB0C12EC653CF7A04D2D46DCD34
A000000025American ExpressF51984 bits010001C1BF4A8BD204590683E5D58B0C17EAB56DB04C7A
A000000025American ExpressF81024 bits03C28CEA80F489A1F08BD460FFB0BC3670CFA54AA7
A000000065JCB031152 bits03C01173DCF7D76EBD9553A7C0DE699E0023FE0BA7
A000000065JCBF51984 bits0100017F278D28BC5A40D13AAB6DBDA367ADF3E6F8F737
A000000065JCBF81024 bits03650E67BA1832F541CBBF7CB111FBD68D18784ACA
A000000152Discover031152 bits0360787F3A45EEE6E89EDE0BBE488D2C5B8994FFAE
A000000152Discover951152 bits010001C38B760FC44D447E1AC1F533FA793BC825FE6184
A000000152Discover98896 bits010001781DFA94DCE959324D88F15DC3B3B554C53FAC00
A000000152Discover991024 bits010001DBF60EDF282B5FCACC8C7D679F32CD9429BDBD99
A000000152DiscoverF51984 bits010001EF0CB709980074A522BFA6B650F99171BFDAA402
A000000333UnionPay031152 bits034C0763B5C0044AC943C02DB812C584C69F6AA09C
A000000333UnionPay951152 bits010001731A20E1364BCED34EE868FCC9847900933A0BFE
A000000333UnionPay98896 bits0100014DEF50F80E3D30A8B6D3309842A675B0627349BC
A000000333UnionPay991024 bits010001F060E5168087A8475BBC85D1AA0252488EE6AE61
A000000333UnionPayF51984 bits010001937D1A48AC51722966D2C27AF5F3771B96B53098
B000001234Test RID011024 bits035DC47171F7095F90A8F3EBDA754D79FAB92CB281
B012345678Test RID001152 bits0377BEAAAB3B2882A145AF1BEDD5362F7DDE262401
B012345678Test RID011984 bits0100018B44D19C7F08EACE53673FF35022B8DCEB81F8BC
B012345678Test RID021792 bits03F2643490A1557467D9AE061C2F9DBDC07E49C023
B012345678Test RID031024 bits010001CC1ED9EAE94CBA5F9B6BA592CCEA0016521B02B4
B012345678Test RID041024 bits034292D9F806065CE52D6405035ED547CE5B83AA79
B012345678Test RID051536 bits03AA415F3D21915D1D890F3C68F287426A4C2E60C4
B012345678Test RIDF31152 bits0313AAE850317805D1EA97453FE36057C57DD6528B
B012345678Test RIDF51984 bits010001B6E5632C033B9ABEB9A886C9DA0BA94030432F2F
B012345678Test RIDF61792 bits03BF152B66E733E30C6FA21286D380FB3AA382A786
B012345678Test RIDF71024 bits0100010EED6BB907A65C11C918B519A3108345CE95E297
B012345678Test RIDF81024 bits037E0992EE6E7156F7D385C43BF30AA8CC8536F329
B012345678Test RIDF91536 bits038CF1DE8C1BE0ECF67F552CD788278302562B40B7

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"
    }
  ]
}
FieldRequiredContent
format, versionYesAlways "emv-ca-public-keys" and 1.
descriptionNoFree text about the set.
interfaceNo"contact" or "contactless": the interface the set is meant for. Information only.
ridYes5 bytes: the Registered Application Provider Identifier, the first 5 bytes of the AID.
indexYes1 byte: the CA Public Key Index, as the card gives it in tag 8F.
modulusYesThe modulus only, without padding. Its length is the key size: 176 bytes is a 1408-bit key.
exponentYesThe 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, keyAlgorithmNoThe EMV indicators: 01 for SHA-1 and RSA, the default.
checksumNoSHA-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, commentNoInformation 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.

FieldLengthContent
Tag3 bytesDF A0 23
Length3 bytes82 01 22: 290 bytes follow
RID5 bytesRegistered Application Provider Identifier, for example A0 00 00 00 04
Key index1 byteCA Public Key Index, as in tag 8F
Hash algorithm indicator1 byte01 for SHA-1 (00 is accepted)
Public key algorithm indicator1 byte01 for RSA (00 is accepted)
Modulus length2 bytesLength of the modulus in bytes, most significant byte first, for example 00 B0 for 176 bytes (1408 bits)
Modulus256 bytesThe modulus, padded on the right with 00 up to 256 bytes. Only the number of bytes given by the modulus length is used.
Exponent length1 byte01 or 03
Exponent3 bytesThe 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".
Checksum20 bytesSHA-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.