feat(mbedtls): modify code to support ESP8266

It is that maybe less modification working on the components is better, so I just modified the platform
code of AES, SHA and so on.

ESP8266 has no real hardware AES, SHA or bignum peripheral, but some method can speed up the process of part
of upper algorithm, so I also added the platform code of AES, SHA, bignum, ARC, MD5.

ESP8266 has no platform of bignum, so users should not enable the bignum hardware at "menuconfig".
This commit is contained in:
dongheng
2019-09-19 11:49:42 +08:00
parent 35d8262b25
commit 5f2b5eafcf
42 changed files with 625 additions and 4023 deletions

View File

@@ -34,6 +34,8 @@ extern "C" {
#define MALLOC_CAP_32BIT (1 << 1) ///< Memory must allow for aligned 32-bit data accesses
#define MALLOC_CAP_8BIT (1 << 2) ///< Memory must allow for 8-bit data accesses
#define MALLOC_CAP_DMA (1 << 3) ///< Memory must be able to accessed by DMA
#define MALLOC_CAP_INTERNAL (1 << 11) ///< Just for code compatibility
#define MALLOC_CAP_SPIRAM (1 << 10) ///< Just for code compatibility
#define MEM_HEAD_SIZE sizeof(mem_blk_t) ///< Size of first type memory block
#define MEM2_HEAD_SIZE sizeof(mem2_blk_t) ///< Size of second type memory block