5 ms·
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 headli
by ajross 1y ago
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.
- deleted 1y ago[deleted]
- sejje 1y agoIt didn't even go into the fact that it got exploited, which it did. And I don't think it almost brought them down.
- shagie 1y agoThe 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 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/ 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).
- gucci-on-fleek 1y ago52! < 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.
- danielheath 1y agoRight, but storing 52! distinct values isn’t something a computer is going to be able to do.
- adastra22 1y agoA quantum computer can.
- zmgsabst 1y agoSo? You’re only using one deck at a time; so you only need to generate 1 bit randomly 226 times — then use that deck.
- bobbylarrybobby 1y agoWithout a bunch of (unentangled) electrons you can observe, getting 226 truly random bits in quick succession doesn't seem all that easy.
- alexey-salmin 1y agoDepends 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.
- Sanzig 1y agoRDRAND has a throughput of hundreds of megabytes per second on most processors. Getting 226 bits is pretty easy, even shuffling millions of decks per second you'd be bottlenecked elsewhere. (That does sound like a fun optimization challenge: "write a program to fairly shuffle the most decks of cards per second possible.")
- kerkeslager 1y agoSure, it's a big number, but nobody was ever approaching the problem of generating a randomly shuffled deck by generating all 52! possibilities and choosing one of them.
- deleted 1y ago[deleted]