Remove aes.c in favor of mbedtls implementation.

Changelog
This commit is contained in:
slurdge 2019-07-12 23:48:54 +02:00
commit 996ed197fb
9 changed files with 34 additions and 1229 deletions

View file

@ -63,7 +63,7 @@ DETECTED_OS=Windows
endif
# Also search prerequisites in the common directory (for usb.c), the fpga directory (for fpga.bit), and the zlib directory
VPATH = . ../common ../common/crapto1 ../common/polarssl ../fpga ../zlib ../armsrc/Standalone ../uart
VPATH = . ../common ../common/crapto1 ../common/mbedtls ../fpga ../zlib ../armsrc/Standalone ../uart
INCLUDES = ../include/proxmark3.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/pm3_cmd.h $(APP_INCLUDES)

View file

@ -3,7 +3,7 @@
#include <string.h>
#include <stdarg.h>
#include "aes.h"
#include "mbedtls/aes.h"
#include "mifare.h"
#define MAX_CRYPTO_BLOCK_SIZE 16
@ -71,10 +71,6 @@ enum DESFIRE_CRYPTOALGO {
struct desfire_key {
enum DESFIRE_CRYPTOALGO type;
uint8_t data[24];
// DES_key_schedule ks1;
// DES_key_schedule ks2;
// DES_key_schedule ks3;
AesCtx aes_ks;
uint8_t cmac_sk1[24];
uint8_t cmac_sk2[24];
uint8_t aes_version;

View file

@ -60,9 +60,9 @@
* mbedtls_platform_zeroize() to use a suitable implementation for their
* platform and needs.
*/
static void *(* const volatile memset_func)(void *, int, size_t) = memset;
//static void *(* const volatile memset_func)(void *, int, size_t) = memset;
void mbedtls_platform_zeroize(void *buf, size_t len) {
memset_func(buf, 0, len);
memset(buf, 0, len);
}
#endif /* MBEDTLS_PLATFORM_ZEROIZE_ALT */