X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/41f4bcabc6e44b9fb71414d4c5fb41fcd2dab7ea..1338d245c2ff5930a059d3d1fdea93a535fe6e61:/common/crapto1/crypto1.c?ds=inline diff --git a/common/crapto1/crypto1.c b/common/crapto1/crypto1.c index 61f6fe66..19b71cbb 100644 --- a/common/crapto1/crypto1.c +++ b/common/crapto1/crypto1.c @@ -18,7 +18,9 @@ Copyright (C) 2008-2008 bla */ #include "crapto1.h" + #include +#include "parity.h" #define SWAPENDIAN(x)\ (x = (x >> 8 & 0xff00ff) | (x & 0xff00ff) << 8, x = x >> 16 | x << 16) @@ -73,7 +75,7 @@ uint8_t crypto1_bit(struct Crypto1State *s, uint8_t in, int is_encrypted) feedin ^= !!in; feedin ^= LF_POLY_ODD & s->odd; feedin ^= LF_POLY_EVEN & s->even; - s->even = s->even << 1 | parity(feedin); + s->even = s->even << 1 | evenparity32(feedin); t = s->odd, s->odd = s->even, s->even = t;