Re: Bar code choice

From: Jan Karrman <jan_at_it_dot_uu_dot_se>
Date: Sat Sep 13 2003 - 03:46:10 CDT

As Edward Cherlin suggested, one can use bitwise xor to obscure the
bar code:

  http://gnosis.python-hosting.com/voting-project/August.2003/0286.html

I suppose there is not a problem if the ballot number can be visually
read from the bar code by a person that recognizes Code 128. Then one
can xor the rest of the bit string with the ballot number (repeated).
This will not increase the length of the bar code at all.

For example:

bit string = 100110010111010110
ballot number 13 = 1101 binary

1001 1001 0111 0101 10
1101 1101 1101 1101 11
----------------------
0100 0100 1010 1000 01

Now add the ballot number in front to get the string that will be
printed (decimal) as a bar code: 1101010001001010100001.

When this number is scanned from the bar code, we extract the
ballot number and apply xor again to the rest.

0100 0100 1010 1000 01
1101 1101 1101 1101 11
----------------------
1001 1001 0111 0101 10

Instead of xor-ing with the ballot number, one can perhaps use
something like '1973*ballotnumber modulo 1013' too further obscure
cases with similar ballot numbers (probably not necessary).

Also, if the printer and bar code reader used at the demo are not
too crappy, the bar code can be printed using a smaller font size
than I used in the sample.

/Jan
==================================================================
= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
==================================================================
Received on Tue Sep 30 23:17:04 2003

This archive was generated by hypermail 2.1.8 : Tue Sep 30 2003 - 23:17:09 CDT