Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

 TUCoPS :: Crypto :: crackean.txt Cracking the EAN Barcode System

-=-=-<< Cracking the EAN Barcode System by Moe1

The EAN or European Article Number System Barcode has 13 values, making
it easy to spot. Value 1 is situated outside the "left hand side"
border. Together with the second digit, it tells us the origin of the
product. Values from 3-12 give's us the article code. And value 13 is a
checksum which checks  the validity of all the other numbers.

The checksum is calculated as follows:

1. Add all the odd position numbers except the last digit (1+3+5+7+9+11)

2. Add all the even position numbers (2+4+6+8+10) and multiply the
answer by 3. (Note that we are leaving out the last digit, which is
our checksum)

4. We divide the sum of 1 and 2 by the number 10 and if the remainder is
not zero, then we substract the remainder from 10 and this should
give us our last positioned number.

Once the checksum is done, we know that the barcode is valid.

Now on to the lines (yeah doze pesky lines above the values)

Note: 7 lines make's up 1 value.

There are 3 graphic codes that are used and we have 2 groups of values
as explained above. From those 3 graphic codes, 2 codes (A,B) are used
in the first group of values and code (C) is used in the second group of
values. Below shows us the different graphic code that makes up the
different numbers of the values. Take notice of the different lines.

BLACK LINE REPRESENTED BY 1
WHITE SPACE REPRESENTED BY 0
CODE A            CODE B            CODE C
if code A were: | if code B were: | if code C were:
0 ----> 0001101 | 0 ----> 0100111 | 0 ----> 1110010
1 ----> 0011001 | 1 ----> 0110011 | 1 ----> 1100110
2 ----> 0010011 | 2 ----> 0011011 | 2 ----> 1101100
3 ----> 0111101 | 3 ----> 0100001 | 3 ----> 1000010
4 ----> 0100011 | 4 ----> 0011101 | 4 ----> 1011100
5 ----> 0110001 | 5 ----> 0111001 | 5 ----> 1001110
6 ----> 0101111 | 6 ----> 0000101 | 6 ----> 1010000
7 ----> 0111011 | 7 ----> 0010001 | 7 ----> 1000100
8 ----> 0110111 | 8 ----> 0001001 | 8 ----> 1001000
9 ----> 0001011 | 9 ----> 0010111 | 9 ----> 1110100

NOTE: only in group 1 are CODE A & B used, in group 2 it's all CODE C.
So look at group 1 and identify which CODE forms the number.

EXAMPLE:

I buy a Sunday Times Newspaper, and I look at the bottom of the front
page and see a nice little barcode. Due to my curiosity I wanna know how
that shit works so I decide I wanna try and crack that scheme those
newspaper boys use.

First I look at the numbers and find that there are 13 numbers (9 770039
533008) immediately I know that they are using the EAN system.

Since I know how to crack this system, its no problem. I first do a
checksum to see if any screws up occur...
9+7+0+9+3+0 = 28
(7+0+3+5+3+0) x 3 = 54
28+54 = 82
82 divided by 10 = 8 remainder 2
10 - 2 = 8 = CHECKSUM (value 12 or 13th position no. in barcode)

Ok Checksum done.

Now we see what makes up 770039 and we find that its the code pattern:

ABBABA

And our code pattern for 533008 is: CCCCCC (check and see the lines
would be exactly the same as the lines in CODE C)

Right so we know:

BARCODE: 9 770039 533008
977 tells us its a book or some sort of reading material
770039 is ABBABA and 533008 is CCCCCC
and our checksum is 8

I took the Sunday Times Newspaper for an example because it seems it's
the easiest to do. If you still dont understand how barcodes can be of
any assistance to you then "ERM" think harder. < Wyze1: Amonst a couple
of other things - Think IDs >

Bye!

Moe1 (moe1@mailbox.co.za)

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).