]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/nonce2key/crapto1.c
CHG; still looking at 14b, this time started to look at the tracelog times not working.
[proxmark3-svn] / client / nonce2key / crapto1.c
index c17cea7a5566922cae6563c1edea72ed3bf300be..a0cd52fe0ea244102416367e796a6b3f017f0b5b 100644 (file)
@@ -541,24 +541,18 @@ struct Crypto1State* lfsr_common_prefix_ex(uint32_t pfx, uint8_t ks[8])
                goto out;\r
        }\r
 \r
-       // for(o = odd; *o + 1; ++o)\r
-               // for(e = even; *e + 1; ++e)\r
-                       // for(top = 0; top < 64; ++top) {\r
-                               // *o += 1 << 21;\r
-                               // *e += (!(top & 7) + 1) << 21;\r
-                               // s = check_pfx_parity_ex(pfx, *o, *e, s);\r
-                       // }\r
-       for(o = odd; *o != -1; ++o)\r
-               for(e = even; *e != -1; ++e)\r
+       for(o = odd; *o + 1; ++o)\r
+               for(e = even; *e + 1; ++e)\r
                        for(top = 0; top < 64; ++top) {\r
-                               *o = (*o & 0x1fffff) | (top << 21);\r
-                               *e = (*e & 0x1fffff) | (top >> 3) << 21;\r
+                               *o += 1 << 21;\r
+                               *e += (!(top & 7) + 1) << 21;\r
                                s = check_pfx_parity_ex(pfx, *o, *e, s);\r
                        }\r
 \r
-       s->odd = s->even = -1;  \r
+       s->odd = s->even = 0;\r
+\r
 out:\r
        free(odd);\r
        free(even);\r
        return statelist;\r
-}\r
+}
\ No newline at end of file
Impressum, Datenschutz