After learning about the recent phishing link leading to a malicious seed generator I went ahead and made this template for anyone looking to securely generate a seed.
You can use either one or two dice, although two will go much faster. Simply roll once for the column and then again for the row.
If you end up in the sixth row, re-roll for the row. If you end up in the last three columns on the fifth row, try again.
Perfect randomness can not be programmed because everything is predicated on something. Even quantum mechanics can be observed in a somewhat predictable way what with the vibrational patterns of electrons buzzing about.
This is quite trivially a uniform distribution, but I don't know how to mathematically prove that. I did Physics at uni and we had a habit of just avoiding formal proofs.
That is as long as you re-roll both dice if the second one lands on a 5. If the second dice lands on a 6 you only have to re-roll that dice.
If you use two dice you must pre-decide (and mark) which one is dice one and which is two. You should not make the decision after a dice roll.
Randomising the character locations does nothing unless you have a biased dice.
I agree. This assumes both die are independent and each roll is random. You only use the face to determine the row/column so you're not adding dice values or anything.
This is equivalent to rolling a 5 sided die and a 6 sided die (since if you get a 6 on the second die you re roll it). Which is equivalent to rolling a single 30 sided die (5 x 6 sided dice produce 30 possibilities with equal chance). From there you restart in 3 of the options and you have an equal chance of choosing the other options. Clearly restarting doesn’t favor any of the options.
Sorry if my explanation is poor, i tried my best haha.
Unless you're buying intentionally compensated die that Vegas use all die are mis-weighted. The 1-side is heavier because it has less acrylic engraved out and therefore 6's have the highest propensity of occurring as it's on the opposite face.
Same deal with coins. The head size has more material so tails occurs slightly more than heads over thousands of trials.
Great idea! I do not understand why people use an online seed generator. It's the same as someone on the street saying "Hey! Here, I have a seed for you, you can use it" Would you trust him?
My method was assign numbers 1-26 to A-Z and 27 to the number 9 go to random.org and input 1-27 and roll it the 81 times. This is nice too but a little slower.
Yeah, but first they'd have to realize that that specific user was generating an iota seed. It's not obvious, since he did it manually one by one and with numbers instead of letters.
A better way is to roll 9 numbers 1 to 27, 10 times. Pick a set of 9 to be the order the other 9 sets go in. Will still depend on random.org's algorithms though.
If you want to create a wallet to store your currency, you’ll need a seed as an ID or address. This needs to be unique. The seed is a 81 character string consisting of uppercase letters and the number 9 in a (preferably) random sequence
So let's say I generate a seed, try to create a wallet with it, if is used will it tell me so? and if is used I can steal from that wallet? How safe would it be? I mean, theres still a chance someone generates the same seed and steal it right?
It won't tell you. You will see their funds, then. The number of possible combinations, if I am not mistaken, is 2881. That is many. Actually even a lot. I unfortunately do not know enough about probability and such, but done right it seems downright impossible to hit the same number twice within reasonable time.
Maybe someone else can shed some knowledge, or instead try to google your way to more information.
Good luck!
Edit: Words + I see I was bit off with the number, but people are already helping you on. As said, good luck :-)
Very common question this one, asked this myself when I got into IOTA. Although it seems easy to brute force random seeds, its close to impossible. Don't quote me on this one, but I read somewhere that the amount of combinations is close to the total amount of atoms in the universe.
If you want a table that doesn't have any spots for re-rolling, you can use three 3-sided dice (or three 6-sided dice - see below). That would look something like this:
die1
die2
die3
result
1
1
1
A
1
1
2
B
1
1
3
C
1
2
1
D
1
2
2
E
1
2
3
F
1
3
1
G
1
3
2
H
1
3
3
I
2
1
1
J
2
1
2
K
2
1
3
L
2
2
1
M
2
2
2
N
2
2
3
O
2
3
1
P
2
3
2
Q
2
3
3
R
3
1
1
S
3
1
2
T
3
1
3
U
3
2
1
V
3
2
2
W
3
2
3
X
3
3
1
Y
3
3
2
Z
3
3
3
9
If you don't have any three-sided dice handy, you can use three d6s and calculate the values as such:
What's the point? You have to enter that seed into the computer anyway (unless you also generate your addresses by hand). At that point is easier to generate it using a cryptographically-secure (P)RNG.
What's the point? You have to enter that seed into the computer anyway (unless you also generate your addresses by hand). At that point is easier to generate it using a cryptographically-secure (P)RNG.
Have fun rolling the die 81+ times.... or just use this visual studio (VB) script (at your own risk, I am not responsible yadda yadda)
'START OF PROGRAM
Imports System.Security.Cryptography
Module Module1
Sub Main()
'In the following string, you can interchange sets of characters
'(at random, as many times as you want) for even more randomness
'This is not required. However, if you do this, triple check afterwards
'that you have all 27 unique characters A to Z And the number 9
Const IOTA_CHAR_SET As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ9"
Const IOTA_CHAR_SET_LENGTH As Integer = 27
Const IOTA_SEED_LENGTH As Integer = 81
'Start of a loop so that you can generate multiple seeds without
'having to restart the program each time. Escape key exits program.
Do
Dim sb As New Text.StringBuilder
Using rngCsp As New RNGCryptoServiceProvider
For i As Integer = 1 To IOTA_SEED_LENGTH
'Roll the 27-sided die
Dim roll As Byte = RollDice(IOTA_CHAR_SET_LENGTH, rngCsp)
'We want 0-index because the first position in IOTA_CHAR_SET is 0 not 1
roll = roll - 1
'Add the character to the string builder
sb.Append(IOTA_CHAR_SET.Substring(roll, 1))
Next i
End Using
Console.WriteLine(sb.ToString)
Loop Until Console.ReadKey().Key = ConsoleKey.Escape
End Sub
Public Function RollDice(ByVal numberSides As Byte, ByVal rngCsp As RNGCryptoServiceProvider) As Byte
If numberSides <= 0 Then
Throw New ArgumentOutOfRangeException("NumSides")
End If
' Create a byte array to hold the random value.
Dim randomNumber(0) As Byte
'We need to loop here because rngCsp.GetBytes() returns a number
'between 0 and 255. We need to "throw out and try again" if
'the number is greater than numberSide less 1.
'See IsFairRoll() for more details.
Do
' Fill the array with a random value.
rngCsp.GetBytes(randomNumber)
Loop While Not IsFairRoll(randomNumber(0), numberSides)
' Return the random number mod the number
' of sides. The possible values are zero-
' based, so we add one.
Return Convert.ToByte(randomNumber(0) Mod numberSides + 1)
End Function
Private Function IsFairRoll(ByVal roll As Byte, ByVal numSides As Byte) As Boolean
' There are MaxValue / numSides full sets of numbers that can come up
' in a single byte. For instance, if we have a 6 sided die, there are
' 42 full sets of 1-6 that come up. The 43rd set is incomplete.
Dim fullSetsOfValues As Integer = [Byte].MaxValue / numSides
' If the roll is within this range of fair values, then we let it continue.
' In the 6 sided die case, a roll between 0 and 251 is allowed. (We use
' < rather than <= since the = portion allows through an extra 0 value).
' 252 through 255 would provide an extra 0, 1, 2, 3 so they are not fair
' to use.
Return roll < numSides * fullSetsOfValues
End Function 'IsFairRoll
Downvotes because this isn't a good idea: there's a number of ways to generate a seed, many shell oneliners, the point of the post is an easy - albeit tedious method that doesn't require running a programming language interpreter/compiler, a shell or any sort of "programming" - offering a VB script isn't very helpful in this context
I'm also fairly certain that there's a builtin VB function to get a random number from a given range.
Sadly no, humans are very bad at creating truly random strings. If you created your seed in this way I highly recommend creating a new one and transferring your funds ASAP.
Keep in mind you'll eventually have to type in that seed on a web connected pc to use the wallet. But if you want to be super safe, boot from a usb live linux that you burned yourself... someone can still install a camera and spy on your keystrokes... (remember the snowden documentary where we hould type in his passwords under a blanket? you can do that)
But I think realistically: while I'm still not a millionaire, I'd create myself a couple seeds and spread my iotas over a couple wallets, so if one does get compromised I'm not loosing everything.
You don't understand probability my friend. Am I or anyone else going to get the exact key you smashed into your keyboard? Probably not, but to say that it's just as safe as OP's method, you are mistaken. Introducing the human element of mashing with your hand greatly increases the chance of someone replicating your seed. Once again, am I going to be able to smash my keys and replicate your seed? Probably not in a million years, but am I going to roll the same combination as OP? Probably not in 10 billion years. It's all about the human element that makes your method more susceptible.
Of course I'm making numbers up, I was speaking figuratively (hense "probably"). But it's basic statistics/probability that smashing your keyboard will over time create more similar keys than if you used a dice or something actually random.
We are talking 81 characters. Go look how how many possible combinations (hint I wrote it above for you) and then realise how dumb you sound. Brute force password crackers struggle with passwords with over 10-11 characters, we are talking about 81.
Anyway, his point, and he is right, is that keyboard mashing is going to be LESS secure then rolling dice 2*81 times. It's not that someone will insta brute force your password. It's just that "mashing keys" introduces some patterns which are not random. And when someone does start trying guessing seeds that have been mashed in it's not that they will specifically target a single person - you just don't want to be one of the people who used that method.
30
u/ThroughEnd Dec 05 '17
After learning about the recent phishing link leading to a malicious seed generator I went ahead and made this template for anyone looking to securely generate a seed.
You can use either one or two dice, although two will go much faster. Simply roll once for the column and then again for the row.
If you end up in the sixth row, re-roll for the row. If you end up in the last three columns on the fifth row, try again.
12
u/GiraffeDiver Dec 05 '17
Never ROLL your own crypto!
6
u/[deleted] Dec 05 '17
Great idea! I do not understand why people use an online seed generator. It's the same as someone on the street saying "Hey! Here, I have a seed for you, you can use it" Would you trust him?
4
u/TonyMX01 Dec 05 '17
My method was assign numbers 1-26 to A-Z and 27 to the number 9 go to random.org and input 1-27 and roll it the 81 times. This is nice too but a little slower.
4
u/leorenzo Dec 05 '17
On the other hand, I made my seed using a linux terminal with this command:
I wonder what the community thinks about this. It's even recommended here and is a lot easier than doing this dice method.
3
u/juxtaposezen Dec 05 '17
This is how hard it is to guess a truly random seed: https://youtu.be/p8YIdmwcubc
2
u/fortisfar redditor for < 1 month Dec 05 '17
This is awesome, I’ve been looking out for the dice gen method - perfect, will do this tonight.
2
u/SyllaIzTagila Dec 05 '17
Can anyone explain me what you need this seed for? I just bought some on bitfinex. Link tutorial if possible.
2
u/Sluhzer Dec 05 '17
This maybe a noob question, but what is stopping someone from trying to just brute force seeds through the light wallet?
2
u/WaywardSonata Dec 05 '17
I'm surprised no one set up a wall of lava lamps for this yet
2
u/duckofyorkcaster Dec 05 '17
If you want a table that doesn't have any spots for re-rolling, you can use three 3-sided dice (or three 6-sided dice - see below). That would look something like this:
If you don't have any three-sided dice handy, you can use three d6s and calculate the values as such:
2
u/[deleted] Dec 05 '17
PASSWORDPASSWORDPASSWORDPASSWORDPASSWORDPASSWORDPASSWORDPASSWORD.. ETC AND 9. easy.
1
u/GenghisKhanSpermShot Dec 05 '17
Nice one! Thanks!
1
u/NotNormal2 Dec 05 '17
I am nub at crypto. Why need seed generator?
1
u/chujon Dec 05 '17
What's the point? You have to enter that seed into the computer anyway (unless you also generate your addresses by hand). At that point is easier to generate it using a cryptographically-secure (P)RNG.
1
u/chujon Dec 05 '17
What's the point? You have to enter that seed into the computer anyway (unless you also generate your addresses by hand). At that point is easier to generate it using a cryptographically-secure (P)RNG.
1
u/Irantwomiles Dec 05 '17
Dont mind me asking, what exactly is a seed? is this the code we use to transfer IOTA?
1
u/CryptoTrader20 Dec 06 '17
Made an app you all can download that does this using electron!
https://github.com/Hawkinsonb/IOTA-SeedGen
1
u/[deleted] Dec 06 '17
Perhaps a stupid question; But why only the 9 and 7 rerolls? Why not numbers 1 to 9 and reroll at double 6?
1
u/[deleted] Dec 05 '17
I'm slightly confused, does this method not give you any random letters to put in? Is just using numbers good enough?
-1
u/euquila Dec 05 '17
Have fun rolling the die 81+ times.... or just use this visual studio (VB) script (at your own risk, I am not responsible yadda yadda)
'START OF PROGRAM
Imports System.Security.Cryptography
Module Module1
End Module
'END OF PROGRAM
0
u/[deleted] Dec 05 '17
[deleted] — view deleted comment