Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createWindowsSeed() insecure #1

Open
hyperreality opened this issue Aug 28, 2017 · 3 comments
Open

createWindowsSeed() insecure #1

hyperreality opened this issue Aug 28, 2017 · 3 comments

Comments

@hyperreality
Copy link

See https://www.reddit.com/r/Iota/comments/6v9mj6/psa_nearly_all_powershell_generated_seeds_are/

@thedewpoint
Copy link

+1 any idea on how we can secure this?

@hyperreality
Copy link
Author

hyperreality commented Jan 9, 2018

.NET offers CryptGenRandom but I'm not sure how easy it is to use from Powershell. Windows users should use Python and its SystemRandom function which will interface directly with this. Ideally, don't generate a seed on Windows at all and certainly not using this script.

@pRizz
Copy link

pRizz commented Jul 3, 2018

You can use this PowerShell command

$randomBuffer = [byte[]](1..1); $seed = [char[]](1..81); -join($seed | foreach { Do {(new-object Security.Cryptography.RNGCryptoServiceProvider).GetBytes($randomBuffer); $randomChar = [char[]]([char]'A'..[char]'Z' + [char]'9'..[char]'9')[$randomBuffer[0]]} While ($randomChar -eq $null); $randomChar })

From https://github.com/pRizz/SecureSeedCommands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants