[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getrandom: Add support for native Windows
From: |
Jeffrey Walton |
Subject: |
Re: getrandom: Add support for native Windows |
Date: |
Sun, 31 May 2020 12:41:29 -0400 |
On Sun, May 31, 2020 at 12:26 PM Bruno Haible <bruno@clisp.org> wrote:
>
> Native Windows is the only platform without the /dev/random and
> /dev/urandom devices; it therefore needs special code.
>
> Jeffrey Walton wrote:
> > On modern Windows systems you should use BCryptGenRandom for the
> > material. CryptGenRandom is deprecated.
>
> Thanks for the pointer.
>
> This patch implements it: try BCryptGenRandom first, and fall back on
> CryptGenRandom.
There's one platform you might have some trouble with because neither
CryptGenRandom or BCryptGenRandom are available. That's Windows Phone
8 and Windows Store 8.
I have never experienced the problem in practice. I don't think anyone
bothers writing code for Windows Phone 8.
Also see
https://social.msdn.microsoft.com/Forums/vstudio/en-US/25b83e13-c85f-4aa1-a057-88a279ea3fd6/what-crypto-random-generator-c-code-could-use-on-wp81.
Jeff
- Re: getrandom vs. crypto/gc-random, (continued)
- Re: [PATCH] getentropy, getrandom: new modules, Bruno Haible, 2020/05/30
- fix list of crypto devices for NetBSD, OpenBSD, Bruno Haible, 2020/05/30
- fix list of crypto devices for Solaris, Bruno Haible, 2020/05/31
- getrandom: Add support for native Windows, Bruno Haible, 2020/05/31
- Re: getrandom: Add support for native Windows,
Jeffrey Walton <=
- getrandom: doc and test tweaks, Bruno Haible, 2020/05/31
- Re: [PATCH] getentropy, getrandom: new modules, Bruno Haible, 2020/05/31