Git Product home page Git Product logo

Comments (2)

wcurrie avatar wcurrie commented on July 27, 2024

Fixed by d49a180#diff-9c354da30936a2dab18e233b468f309b

I used your example as a test case, which now passes.

I guess some cards use values 0x85-0xFF in the length byte to encode lengths of 133-255 bytes. In your example that's 0x91 = 145 bytes. The code was interpreting that as a length encoded in 17 bytes. Which also isn't valid..

One spec mentions 0x91 in the first length byte is invalid http://www.embedx.com/pdfs/ISO_STD_7816/info_isoiec7816-4%7Bed21.0%7Den.pdf

In ISO/IEC 7816, the values '80' and '85' to 'FF' are invalid for the first byte of length fields.

I guess either there's a different spec or what's actually in production defines what's valid 😄. Either way it now parses.

from emv-bertlv.

wcurrie avatar wcurrie commented on July 27, 2024

Now works here too http://tvr-decoder.appspot.com/t/decode/constructed/EMV/709157134761739001010119D22122011143804400000F5F201A5541542041544D2F5465737420436172642030352020202020205F300202019F1F183131343338303434303030303030303030303030303030309F080200969F4401028C159F02069F03069F1A0295055F2A029A039C019F37048D178A029F02069F03069F1A0295055F2A029A039C019F37049F49039F3704

Thanks for the report

from emv-bertlv.

Related Issues (7)

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.