RSACryptoServiceProvider - 在哪里生成种子数据?

RSACryptoServiceProvider - where does the seed data is being generated?

我有以下使用 RSA 生成 public 和私钥的代码。

// generate RSA 1024
                using (var rsa = new RSACryptoServiceProvider(1024))
                {
                    var publicString = RSACryptoService.ExportPublicKeyNoHeaderFooter(rsa);
                    var privateString = RSACryptoService.ExportPrivateKey(rsa);

                    rsaKey = Convert.FromBase64String(publicString);
                }

My question is on how does RSACryptoServiceProvider generates everytime a random one, does it uses kind of a seed that is based on hardware or on timestamp?

how does RSACryptoServiceProvider generate a random seed? is it based on hardware or on timestamp?

这取决于可用的硬件和您 运行 使用的操作系统。如果您在 Windows 上 运行,则种子的熵可以来自多个来源: