Since IOTA is relatively new, there is only one wallet available at the moment and it requires the user to create a seed before the wallet is generated. You can read more about the magical powers of Iota here.
A weak seed is a sure way to get hacked. An unfortunate reddit user noar1985 had his wallet hacked since he made a seed that was too easy if you removed the numbers. The seed was composed out of 9 letters and 4 numbers. This led to a hacker ussing a common password list to scan for very simple seeds that people are using.
Therefore, in this small contribution I will try and help you generate a secure seed.
The secure seed
An important bit of information is that IOTA uses balanced ternary instead of binary. This means that each unit is a trit and not a bit. A better explanation of tryte can
- A secure seed may contain any charachters in the set [A-Z9]
- It needs to be exactly 81 trytes long. Shorter means less security
- Close your eyes and type. Make sure you do not have easy combinations like 1234, 9999 or ABCD...
Generate a secure seed with Windows DOS
A nice reddit user created a batch file to generate a seed. Link
Add the following code to seed.bat then run it by typing seed.bat in the command prompt.
@PowerShell.exe -ExecutionPolicy RemoteSigned -Command "Invoke-Expression -Command ((Get-Content -Path '%~f0' | Select-Object -Skip 2) -join [environment]::NewLine)"&&pause
@exit /b %Errorlevel%
# script goes here and below....
param( [int] $len = 81, [string] $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ9")
$bytes = new-object "System.Byte[]" $len
$rnd = new-object System.Security.Cryptography.RNGCryptoServiceProvider
$rnd.GetBytes($bytes)
$result = ""
for( $i=0; $i -lt $len; $i++ ){ $result += $chars[ $bytes[$i] % $chars.Length ] }
$rnd.Dispose()
$result
credits to 5mincoffee for the script.
Generate a secure seed with Python
from random import SystemRandom
alphabet = u'9ABCDEFGHIJKLMNOPQRSTUVWXYZ'
generator = SystemRandom()
print(u''.join(generator.choice(alphabet) for _ in range(81)))
credit: phx
you can also run this python script from https://repl.it/languages/python3
The output is the following
I hope someone found this helpful : )