]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Fixed (?) issue with mifare simulation auth failed. See http://www.proxmark.org/forum...
authormartin.holst@gmail.com <martin.holst@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 22 Jan 2014 08:49:28 +0000 (08:49 +0000)
committermartin.holst@gmail.com <martin.holst@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 22 Jan 2014 08:49:28 +0000 (08:49 +0000)
armsrc/iso14443a.c

index 00dc622fdf0e1fd1d164b3e0e51378635334e007..3966d77ab4150bfa6ad671990e57f4be9fd2f637 100644 (file)
@@ -2135,7 +2135,7 @@ void Mifare1ksim(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
        //uint32_t cardRn = 0;
        uint32_t cardRr = 0;
        uint32_t cuid = 0;
-       //uint32_t rn_enc = 0;
+       uint32_t rn_enc = 0;
        uint32_t ans = 0;
        uint32_t cardINTREG = 0;
        uint8_t cardINTBLOCK = 0;
@@ -2313,8 +2313,8 @@ void Mifare1ksim(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
                        case MFEMUL_AUTH1:{
                                if (len == 8) {
                                        // --- crypto
-                                       //rn_enc = bytes_to_num(receivedCmd, 4);
-                                       //cardRn = rn_enc ^ crypto1_word(pcs, rn_enc , 1);
+                                       rn_enc = bytes_to_num(receivedCmd, 4);
+                                       crypto1_word(pcs, rn_enc , 1);
                                        cardRr = bytes_to_num(&receivedCmd[4], 4) ^ crypto1_word(pcs, 0, 0);
                                        // test if auth OK
                                        if (cardRr != prng_successor(nonce, 64)){
Impressum, Datenschutz