From b9974e1224076ef0f22ca0e8472b0cd36703d353 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Wed, 14 Nov 2018 11:24:21 +0200 Subject: [PATCH] mfu --- client/cmdhfmfu.c | 10 +++++----- client/cmdhfmfu.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index 7c8ce064a..f1d0d3979 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -2441,10 +2441,10 @@ int CmdHF14AMfuGenDiverseKeys(const char *Cmd){ mix[6] = block ^ uid[2]; mix[7] = uid[3]; - des3_context ctx = { 0x00 }; - des3_set2key_enc(&ctx, masterkey); + mbedtls_des3_context ctx = { 0x00 }; + mbedtls_des3_set2key_enc(&ctx, masterkey); - des3_crypt_cbc(&ctx // des3_context + mbedtls_des3_crypt_cbc(&ctx // des3_context , DES_ENCRYPT // int mode , sizeof(mix) // length , iv // iv[8] @@ -2478,9 +2478,9 @@ int CmdHF14AMfuGenDiverseKeys(const char *Cmd){ memcpy(dmkey+16, dkeyA, 8); memset(iv, 0x00, 8); - des3_set3key_enc(&ctx, dmkey); + mbedtls_des3_set3key_enc(&ctx, dmkey); - des3_crypt_cbc(&ctx // des3_context + mbedtls_des3_crypt_cbc(&ctx // des3_context , DES_ENCRYPT // int mode , sizeof(newpwd) // length , iv // iv[8] diff --git a/client/cmdhfmfu.h b/client/cmdhfmfu.h index 2e07bae80..491218b1b 100644 --- a/client/cmdhfmfu.h +++ b/client/cmdhfmfu.h @@ -3,7 +3,7 @@ #include #include -#include "des.h" +#include "mbedtls/des.h" #include "cmdhfmf.h" #include "cmdhf14a.h" #include "mifare.h"