# Naked Science Forum

## Non Life Sciences => Technology => Topic started by: paul.fr on 25/01/2008 15:20:48

Title: How much data can a magnetic strip on a credit card hold?
Post by: paul.fr on 25/01/2008 15:20:48
What are they? 10x1cm!
So how much data could they hold?
Title: How much data can a magnetic strip on a credit card hold?
Post by: JimBob on 30/01/2008 02:35:21
I don't know about a magnetic strip but there are cards with microchips than can hold a complete medical history, including some x-rays, CAT scans, etc.

A lot of Sh*t.
Title: How much data can a magnetic strip on a credit card hold?
Post by: paul.fr on 30/01/2008 02:38:35
Thanks Jim, thought i was talking to myself for a while there....
Title: How much data can a magnetic strip on a credit card hold?
Post by: another_someone on 30/01/2008 14:30:29
Sorry, I meant to look at this earlier, but it slipped through.

Magnetic striped cards are now falling out of favour because they are far too easy to clone, but here is the standard as it was:

http://money.howstuffworks.com/question503.htm
Quote
There are three tracks on the magstripe. Each track is .110-inch wide. The ISO/IEC standard 7811, which is used by banks, specifies:

* Track one is 210 bits per inch (bpi), and holds 79 six-bit plus parity bit read-only characters.
* Track two is 75 bpi, and holds 40 four-bit plus parity bit characters.
* Track three is 210 bpi, and holds 107 four-bit plus parity bit characters.

Your credit card typically uses only tracks one and two. Track three is a read/write track (that includes an encrypted PIN, country code, currency units, amount authorized), but its usage is not standardized among banks.

The information on track one is contained in two formats -- A, which is reserved for proprietary use of the card issuer, and B, which includes the following:

• Start sentinel -- 1 character
• Format code="B" -- 1 character (alpha only)
• Primary account number -- up to 19 characters
• Separator -- 1 character
• Country code -- 3 characters
• Name -- 2-26 characters
• Separator -- 1 character
• Expiration date or separator -- 4 characters or 1 character
• Discretionary data -- enough characters to fill out maximum record length (79 characters total)
• End sentinel -- 1 character
• Longitudinal Redundancy Check (LRC), a form of computed check character -- 1 character

The format for track two, developed by the banking industry, is as follows:

• Start sentinel -- 1 character
• Primary account number - up to 19 characters
• Separator -- 1 character
• Country code -- 3 characters
• Expiration date or separator -- 4 characters or 1 character
• Discretionary data -- enough characters to fill out maximum record length (40 characters total)
• LRC -- 1 character

Title: How much data can a magnetic strip on a credit card hold?
Post by: techmind on 02/02/2008 00:08:43
What are they? 10x1cm!
So how much data could they hold?
For more information than you ever wanted to know, see the internet text "A day in the life of a flux reversal", e.g. at http://www.phrack.org/issues.html?issue=37&id=6

The low-density stripe on a cashpoint card typically contains the 16-digit card number, plus another 18-ish numerical digits (including expiry date) - all in the clear (unencrypted).

The high-density (210bpi) track on a cashpoint or credit card contains the name of the holder (26 letters max), and the account/card number and expiry date, again in plain (unencrypted) alphanumeric text.

You can buy card readers very cheaply now, but many years ago I rigged an old tape-head from a Walkman to the microphone input of my PC, and wrote software to decode the signals just to see what was there. Reliability wasn't great, but it did work!

Standard train tickets (BR and London Underground) use a low-density (presumably 75bpi) track, and have 168 bits, including a fixed 4-bit start and 4-bit end pattern. BR tickets are very logical (start station 4-digit National Location Code, destination station 4-digit code, validity date, type sgl/rtn, railcard, ... time+date of sale etc), and I could infer the meaning of about 70% of the data. Underground tickets made no sense at all - maybe encrypted?
Title: How much data can a magnetic strip on a credit card hold?
Post by: neilep on 02/02/2008 02:54:16
Could a magnetic strip hold a few seconds of video and audio when swiped over a revolving video cassette head ?
Title: How much data can a magnetic strip on a credit card hold?
Post by: another_someone on 02/02/2008 03:23:29
Could a magnetic strip hold a few seconds of video and audio when swiped over a revolving video cassette head ?

