Giter Club home page Giter Club logo

emv-bertlv's Introduction

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):

    <dependency>
        <groupId>io.github.binaryfoo</groupId>
        <artifactId>emv-bertlv</artifactId>
        <version>0.1.8</version>
    </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:

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

For example to decode the Terminal Verification Results:

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:

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

emv-bertlv's People

Contributors

wcurrie avatar premek avatar kikju avatar wcurrietyro avatar samxkim avatar maciej7777 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.