Domanda

After all this NSA stuff I was just wondering if anybody knows alternatives to the System.Security.Cryptography.RNGCryptoServiceProvider() from .NET - maybe an Open Source solution?

I tried to search for it, but wasn't really successful, so I hope anybody from the community has an idea?

Thanks

È stato utile?

Soluzione 2

There are two random number generators in Bouncy Castle - C# version that may be of use: DigestRandomGenerator and VmpcRandomGenerator, both in the crypto.prng name space. The trick is to seed those random entropy from a source you can trust.

Note that I am unfamiliar with the VMPC algorithm. The DigestRandomGenerator largely depends on the security of the underlying hash function (SHA-512 is pretty secure and fast on 64 bit hardware). It is a rather simple implementation, but it should be secure none-the-less.

Altri suggerimenti

Using new .NET 6 APIs Generating random numbers from a CSPNG (Cryptographically Secure Pseudorandom Number Generator) is easier than ever:

// Give me 200 random bytes
var bytes = RandomNumberGenerator.GetBytes(200);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top