Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Discretionary data from magnetic strip credit card, how to parse?

Tags:

credit-card

according to wiki, the Discretionary data —

may include Pin Verification Key Indicator (PVKI, 1 character), PIN Verification Value (PVV, 4 characters), Card Verification Value or Card Verification Code (CVV or CVC, 3 characters)

This means that it's not guaranteed that I would always be able to get the CVC, which is a problem for me. I was able to use an existing implementation to parse my credit card stripe and got a bunch of numbers for the discrepdata. I'm not sure exactly how to interpret exactly. Since its more than 8 chars and does not match my cvc, or pin number.

It looks like(numbers are random, but the padded 0's are the same): 0000031200100

What does this mean?

like image 530
mugetsu Avatar asked Sep 02 '12 21:09

mugetsu


People also ask

How do I decode magstripe data?

The fastest way to decode it is to run the data through ID TECH's free Parsomatic tool, which is an HTML form that can render all the pieces of data in an intelligible fashion. Every card reader has its own proprietary way of representing card data.

What data is on the magnetic stripe of a credit card?

These tracks contain the credit card account number, name, expiration date, service code, and card verification code. Credit cards primarily or exclusively use the first two tracks. The third track sometimes contains additional information such as a country code or currency code.

What is the discretionary data for Mastercard?

Card Restrictions Codes After this is what is known as the “discretionary data” on the card. This could store the card's PIN #, a code that can be used to check the PIN, or other information. Discretionary data is optional, but it can contain a CVC1 code.

How is information stored in magnetic strips in ATM cards and credit cards?

Data are stored on the magnetic band to be retrieved later by a card reader. This magstripe can be compared to a piece of cassette tape that is fastened to the back of the card. Swiping the card through a magnetic reader provides the motion needed so that the information on the tape can be read.


1 Answers

You shouldn't use the discretionary data. It is (as it's name implies) entirely optional. Some card schemes simply don't use it at all, and within the schemes that do allow it, most card issuers do not use it. Where it is used you'll find differences in how it is populated, both between card schemes and potentially between card issuers.

Further, the CVC that is on the mag stripe is actually a CVC1 code, which only attempts to verify that the mag stripe details have not been tampered/corrupted. It is not the same as the CVC code printed onto the back of the card.

The CVC that is printed onto the card is (by design) intended to be viewed with eyes only.

like image 190
PaulG Avatar answered Sep 28 '22 10:09

PaulG