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

@ -183,6 +183,16 @@ uint32_t esp_get_minimum_free_heap_size( void );
*/
uint32_t esp_random(void);
/**
* @brief Fill a buffer with random bytes from hardware RNG
*
* @note This function has the same restrictions regarding available entropy as esp_random()
*
* @param buf Pointer to buffer to fill with random numbers.
* @param len Length of buffer in bytes
*/
void esp_fill_random(void *buf, size_t len);
typedef enum {
FLASH_SIZE_4M_MAP_256_256 = 0, /**< Flash size : 4Mbits. Map : 256KBytes + 256KBytes */
FLASH_SIZE_2M, /**< Flash size : 2Mbits. Map : 256KBytes */