Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8911415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:56:14+00:00 2026-06-15T03:56:14+00:00

I intend to parse BER-TLV format from smart card response to interpret the data.

  • 0

I intend to parse BER-TLV format from smart card response to interpret the data.

it similar like JACCAL, but in Objective-C or C++

Can anyone give reference any open source project or any reference to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:56:15+00:00Added an answer on June 15, 2026 at 3:56 am

    Here is a project decode the ASN.1 BER format.
    https://github.com/chrisridd/asn1-dump/

    main logic located in this file:
    https://github.com/chrisridd/asn1-dump/blob/master/berd.m

    And if have enough time, it’s not hard to write you own decoder after you read the standard:
    http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
    http://luca.ntop.org/Teaching/Appunti/asn1.html

    decode flow is like this:
    read in Tag, Length, Value sequence.

    • From Tag you will get

      • Data Class, usually be Universal(predefined type in standard like “Boolean”,”Sequence”…)
        and context-specific (to distinguish different field with same type).
      • Primitive (like boolean and integer) or Constructed (usually is sequence).
        because constructed type can contains Primitive or Constructed type.
        maybe need recursive decoding.
      • Tag Number, determine data types (boolean? integer? bitstring?)
    • Length:

      • determine length of the contents to decode into (maybe need recursively decoding).
      • length has two form (short and long). you’d better support both.
    • Value: the real value to read in current TLV level.
      if this is a constructed data(like sequence), the Value will contains internal level of TLV.

    In the end of standard (http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf) there is an image shows multiple level TLV, maybe can better help you to understand BER.

    After you read the standards, the best way is:
    1) find some GUI viewer to look some BER Certificate file, to get familar with it. google “ASN.1 viewer” to find.
    2) start to look the code https://github.com/chrisridd/asn1-dump/blob/master/berd.m

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code straight from Google's dev guide: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(market://details?id=com.example.android));
I intend to build a RESTful service which will return a custom text format.
I am attempting to parse a string in Perl with the format: Messages pushed
So, I have a JSON string, and I intend to parse it, and alert
I'm writing a Python script to parse some data. At the moment I'm trying
I have some random HTML and I used BeautifulSoup to parse it, but in
I'm trying to parse a simple grammar using an LALR(1) parser generator (Bison, but
I'm developing a widget for my app and I'd like to pass specific data
In my app I have to download JSON data from numerous web services. The
import android.content.Intent; import android.net.*; public class ignitionClass { Intent dialI = new Intent(Intent.ACTION_CALL, Uri.parse(tel:610-970-1218));

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.