[Crypto] Implement CryptoCore::RandomGenerator.

As a cryptographically secure random generator.

Internally it uses mbedTLS CTR-DRBG implementation which gets re-seeded
with entropy from OS::get_entropy when needed.

CryptoCore now additionally depends on `ctr_drbg.c` and `entropy.c`
thirdparty mbedtls files.
This commit is contained in:
Fabio Alessandrelli 2022-02-08 10:34:43 +01:00
parent 6b5634b96a
commit ee7b67e135
4 changed files with 69 additions and 4 deletions

View file

@ -31,6 +31,8 @@ if not has_module:
"aes.c",
"base64.c",
"constant_time.c",
"ctr_drbg.c",
"entropy.c",
"md5.c",
"sha1.c",
"sha256.c",