1. picked better values for entropy and nonce sizes based on
security strength
2. changed output block length to be the SHA-256 digest size
3. use constant drbgReseed when reseeding
4. renamed the "drgb" type constants from "dbrg"
5. removed the small stack change due to buffer size changes
6. internal helper function Hash_DRBG_Instantiate now also
takes a pointer to a nonce and a personalization string
7. the InitRng gathers enough bits from GenerateSeed() to
supply the entropy input and a nonce
8. lowered the reseed interval to 1 million
with ARC4
--- InitRng: entropy variable moved to the heap; (256 bytes)
--- RNG_GenerateBlock: entropy variable moved to the heap; (256 bytes)
without ARC4
--- InitRng: key variable moved to the heap; (32 bytes)
--- InitRng: junk variable moved to the heap; (256 bytes)
--- ecc_make_key_ex: buf variable moved to the heap; (66 bytes)
--- ecc_export_x963: buf variable moved to the heap; (256 bytes)
--- accel_fp_mul: kb variable moved to the heap; (128 bytes)
--- accel_fp_mul2add: kb variable moved to the heap; (256 bytes)
--- ecc_encrypt: sharedSecret and keys variables moved to the heap; (66 + 256 bytes)
--- ecc_decrypt: sharedSecret and keys variables moved to the heap; (66 + 256 bytes)
--- buffer variable moved to the heap; (up to 64 bytes)
--- returns changed to breaks
pwdbased: PKCS12_PBKDF refactory to reduce stack usage: (up to 1023 + 128 bytes - pointer sizes) moved to the heap.
--- staticBuffer variable changed to have size = 1 byte (1023 bytes saved)
--- Ai variable moved to the heap; (up to 64 bytes)
--- B variable moved to the heap; (up to 64 bytes)
hmac: HKDF refactory to restore previous behavior inside while loop.
--- block variable moved to the heap; (128 bytes)
--- m and w variables moved to the heap; (256 bytes)
--- chain of dependency updated to propagate the error.
--- W variable moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error in Sha256Update and Sha256Final functions.
sha512: Transform and Transform384 refactory to reduce stack usage: (128 bytes - pointer size) moved to the heap in each function
--- W variable moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error in Sha512Update, Sha512Final, Sha384Update and Sha384Final functions.
--- subL and subR variables moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error in CamelliaSetKey function.
--- buffer variable moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error.