]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Syntaxt suger
authoriceman1001 <iceman@iuse.se>
Thu, 14 Apr 2016 09:34:02 +0000 (11:34 +0200)
committericeman1001 <iceman@iuse.se>
Thu, 14 Apr 2016 09:34:02 +0000 (11:34 +0200)
armsrc/crapto1.c
armsrc/iclass.c
armsrc/mifarecmd.c

index fcfd0b4da996ee9d2bc9cd98a4b828d223182e82..e2058651392f8ee96c593048de6c5af024515aeb 100644 (file)
@@ -419,10 +419,11 @@ static uint16_t *dist = 0;
 int nonce_distance(uint32_t from, uint32_t to)\r
 {\r
        uint16_t x, i;\r
-       if(!dist) {\r
+       // generate distance lookup table\r
+       if (!dist) {\r
                dist = malloc(2 << 16);\r
-               if(!dist)\r
-                       return -1;\r
+               if (!dist) return -1;\r
+               \r
                for (x = i = 1; i; ++i) {\r
                        dist[(x & 0xff) << 8 | x >> 8] = i;\r
                        x = x >> 1 | (x ^ x >> 2 ^ x >> 3 ^ x >> 5) << 15;\r
@@ -446,7 +447,7 @@ static uint32_t fastfwd[2][8] = {
  * encrypt the NACK which is observed when varying only the 3 last bits of Nr\r
  * only correct iff [NR_3] ^ NR_3 does not depend on Nr_3\r
  */\r
-uint32_t *lfsr_prefix_ks(uint8_t ks[8], int isodd)\r
+uint32_tlfsr_prefix_ks(uint8_t ks[8], int isodd)\r
 {\r
        uint32_t *candidates = malloc(4 << 10);\r
        if(!candidates) return 0;\r
index 134e7a5ec0aeab918ec5acceb674efb46676ad0a..8c3be1f6a1f9bb64c0c44ea24cca68eeb52221bb 100644 (file)
@@ -1296,7 +1296,8 @@ int doIClassSimulation( int simulationMode, uint8_t *reader_mac_buf)
                        receivedCmd[3], receivedCmd[4], receivedCmd[5],
                        receivedCmd[6], receivedCmd[7], receivedCmd[8]);
                        // Do not respond
-                       modulated_response = resp_sof; modulated_response_size = 0; //order = 0;
+                       modulated_response = resp_sof;
+                       modulated_response_size = 0; //order = 0;
                        trace_data = NULL;
                        trace_data_size = 0;
                }
index 70f3d4b18a12f4d4c5ad1000d4680aafd9ad9942..93eea2122708a9666306191426486e4ec50b7cf0 100644 (file)
@@ -75,7 +75,6 @@ void MifareReadBlock(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
                break;\r
        }\r
        \r
-       //  ----------------------------- crypto1 destroy\r
        crypto1_destroy(pcs);\r
        \r
        if (MF_DBGLEVEL >= 2)   DbpString("READ BLOCK FINISHED");\r
@@ -717,10 +716,8 @@ void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags,
                        memcpy(buf+i+8, &nt_par_enc, 1);\r
                        i += 9;\r
                }\r
-\r
                // wait for the card to become ready again\r
-               while(GetCountSspClk() < timeout);\r
-       \r
+               while(GetCountSspClk() < timeout);      \r
        }\r
 \r
        LED_C_OFF();\r
Impressum, Datenschutz