A couple of days ago, /u/Quantris posted about using a deck of cards to generate the random input to create a seed phrase. It's a great idea -- Neal Stephenson used a card-deck cryptosystem in "Cryptonomicon" to allow secure communications between prisoners, and an appendix to the novel written by a professional cryptographer laid out exactly how that system ("Pontifex") works.
However, for generating random binary digits (bits), I think there may be an issue with the deck of cards becoming steadily more predictable as you go deeper into it. While I think using cards is a great idea, I also think there may be some patterns in the output. (I may be mistaken -- his code may take this issue into account. I don't know Python and haven't waded through it to figure out what it's doing.) The reason is that while the initial card is purely random, the second cannot be identical to the first, the third cannot be identical to either of the first two, ... , the last card is absolutely determined and known by what all the prior cards were and you don't even have to look at it to know what it must be.
So, with that said, I think you could still get pure randomness, for example by playing ye olde childehoode gamme "52-card pickup" -- throw the cards into the air, shove them back together into a loose pile, push the pile back into deck form, and then take each card off the deck in order to see whether it is face-up or face-down. You only get 52 bits this way but they are absolutely nondeterministic. Do it over a blanket to make the gathering-them-up a bit easier.
Possibly important: use a FRESH DECK. A well-shuffled deck may no longer lie flat, and having U-shaped cards would affect air resistance as they fall, which may bias them toward one side or the other.
I had originally thought of doing red/black, but again, that becomes deterministic. You would always get exactly 26 1-bits and 26 0-bits in your initial outputs, which would reduce the search space considerably. I don't think de-biasing would help with that.
If you want to be more assured of randomness, you can use the von Neumann method of getting unbiased results from a biased coin. Edit: brain failure on my part, this doesn't work because it's different cards being compared. The vNm would require flipping a single card repeatedly. Oops.
Do this five times (or ten times) and you get 260 bits (or, if doing this with von Neumann's de-biasing, that plus or minus a few). You can use fewer if instead of generating single private keys you're generating seed phrases with something that uses less (IIRC some of the systems use 80 to 128 bits).
Does anyone see problems with this?
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments