1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Save memory by not storing the HMAC key

This commit is contained in:
Manuel Pégourié-Gonnard
2014-02-01 11:38:05 +01:00
parent e6cdbbd40b
commit b05db2a6aa
2 changed files with 21 additions and 11 deletions

View File

@ -56,11 +56,11 @@ extern "C" {
*/
typedef struct
{
/* Working state */
md_context_t md_ctx; /*!< HMAC context */
unsigned char V[POLARSSL_MD_MAX_SIZE]; /*!< V in the spec */
unsigned char K[POLARSSL_MD_MAX_SIZE]; /*!< Key in the spec */
int reseed_counter; /*!< reseed counter */
/* Working state: the key K is not stored explicitely,
* but is implied by the HMAC context */
md_context_t md_ctx; /*!< HMAC context (inc. K) */
unsigned char V[POLARSSL_MD_MAX_SIZE]; /*!< V in the spec */
int reseed_counter; /*!< reseed counter */
/* Administrative state */
size_t entropy_len; /*!< entropy bytes grabbed on each (re)seed */