Just looking at the raw data capacity (ignoring the limitations of formatting), the credit card is holding 3 tracks (you could probably fit a 4th) on 3.62 inches in length, at 210bpi (we'll be generous, and assume the track running at 75bpi could record at 210bpi if it had too).  That is 4 x 210 x 3.62 = 3.04kb (being ultra generous).

1 second of raw sound (ignoring video) takes about 700kb.  With MP3 you can get down to 48kb per second (still an order of magnitude greater than the 3kb theoretical limit we are dealing with), but you also have to remember that mp3 has a minimum sample length, and additional overheads.  If one ignored these limitations, you would be talking about 62 milliseconds of sound.
Title: How much data can a magnetic strip on a credit card hold?
Post by: techmind on 03/02/2008 00:11:41
Could a magnetic strip hold a few seconds of video and audio when swiped over a revolving video cassette head ?

The standard for magstripe cards involves an eighth-inch wide track, and a low recording density. A standard VHS video track (let's keep it simple, forget about digital wizardry) is only 19um wide, and uses a helical scan with a stripe just under 4" long (about the same as a credit card stripe)... therefore in principle you could record about 668 video fields on a similarly-sized piece of videotape, equivalent to just over ten seconds of recording.

Edit: this doesn't "feel" right - especially not with a roughly 1-inch per second linear tape speed. Where have I gone wrong?
Title: How much data can a magnetic strip on a credit card hold?
Post by: another_someone on 03/02/2008 06:52:31
The standard for magstripe cards involves an eighth-inch wide track, and a low recording density. A standard VHS video track (let's keep it simple, forget about digital wizardry) is only 19um wide, and uses a helical scan with a stripe just under 4" long (about the same as a credit card stripe)... therefore in principle you could record about 668 video fields on a similarly-sized piece of videotape, equivalent to just over ten seconds of recording.

Edit: this doesn't "feel" right - especially not with a roughly 1-inch per second linear tape speed. Where have I gone wrong?

Ignoring the fact that the tape on the back of a credit card was never designed to hold 19μm wide tracks, and would certainly have enormous crosstalk problems if you tried, I am still not sure where you get the 668 video fields from (but then, I don't say I know enough about video encoding know what the numbers should be).

If one assumes the mag stripe on the back of a video card is about 5mm wide (sounds reasonable, but have not measured it), that would allow for 263 tracks with 19μm centre to centre (not allowing anything for track separation).  Are you suggesting that 4" of track length is equal to one video frame?  Then we should be talking about slightly under 263 frames (because we only have 3.62" per track, not 4"), which, at 25 frames per second, is about 10 seconds.

That is using video tape instead of the mag stripe.  One major difference is that the mag stripe is on a hard backing, with only a single point of contact, whereas video tape is wrapped around the head (this is in part to allow the head to spin, and so create the helical tracks, which we were not assuming were being used in our scenario - but is also gives a closer contact between the mag tape and the head, so allowing higher definition of the magnetic field, and this is not even taking into account the very different magnetic properties of the different recording materials).
Title: How much data can a magnetic strip on a credit card hold?
Post by: techmind on 04/02/2008 23:23:05
Ignoring the fact that the tape on the back of a credit card was never designed to hold 19μm wide tracks, and would certainly have enormous crosstalk problems if you tried, I am still not sure where you get the 668 video fields from (but then, I don't say I know enough about video encoding know what the numbers should be).

Yes - your approach is much as mine. The magstripe on a standard credit-card is half an inch wide (12.7mm). In an analog video recorder you record one "field" (either all-odd or all-even lines) per swipe of the head. A pair of fields make a frame. 12.7mm wide tape with 19um tracks gives 668 tracks, 668 fields (at 50Hz) -- 334 frames (at 25Hz) - just over ten seconds.
There's something of an approximation there that the tracks are recorded at approximately a 5degree angle, so you'd really need a parallelogram-shaped piece of tape to squeeze them in optimally!

As you say, a piece of high-grade video tape wrapped around a precision head drum is a very different case to a piece of flat tape embedded in a stiff card, and probably covered with a thick yet durable protective coating. You wouldn't get that data density on a real plastic card!