News for hackers. Stuff that matters.
Re:Librandombytes – a public domain library for generating r... by benj111 on Thursday January 26, 2023 @05:10PM (#34539601)
When are we going to get a distributed peer to peer randomness service.

I could roll a die in return for $random crypto currency.

Obviously the amount could vary depending on the amount of randomness. So me thinking of a random number would get less than a die roll which would get less than this comment.

Re:Librandombytes – a public domain library for generating r... by beardog on Thursday January 26, 2023 @05:16PM (#34539671)
If your values don't need to be secret, you can use the latest bitcoin header.[1]

Similar to centralized random beacons like the NIST[2] and Chile beacons.

1: https://eprint.iacr.org/2015/1015.pdf

2: https://csrc.nist.gov/projects/interoperable-randomness-beac...

Re:Librandombytes – a public domain library for generating r... by treis on Friday January 27, 2023 @05:31PM (#34552772)
Why would one need randomness that isn't secret?
Re:Librandombytes – a public domain library for generating r... by beardog on Saturday January 28, 2023 @04:00AM (#34556251)
Verifiable lotteries and time stamping are the use cases I am aware of.
Re:Librandombytes – a public domain library for generating r... by Nalta on Thursday January 26, 2023 @05:22PM (#34539729)
that sounds like a great idea! I'll return 3 when peers ask me for a random number, and then I'll start seeing if that seed shows us in any prominent RSA private keys
Re:Librandombytes – a public domain library for generating r... by benj111 on Thursday January 26, 2023 @07:30PM (#34540902)
As long as the 3 was randomly derived that's fine.
Re:Librandombytes – a public domain library for generating r... by dspillett on Thursday January 26, 2023 @05:59PM (#34540101)
> When are we going to get a distributed peer to peer randomness service.

(assuming you mean computers returning random numbers, and your people with dice is an analogy)

The problem with that is how do you trust the source if you need “cryptographically secret” random numbers. One of the sources could poison the well with bad entropy and increase by a small but significant amount the chance of guessing your keys.

OK, so you could the data from many sources, but that would add latency so not an option where performance matters and even then if someone gains control of a significant portion of the distributed system (just by standing up lots of hosts) the issue persists.

You could also do a bunch of statistical tests, but again that is work that will harm performance and if you are going to that sort of effort anyway you could setup your own random sources (a couple of active Linux boxes, on older Linux kernels running haveged, on newer ones the latter part isn't needed (https://github.com/jirka-h/haveged/issues/57)) and use those tests to make sure those sources are statically safe.

So such a service isn't really needed, and where it might be isn't likely to be trusted, so it could exist but as a play-thing not a serious service.

On my little home server, not a particularly up to date CPU etc, running 5.10, I can pull >3Gbit/sec from /dev/random. Heck, the Pi400 that is currently my router can hand out ~230Mbit/sec or entropy.

Re:Librandombytes – a public domain library for generating r... by benj111 on Thursday January 26, 2023 @07:42PM (#34541014)
>The problem with that is how do you trust the source if you need “cryptographically secret” random numbers.

Well in the modern age this is solved by upvotes and reputation score.

>it could exist but as a play-thing not a serious service.

I wasn't being particularly serious, well I'm seriously surprised someone hasn't tried it, but I'm not investing my own hard money in the idea so...

Re:Librandombytes – a public domain library for generating r... by er4hn on Thursday January 26, 2023 @06:20PM (#34540269)
It's a thing. As with all blockchain things, it's not an efficent thing, but it exists: https://ethereum.stackexchange.com/questions/191/how-can-i-s... .

The TL;DR is that:

- Everyone playing comes up with a random number X, which is kept local for now

- X is hashed, such that HASH(X) = Y, where Y is then sent to a server where everyone can view it (aka some blockchain smart contract). Some other stuff around preventing impersonators happens as well, but the hash being sent is the important bit. This is your commitment to the game.

- When everyone has submitted their Y values, they all send in their original X values as well

- Every X values is verified such that HASH(X) = Y.

- All the X values are combined, and used as a seed to an RNG (i.e. something like concatenation, run a KDF over the concatenation, use that output as a seed to an RNG)

- Now everyone knows which player run virtual coins, without a central decision point.

Re:Librandombytes – a public domain library for generating r... by benj111 on Thursday January 26, 2023 @07:35PM (#34540947)
Yes but how are they getting that random number X?

Is it from some rng generator or is it from nuclear decay of a Cesium atom?

This is what my product provides. Truly random (TM) numbers!

Re:Librandombytes – a public domain library for generating r... by deathanatos on Thursday January 26, 2023 @06:44PM (#34540489)
Re:Librandombytes – a public domain library for generating r... by benj111 on Thursday January 26, 2023 @07:29PM (#34540893)
I do find it interesting that the quality of a random number is completely divorced from the actual number itself.

If I gave the number 1 that could be random or not. The fact that it's a 1 is unimportant. Only how it was derived.

I suppose it's like free range eggs in that respect. But free range eggs and mathematics don't seem to be natural bedfellows.

Re:Librandombytes – a public domain library for generating r... by remram on Thursday January 26, 2023 @07:35PM (#34540953)
Cloudflare has exactly that: https://blog.cloudflare.com/randomness-101-lavarand-in-produ...

> LavaRand is a system that uses lava lamps as a secondary source of randomness for our production servers. A wall of lava lamps in the lobby of our San Francisco office provides an unpredictable input to a camera aimed at the wall. A video feed from the camera is fed into a CSPRNG, and that CSPRNG provides a stream of random values that can be used as an extra source of randomness by our production servers.

Re:Librandombytes – a public domain library for generating r... by cpeterso on Thursday January 26, 2023 @09:06PM (#34541597)
And the League of Entropy, which includes Cloudflare, for data that needs to be random but doesn't need to be secret: https://blog.cloudflare.com/league-of-entropy/
Re:Librandombytes – a public domain library for generating r... by ilyt on Friday January 27, 2023 @05:38AM (#34544613)
Both seems like a wank project made by bored engineers tbh...