ID Barcodes: Difference between revisions
(Created page with "BACON's user search system is capable of scanning the barcodes on the back of many types of ID cards. We use Barcode Scanners#Symbol DS6707-SR 2D Scanners|Symbol DS6707...") |
(add detail on AAMVA codes) |
||
Line 1: | Line 1: | ||
[[BACON]]'s user search system is capable of scanning the barcodes on the back of many types of ID cards. We use [[Barcode Scanners#Symbol DS6707-SR 2D Scanners|Symbol DS6707 | [[BACON]]'s user search system is capable of scanning the barcodes on the back of many types of ID cards. We use [[Barcode Scanners#Symbol DS6707-SR 2D Scanners|Symbol DS6707 scanners]], which connect to the registration terminal as a USB keyboard and simply type the barcode data into the search box. JavaScript on the client recognizes and intercepts the barcode input, extracts the relevant fields, and enters a search query in the box. Since only the relevant fields are extracted and everything else is discarded client-side we neatly side-step most of the privacy concerns inherent in scanning IDs. | ||
We support several distinct types of ID cards, detailed below. | We support several distinct types of ID cards, detailed below. | ||
== US & Canadian DL/ID Cards == | |||
Driver | [[File:Nevada_DL_2008_Front.png|thumb|Nevada Driver License Exemplar (Front)]] | ||
[[File:Nevada_DL_2008_Back.png|thumb|Nevada Driver License Exemplar (Back)]] | |||
Driver Licenses and ID Cards issued in the United States and Canada are standardized by the [http://www.aamva.org/about-aamva/ The American Association of Motor Vehicle Administrators (AAMVA)]. Among many other features, their [http://www.aamva.org/DL-ID-Card-Design-Standard/ Card Design Standard] specifies the presence and format of the barcode on the back of all compliant cards. Here's a hex dump of what you get when you scan the example card at right: | |||
<pre style="max-height: 8em; overflow-y: auto;"> | |||
0000000 40 0a 1e 0a 41 4e 53 49 20 36 33 36 30 34 39 30 >@...ANSI 6360490< | |||
0000020 33 30 30 30 32 44 4c 30 30 34 31 30 34 36 36 5a >30002DL00410466Z< | |||
0000040 4e 30 35 30 37 30 30 35 37 44 4c 44 43 41 42 43 >N05070057DLDCABC< | |||
0000060 44 45 0a 44 43 42 42 43 44 45 46 4a 4b 4c 4d 57 >DE.DCBBCDEFJKLMW< | |||
0000100 0a 44 43 44 48 4c 50 54 20 0a 44 42 41 30 30 30 >.DCDHLPT .DBA000< | |||
0000120 30 30 30 30 30 0a 44 43 53 4c 41 53 54 4e 41 4d >00000.DCSLASTNAM< | |||
0000140 45 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 >E < | |||
0000160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000200 20 0a 44 43 54 46 49 52 53 54 4e 41 4d 45 20 20 > .DCTFIRSTNAME < | |||
0000220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000320 20 20 20 20 20 0a 44 42 44 30 30 30 30 30 30 30 > .DBD0000000< | |||
0000340 30 0a 44 42 42 30 30 30 30 30 30 30 30 0a 44 42 >0.DBB00000000.DB< | |||
0000360 43 31 0a 44 41 59 41 41 41 0a 44 41 55 20 20 20 >C1.DAYAAA.DAU < | |||
0000400 20 20 20 0a 44 41 47 31 32 33 20 41 42 43 44 45 > .DAG123 ABCDE< | |||
0000420 46 20 44 52 49 56 45 20 20 20 20 20 20 20 20 20 >F DRIVE < | |||
0000440 20 20 20 20 20 20 20 20 20 20 0a 44 41 48 41 50 > .DAHAP< | |||
0000460 54 2e 20 30 30 20 20 20 20 20 20 20 20 20 20 20 >T. 00 < | |||
0000500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000520 20 0a 44 41 49 41 4e 59 54 4f 57 4e 20 20 20 20 > .DAIANYTOWN < | |||
0000540 20 20 20 20 20 20 20 20 20 0a 44 41 4a 4e 56 0a > .DAJNV.< | |||
0000560 44 41 4b 31 32 33 34 35 30 30 30 30 20 20 0a 44 >DAK123450000 .D< | |||
0000600 41 51 31 32 33 34 35 36 37 38 39 31 32 33 20 20 >AQ123456789123 < | |||
0000620 20 20 20 20 20 20 20 20 20 20 20 0a 44 43 45 20 > .DCE < | |||
0000640 0a 44 43 46 30 30 30 30 30 30 30 30 30 30 30 30 >.DCF000000000000< | |||
0000660 30 30 31 32 33 34 35 36 37 31 32 33 34 0a 44 43 >0012345671234.DC< | |||
0000700 47 55 53 41 0a 44 43 48 4e 4f 4e 45 0a 44 43 4b >GUSA.DCHNONE.DCK< | |||
0000720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < | |||
0000740 20 20 20 20 20 20 20 20 20 0a 44 41 5a 41 42 43 > .DAZABC< | |||
0000760 0a 44 43 55 20 20 20 20 20 0a 0a 5a 4e 5a 4e 41 >.DCU ..ZNZNA< | |||
0001000 4f 52 47 41 4e 20 44 4f 4e 4f 52 0a 5a 4e 42 52 >ORGAN DONOR.ZNBR< | |||
0001020 45 56 49 53 49 4f 4e 20 44 41 54 45 30 30 30 30 >EVISION DATE0000< | |||
0001040 30 30 30 30 0a 5a 4e 43 36 30 33 0a 5a 4e 44 31 >0000.ZNC603.ZND1< | |||
0001060 38 30 0a 0a >80..< | |||
</pre> | |||
After decoding the first document, we get these fields: | |||
<pre style="max-height: 8em; overflow-y: auto;"> | |||
DCA BCDE | |||
DCB BCDEFJKLMW | |||
DCD HLPT | |||
DBA 00000000 | |||
DCS LASTNAME | |||
DCT FIRSTNAME | |||
DBD 00000000 | |||
DBB 00000000 | |||
DBC 1 | |||
DAY AAA | |||
DAU | |||
DAG 123 ABCDEF DRIVE | |||
DAH APT. 00 | |||
DAI ANYTOWN | |||
DAJ NV | |||
DAK 123450000 | |||
DAQ 123456789123 | |||
DCE | |||
DCF 0000000000000012345671234 | |||
DCG USA | |||
DCH NONE | |||
DCK | |||
DAZ ABC | |||
DCU | |||
</pre> | |||
Of those, we care about <code>DCS</code> (family name), <code>DCT</code> (given names), <code>DBA</code> (birthdate), <code>DBC</code> (sex), and <code>DAK</code> (ZIP code). Depending on the version of the standard your particular card is following, you may get the holder's first name in either <code>DAC</code> (first name) or <code>DCT</code> (given names). You'll have to check for both and, in the case of the latter, strip off middle names as necessary. The sex field (<code>DBC</code>) is encoded as a number, 1 for male and 2 for female. |
Revision as of 05:40, 8 November 2015
BACON's user search system is capable of scanning the barcodes on the back of many types of ID cards. We use Symbol DS6707 scanners, which connect to the registration terminal as a USB keyboard and simply type the barcode data into the search box. JavaScript on the client recognizes and intercepts the barcode input, extracts the relevant fields, and enters a search query in the box. Since only the relevant fields are extracted and everything else is discarded client-side we neatly side-step most of the privacy concerns inherent in scanning IDs.
We support several distinct types of ID cards, detailed below.
US & Canadian DL/ID Cards
Driver Licenses and ID Cards issued in the United States and Canada are standardized by the The American Association of Motor Vehicle Administrators (AAMVA). Among many other features, their Card Design Standard specifies the presence and format of the barcode on the back of all compliant cards. Here's a hex dump of what you get when you scan the example card at right:
0000000 40 0a 1e 0a 41 4e 53 49 20 36 33 36 30 34 39 30 >@...ANSI 6360490< 0000020 33 30 30 30 32 44 4c 30 30 34 31 30 34 36 36 5a >30002DL00410466Z< 0000040 4e 30 35 30 37 30 30 35 37 44 4c 44 43 41 42 43 >N05070057DLDCABC< 0000060 44 45 0a 44 43 42 42 43 44 45 46 4a 4b 4c 4d 57 >DE.DCBBCDEFJKLMW< 0000100 0a 44 43 44 48 4c 50 54 20 0a 44 42 41 30 30 30 >.DCDHLPT .DBA000< 0000120 30 30 30 30 30 0a 44 43 53 4c 41 53 54 4e 41 4d >00000.DCSLASTNAM< 0000140 45 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 >E < 0000160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000200 20 0a 44 43 54 46 49 52 53 54 4e 41 4d 45 20 20 > .DCTFIRSTNAME < 0000220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000320 20 20 20 20 20 0a 44 42 44 30 30 30 30 30 30 30 > .DBD0000000< 0000340 30 0a 44 42 42 30 30 30 30 30 30 30 30 0a 44 42 >0.DBB00000000.DB< 0000360 43 31 0a 44 41 59 41 41 41 0a 44 41 55 20 20 20 >C1.DAYAAA.DAU < 0000400 20 20 20 0a 44 41 47 31 32 33 20 41 42 43 44 45 > .DAG123 ABCDE< 0000420 46 20 44 52 49 56 45 20 20 20 20 20 20 20 20 20 >F DRIVE < 0000440 20 20 20 20 20 20 20 20 20 20 0a 44 41 48 41 50 > .DAHAP< 0000460 54 2e 20 30 30 20 20 20 20 20 20 20 20 20 20 20 >T. 00 < 0000500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000520 20 0a 44 41 49 41 4e 59 54 4f 57 4e 20 20 20 20 > .DAIANYTOWN < 0000540 20 20 20 20 20 20 20 20 20 0a 44 41 4a 4e 56 0a > .DAJNV.< 0000560 44 41 4b 31 32 33 34 35 30 30 30 30 20 20 0a 44 >DAK123450000 .D< 0000600 41 51 31 32 33 34 35 36 37 38 39 31 32 33 20 20 >AQ123456789123 < 0000620 20 20 20 20 20 20 20 20 20 20 20 0a 44 43 45 20 > .DCE < 0000640 0a 44 43 46 30 30 30 30 30 30 30 30 30 30 30 30 >.DCF000000000000< 0000660 30 30 31 32 33 34 35 36 37 31 32 33 34 0a 44 43 >0012345671234.DC< 0000700 47 55 53 41 0a 44 43 48 4e 4f 4e 45 0a 44 43 4b >GUSA.DCHNONE.DCK< 0000720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 0000740 20 20 20 20 20 20 20 20 20 0a 44 41 5a 41 42 43 > .DAZABC< 0000760 0a 44 43 55 20 20 20 20 20 0a 0a 5a 4e 5a 4e 41 >.DCU ..ZNZNA< 0001000 4f 52 47 41 4e 20 44 4f 4e 4f 52 0a 5a 4e 42 52 >ORGAN DONOR.ZNBR< 0001020 45 56 49 53 49 4f 4e 20 44 41 54 45 30 30 30 30 >EVISION DATE0000< 0001040 30 30 30 30 0a 5a 4e 43 36 30 33 0a 5a 4e 44 31 >0000.ZNC603.ZND1< 0001060 38 30 0a 0a >80..<
After decoding the first document, we get these fields:
DCA BCDE DCB BCDEFJKLMW DCD HLPT DBA 00000000 DCS LASTNAME DCT FIRSTNAME DBD 00000000 DBB 00000000 DBC 1 DAY AAA DAU DAG 123 ABCDEF DRIVE DAH APT. 00 DAI ANYTOWN DAJ NV DAK 123450000 DAQ 123456789123 DCE DCF 0000000000000012345671234 DCG USA DCH NONE DCK DAZ ABC DCU
Of those, we care about DCS
(family name), DCT
(given names), DBA
(birthdate), DBC
(sex), and DAK
(ZIP code). Depending on the version of the standard your particular card is following, you may get the holder's first name in either DAC
(first name) or DCT
(given names). You'll have to check for both and, in the case of the latter, strip off middle names as necessary. The sex field (DBC
) is encoded as a number, 1 for male and 2 for female.