[Python-Dev] Re: From the SC (was Re: Enum -- last call for comments on 3.10 changes)

2021-07-12 Thread Ethan Furman
On 7/11/21 4:00 PM, Miro HronĨok wrote: > On 07. 07. 21 3:58, Ethan Furman wrote: >> I was unable to revert just the str and repr changes in the time available as many of them were >> integral to fixes and improvements made to Flag. As a result the enum in 3.10 will be the same >> as 3.9

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Thomas Grainger
https://docs.microsoft.com/en-us/windows/win32/seccng/cng-portal ? On Mon, 12 Jul 2021, 23:18 Dan Stromberg, wrote: > > On Mon, Jul 12, 2021 at 8:37 AM Steve Dower > wrote: > >> On 7/12/2021 4:11 PM, Dan Stromberg wrote: >> > It looks like CPython could do better on Windows: SystemRandom

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Dan Stromberg
On Mon, Jul 12, 2021 at 8:37 AM Steve Dower wrote: > On 7/12/2021 4:11 PM, Dan Stromberg wrote: > > It looks like CPython could do better on Windows: SystemRandom (because > > of os.urandom()) is good on Linux and mac, but on Windows they use the > > CryptGenRandom deprecated API > > > >

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Wes Turner
"PEP 543 -- A Unified TLS API for Python" could specify a [CS][P][RNG] interface that could be used instead of os.urandom, which is probably also wrong. PEP 543 compares OpenSSL, SecureTransport, SChannel, and NSS; which presumably all have some sort of a CSPRNG function that may or may not need

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Steve Dower
On 7/12/2021 4:11 PM, Dan Stromberg wrote: It looks like CPython could do better on Windows: SystemRandom (because of os.urandom()) is good on Linux and mac, but on Windows they use the CryptGenRandom deprecated API Supporting detail:

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Dan Stromberg
On Fri, Jul 9, 2021 at 2:26 PM Tim Peters wrote: > [Ethan Furman] > > A question [1] has arisen about the viability of `random.SystemRandom` in > > Pythons before and after the secrets module was introduced > > (3.5 I think) -- specifically > > > > does it give independent and uniform