mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-15 01:33:00 -07:00
Fixed (?) issue with mifare simulation auth failed. See http://www.proxmark.org/forum/viewtopic.php?pid=9192#p9192
This commit is contained in:
parent
e691fc45bc
commit
af1caf6e4a
1 changed files with 3 additions and 3 deletions
|
@ -2135,7 +2135,7 @@ void Mifare1ksim(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
|
||||||
//uint32_t cardRn = 0;
|
//uint32_t cardRn = 0;
|
||||||
uint32_t cardRr = 0;
|
uint32_t cardRr = 0;
|
||||||
uint32_t cuid = 0;
|
uint32_t cuid = 0;
|
||||||
//uint32_t rn_enc = 0;
|
uint32_t rn_enc = 0;
|
||||||
uint32_t ans = 0;
|
uint32_t ans = 0;
|
||||||
uint32_t cardINTREG = 0;
|
uint32_t cardINTREG = 0;
|
||||||
uint8_t cardINTBLOCK = 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:{
|
case MFEMUL_AUTH1:{
|
||||||
if (len == 8) {
|
if (len == 8) {
|
||||||
// --- crypto
|
// --- crypto
|
||||||
//rn_enc = bytes_to_num(receivedCmd, 4);
|
rn_enc = bytes_to_num(receivedCmd, 4);
|
||||||
//cardRn = rn_enc ^ crypto1_word(pcs, rn_enc , 1);
|
crypto1_word(pcs, rn_enc , 1);
|
||||||
cardRr = bytes_to_num(&receivedCmd[4], 4) ^ crypto1_word(pcs, 0, 0);
|
cardRr = bytes_to_num(&receivedCmd[4], 4) ^ crypto1_word(pcs, 0, 0);
|
||||||
// test if auth OK
|
// test if auth OK
|
||||||
if (cardRr != prng_successor(nonce, 64)){
|
if (cardRr != prng_successor(nonce, 64)){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue