Bitcoin Forum
April 27, 2024, 05:29:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Creating a Bitcoin Core seed using base 6 number (Dice roll)  (Read 269 times)
vjudeu
Hero Member
*****
Offline Offline

Activity: 663
Merit: 1527



View Profile
September 08, 2023, 05:59:24 PM
Last edit: September 08, 2023, 06:20:57 PM by vjudeu
 #21

Quote
Code:
1 => 00
2 => 01
3 => 10
4 => 11
5 => 0
6 => 1
And introduce modulo bias? Better take odd numbers as zeroes, and even numbers as ones, or do something similar.

Edit:
Quote
99*6 is 594 bits
I guess rolling a dice once does not provide you 2^6=64 combinations. And I would roll it 256 times anyway, and treat each value as a single zero or one, to avoid modulo bias. Also, then you don't need additional tricks to get some 256-bit number out of that. Optionally, you can just collect those 99 numbers, write them as decimal numbers, and execute sha256sum on that string, it would be also sufficient, but personally I prefer treating each roll as a binary number.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
1714238977
Hero Member
*
Offline Offline

Posts: 1714238977

View Profile Personal Message (Offline)

Ignore
1714238977
Reply with quote  #2

1714238977
Report to moderator
1714238977
Hero Member
*
Offline Offline

Posts: 1714238977

View Profile Personal Message (Offline)

Ignore
1714238977
Reply with quote  #2

1714238977
Report to moderator
1714238977
Hero Member
*
Offline Offline

Posts: 1714238977

View Profile Personal Message (Offline)

Ignore
1714238977
Reply with quote  #2

1714238977
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714238977
Hero Member
*
Offline Offline

Posts: 1714238977

View Profile Personal Message (Offline)

Ignore
1714238977
Reply with quote  #2

1714238977
Report to moderator
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
September 08, 2023, 06:59:44 PM
Merited by vapourminer (1), vjudeu (1)
 #22

you should use a debiasing procedure like the one in the codex32 booklet: https://www.secretcodex32.com/
That's an interesting approach for dice, and one I had not seen before. It is essentially the same basis as the Von Neumann debiasing algorithm for coins I linked to earlier in the thread, where you flip twice and discard the result if the two flips are the same, but adapted for dice.

Having said that, it's also far more complicated. I like to keep things simple and would just stick to coin flips.

Are these really biased?
You would never know unless you rolled them thousands of times and performed some statistical analysis on the results. Safer to just assume they are and use a debiasing method.

And I would roll it 256 times anyway, and treat each value as a single zero or one, to avoid modulo bias.
You still need to correct for physical bias, which is far more simple with a coin than with a die.

Flip the coin twice:
HT - 0
TH - 1
HH or TT - discard

Repeat until you have 256 bits. No matter how biased your coin is, you'll always get a completely random result.
ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7407


Crypto Swap Exchange


View Profile
September 09, 2023, 11:56:49 AM
Merited by o_e_l_e_o (4)
 #23

you should use a debiasing procedure like the one in the codex32 booklet: https://www.secretcodex32.com/
That's an interesting approach for dice, and one I had not seen before. It is essentially the same basis as the Von Neumann debiasing algorithm for coins I linked to earlier in the thread, where you flip twice and discard the result if the two flips are the same, but adapted for dice.

Having said that, it's also far more complicated. I like to keep things simple and would just stick to coin flips.

Relevant discussion thread, https://bitcointalk.org/index.php?topic=5440916.0. Anyway, i also agree Codex32 is rather complicated.

I saw Andrew Poelstra talking about this on a "Bitcoin Layer" podcast recently. I have casino grade dice, with the sharp edges. Are these really biased? I assumed the casinos would demand some controls during manufacturing to try un-bias the dice.

Unless you're an expert, there's no way you could know whether the company actually create dice with casino grade / reduced biased. It's not rare occurrence for company to exaggerate or even lying about their product standard/capability.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!