mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-21 05:43:23 -07:00
move from polarssl to mbedtls (#708)
* update polarssl to mbedtls * fix a warning in armsrc/iso15693 * added random generator and ecdsa test * added signature check to test * move crypto lib to client directory
This commit is contained in:
parent
39cc1c879e
commit
700d868794
112 changed files with 54624 additions and 8485 deletions
|
@ -16,7 +16,7 @@
|
|||
#include "usb_cmd.h"
|
||||
#include "cmdmain.h"
|
||||
#include "ui.h"
|
||||
#include "polarssl/des.h"
|
||||
#include "mbedtls/des.h"
|
||||
#include "cmdhfmf.h"
|
||||
#include "cmdhf14a.h"
|
||||
#include "mifare.h"
|
||||
|
@ -1742,11 +1742,11 @@ 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
|
||||
, DES_ENCRYPT // int mode
|
||||
mbedtls_des3_crypt_cbc(&ctx // des3_context
|
||||
, MBEDTLS_DES_ENCRYPT // int mode
|
||||
, sizeof(mix) // length
|
||||
, iv // iv[8]
|
||||
, mix // input
|
||||
|
@ -1781,10 +1781,10 @@ 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
|
||||
, DES_ENCRYPT // int mode
|
||||
mbedtls_des3_crypt_cbc(&ctx // des3_context
|
||||
, MBEDTLS_DES_ENCRYPT // int mode
|
||||
, sizeof(newpwd) // length
|
||||
, iv // iv[8]
|
||||
, zeros // input
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue