bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: bug-gnulib@gnu.org
Subject: Re: getrandom: Add support for native Windows
Date: Sun, 31 May 2020 12:41:29 -0400	[thread overview]
Message-ID: <CAH8yC8kUZ5erg3aSqqFF9+fkfY_bMCbweF9O6hiHJHrfv1wsTg@mail.gmail.com> (raw)
In-Reply-To: <2353550.NELAItI0gM@omega>

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


  reply	other threads:[~2020-05-31 16:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 19:37 [PATCH] getentropy, getrandom: new modules Paul Eggert
2020-05-30 12:58 ` Bruno Haible
2020-05-30 22:43   ` Paul Eggert
2020-05-31 11:23     ` getrandom vs. crypto/gc-random Bruno Haible
2020-05-31 11:47       ` Bruno Haible
2020-05-31 13:14       ` Jeffrey Walton
2020-05-31 13:23       ` Simon Josefsson
2020-05-31 19:02         ` Bruno Haible
2020-06-01 13:45           ` Jeffrey Walton
2020-06-01 16:53             ` Bruno Haible
2020-06-01 18:13               ` Paul Eggert
2020-06-01 19:01                 ` Bruno Haible
2020-06-01 23:00                   ` Paul Eggert
2020-06-01 23:51                     ` Bruno Haible
2020-06-02  0:04                       ` Paul Eggert
2020-05-30 13:17 ` [PATCH] getentropy, getrandom: new modules Bruno Haible
2020-05-30 14:23 ` Bruno Haible
2020-05-30 23:06   ` sys_random: Work around macOS bug Bruno Haible
2020-05-30 23:28     ` Jeffrey Walton
2020-05-31 10:29       ` Apple platforms Bruno Haible
2020-05-30 15:34 ` [PATCH] getentropy, getrandom: new modules Bruno Haible
2020-05-30 23:14 ` fix list of crypto devices for NetBSD, OpenBSD Bruno Haible
2020-05-31 10:57 ` fix list of crypto devices for Solaris Bruno Haible
2020-05-31 16:26 ` getrandom: Add support for native Windows Bruno Haible
2020-05-31 16:41   ` Jeffrey Walton [this message]
2020-05-31 16:49 ` getrandom: doc and test tweaks Bruno Haible
2020-05-31 18:15 ` [PATCH] getentropy, getrandom: new modules Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH8yC8kUZ5erg3aSqqFF9+fkfY_bMCbweF9O6hiHJHrfv1wsTg@mail.gmail.com \
    --to=noloader@gmail.com \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).