]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - tools/nonce2key/crypto1.c
CHG: Updated the crapto1 imp to latest vesion3.3 ( Thanks @blapost !)
[proxmark3-svn] / tools / nonce2key / crypto1.c
index fbf888987c8539eee9d8f411daa786938ec243aa..e2aab71b0487c2752bc8f8f5652a26b1ba339f04 100644 (file)
@@ -74,8 +74,8 @@ uint32_t crypto1_word(struct Crypto1State *s, uint32_t in, int is_encrypted)
 {
        uint32_t i, ret = 0;
 
-       for (i = 0; i < 4; ++i, in <<= 8)
-               ret = ret << 8 | crypto1_byte(s, in >> 24, is_encrypted);
+       for (i = 0; i < 32; ++i)
+               ret |= crypto1_bit(s, BEBIT(in, i), is_encrypted) << (i ^ 24);
 
        return ret;
 }
Impressum, Datenschutz