[Linux-bruxelles] check your vote
afront
afront01 at skynet.be
Sam 5 Juin 11:47:29 CEST 2004
> Oui à la démocratie, NON au vote électronique, NON à la technologie
mal
placée.
If the software isn't changed from last year, and the clock on the
machine is set correctly, you can easily declare the elections invalid:
check the first 8 bytes read from the magnetic card, and look it up in
the output of the program below. It should correspond to the time of
your vote. (Even if the time is set correctly, it could be off by one
or two hours dpending on timezone or DLS).
Confront the chairman with your result and ask him to declare the vote
illegal, as it cannot guarantee your anonymity.
-- cut and compile here. run the output through "sort" for convenience
#define RAND_MAX 0x7FFFU
/* #define randomize() srand((unsigned)time(NULL)) */
#define random(num)(int)(((long)rand()*(num))/(RAND_MAX+1))
#define MULTIPLIER 0x015a4e35L /* 22,695,477 */
#define INCREMENT 1
static long Seed = 1;
void srand(unsigned seed) {
Seed = seed;
}
int rand(void) {
Seed = MULTIPLIER * Seed + INCREMENT;
return((int)(Seed >> 16) & 0x7fff);
}
#define SPACE 7200
#define MAXSIZE 2000
int order[SPACE][MAXSIZE];
int sessionkey(unsigned s)
{
int i;
int key = 0;
srand(s);
for(i=0; i < 8; i++)
key = 10*key+random( 10);
return key;
}
int main(int argc, const char *argv[]) {
unsigned i;
long elections = 0x40CBDF50; /* june 13 2004 0600 UTC */
int duration = 12*3600;
for(i=0;i<duration;i++) {
int key = sessionkey(elections+i);
int hrs = i /3600;
int min = (i -(hrs*3600))/60;
int sec = (i -(hrs*3600)-(min*60));
printf("%08i %02i:%02i:%02i\n",key,hrs+6,min,sec);
}
}
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: non disponible
Type: text/enriched
Taille: 4182 octets
Desc: non disponible
URL: </pipermail/linux-bruxelles/attachments/20040605/c58c18b1/attachment-0002.bin>
Plus d'informations sur la liste de diffusion Linux-bruxelles