[PATCH 5/5] Add arc4random() etc. from OpenBSD 5.8

Corinna Vinschen vinschen@redhat.com
Fri Mar 18 11:28:00 GMT 2016


On Mar 18 11:49, Sebastian Huber wrote:
> According to the OpenBSD man page, "A Replacement Call for Random".  It
> offers high quality random numbers derived from input data obtained by
> the OpenBSD specific getentropy() system call which is declared in
> <unistd.h> and must be implemented for each Newlib port externally.  The
> arc4random() functions are used for example in LibreSSL and OpenSSH.
> 
> Cygwin provides currently its own implementation of the arc4random
> family.  Maybe it makes sense to use this getentropy() implementation:
> 
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/crypto/getentropy_win.c?rev=1.4&content-type=text/x-cvsweb-markup

No, that pulls in a dependency to another DLL which we're trying to avoid.
Using RtlGenRandom should work though.  I have to test this.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20160318/cc6906cc/attachment.sig>


More information about the Newlib mailing list