[Cryptography] Keccak-based pseudo-random number generator

John-Mark Gurney jmg at funkthat.com
Thu Jul 28 16:14:03 EDT 2022


Howard Chu wrote this message on Wed, Jul 27, 2022 at 01:57 +0100:
> Stephan Mueller wrote:
> > Hi,
> > 
> > Using Keccak, a pseudo-random number generator / deterministic random number 
> > (DRNG) generator can be created.
> 
> Just fyi, the Monero Project's PRNG also uses keccak. The wrapper is in
> https://github.com/monero-project/monero/blob/master/src/crypto/random.c
> and its hash_permutation function just invokes keccak in
> https://github.com/monero-project/monero/blob/master/src/crypto/hash.c

Also, STROBE has had a Keccak based PRNG for a while as well:
https://eprint.iacr.org/2017/003

w/ an implementation here:
https://sourceforge.net/projects/strobe/

> > 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

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the cryptography mailing list