←back to thread

97 points indigodaddy | 1 comments | | HN request time: 0s | source
Show context
ajross ◴[] No.45154693[source]
Article goes through a mostly irrelevant discussion about "52 factorial is a really really big number" before getting to the computer science meat of the headline:

RNG was seeded with a millisecond time of day, leading to 86.4M possible decks. Oooph.

replies(4): >>45154722 #>>45154909 #>>45154962 #>>45154998 #
shagie ◴[] No.45154909[source]
The number 52! is absurdly large. While the article is behind a paywall and so I can't see its full discussion, I'm reminded of https://czep.net/weblog/52cards.html that has a bit on the "how large is the number"

> Start by picking your favorite spot on the equator. You're going to walk around the world along the equator, but take a very leisurely pace of one step every billion years. The equatorial circumference of the Earth is 40,075,017 meters. Make sure to pack a deck of playing cards, so you can get in a few trillion hands of solitaire between steps. After you complete your round the world trip, remove one drop of water from the Pacific Ocean. Now do the same thing again: walk around the world at one billion years per step, removing one drop of water from the Pacific Ocean each time you circle the globe. The Pacific Ocean contains 707.6 million cubic kilometers of water. Continue until the ocean is empty.

And it goes on.

Numbers like Tree(3) or Loader's number or the various "these are really big mathematical functions" ( relevant xkcd https://xkcd.com/207/ )... we know we can't comprehend them. But 52! - that's something that we think we can get our head around... and it's mind boggling large once you start doing the math and trying to relate it to real things that we can relate to (which are mind bogglingly large).

replies(2): >>45155008 #>>45155403 #
gucci-on-fleek ◴[] No.45155008[source]
52! < 2^226, so it's not that big in computer terms. It's smaller than a single AVX2 register, a ChaCha20/AES-256/Curve25519 key, a pair of IPv6 addresses, etc. Still mindbogglingly huge, but not uncommonly large.
replies(1): >>45155074 #
danielheath ◴[] No.45155074[source]
Right, but storing 52! distinct values isn’t something a computer is going to be able to do.
replies(3): >>45155152 #>>45155183 #>>45155237 #
zmgsabst ◴[] No.45155152[source]
So?

You’re only using one deck at a time; so you only need to generate 1 bit randomly 226 times — then use that deck.

replies(1): >>45155205 #
bobbylarrybobby ◴[] No.45155205[source]
Without a bunch of (unentangled) electrons you can observe, getting 226 truly random bits in quick succession doesn't seem all that easy.
replies(3): >>45155273 #>>45155417 #>>45155880 #
1. alexey-salmin ◴[] No.45155273[source]
Depends on what you mean by "truly random" but if it's "cryptographically secure random" then it's not particularly hard.

There are strong monetary incentives to break all kinds of private keys but most of the time they hold pretty well.