项目作者: binaryfoo

项目描述 :
Deciphering EMV data encoded in the not so basic "basic encoding rules".
高级语言: Kotlin
项目地址: git://github.com/binaryfoo/emv-bertlv.git
创建时间: 2014-09-24T09:48:31Z
项目社区:https://github.com/binaryfoo/emv-bertlv

开源协议:MIT License

下载


What is this thing?

A library for deciphering BER TLV data used in EMV (chip card transactions).

You might be wondering what some of the strange characters on a credit card receipt mean. Or you might be trying to achieve certification with Visa, Mastercard or Amex (perhaps even UnionPay).

The tests provide some idea of what kind of data this code can decipher. The EMVCo website has the full (1000+ page) specs. Add to that the Visa, Mastercard and Amex documents.

How might I use it?

In a couple of ways:

  1. As a library in a java (or other JVM language) project doing wonderful things with chip card data.
  2. On the web in a little tool. The code for this tool lives in another repo.
  3. As a command line tool.

From Maven or Gradle

Dependency Information (available from Maven Central):

  1. <dependency>
  2. <groupId>io.github.binaryfoo</groupId>
  3. <artifactId>emv-bertlv</artifactId>
  4. <version>0.1.8</version>
  5. </dependency>

To get started decoding call decode() on RootDecoder.

Command Line

The library can be used as an executable jar:

  1. Download the latest jar
  2. Run using java -jar emv-bertlv-x.y.z-shaded.jar

This will dump out some (hopefully) somewhat helpful help output:

  1. Usage Main <decode-type> <value> [<tag-set>]
  2. <decode-type> is one of
  3. 95: TVR
  4. 9B: TSI
  5. 82: AIP
  6. 8E: CVM List
  7. 9F34: CVM Results
  8. 9F6C: CTQ
  9. 9F66: TTQ
  10. dol: DOL
  11. filled-dol: Filled DOL
  12. constructed: TLV Data
  13. apdu-sequence: APDUs
  14. bit-string: Bits
  15. <value> is the hex string or '-' for standard input
  16. <tag-set> is one of [EMV, qVSDC, MSD, Amex] defaults to EMV

For example to decode the Terminal Verification Results:

  1. java -jar emv-bertlv-x.y.z-shaded.jar 95 ffffffffff

Or say you have a file containing a set of APDUs encoded as hex strings:

  1. cat apdus.txt | java -jar emv-bertlv-x.y.z-shaded.jar apdu-sequence -

Domain Knowledge

Visa’s chip terms explained document is a good list.

Eftlab’s knowledge base.

Alternative Tools

Eftlab’s BP-Tools

Emvlab’s tlvtool