[Cryptography] Keccak-based pseudo-random number generator

Stephan Mueller smueller at chronox.de
Tue Jul 26 05:47:55 EDT 2022


Hi,

Using Keccak, a pseudo-random number generator / deterministic random number 
(DRNG) generator can be created.

I have developed a DRNG that can be used used to generate cryptographically 
secure random bit strings for various use cases including symmetric and 
asymmetric key generation services. The DRNG is based on the customizable 
extendable output function cSHAKE defined in SP800-185 which in turn is based 
on the Keccak algorithm. The deterministic random number generator is intended 
to support a wide range of applications and requirements, and is conservative 
in its resource consumption.

In addition, a very similar SP800-185 KMAC-based DRNG is also implemented.

Both DRNG algorithms are fully documented and specified in [1] and [2] which 
also provide a working copy. The documentation in [1] also provides a 
comparison between both algorithms.

The API documentation of both algorithm implementations is given in [3] 
supported by [4] and [5].

I would be happy to receive comments or suggestions.

[1] https://github.com/smuellerDD/leancrypto/blob/master/drng/src/
cshake_drng.c

[2] https://github.com/smuellerDD/leancrypto/blob/master/drng/src/kmac_drng.c

[3] https://github.com/smuellerDD/leancrypto/blob/master/drng/api/lc_rng.h

[4] https://github.com/smuellerDD/leancrypto/blob/master/drng/api/
lc_cshake256_drng.h

[5] https://github.com/smuellerDD/leancrypto/blob/master/drng/api/
lc_kmac256_drng.h

Ciao
Stephan




More information about the cryptography mailing list