Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reza-hackathons/gandom
Distributed PRNG based on Golem.
https://github.com/reza-hackathons/gandom
golem
Last synced: 7 days ago
JSON representation
Distributed PRNG based on Golem.
- Host: GitHub
- URL: https://github.com/reza-hackathons/gandom
- Owner: reza-hackathons
- License: mit
- Archived: true
- Created: 2020-12-24T12:10:44.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-02T15:01:50.000Z (about 4 years ago)
- Last Synced: 2024-04-09T02:20:34.357Z (10 months ago)
- Topics: golem
- Language: C++
- Homepage:
- Size: 3.04 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golem - Gandom - Extract random streams from providers. Supports two PRNGs, one based on Chaos machines and the other that makes use of Sodium. (Archive / Apps)
README
Tap on Golem's randomness ocean
## Rational
A single computer's entropy allowance is a stub. This project tries to extract random streams from the distributed network of computers provided by [Golem](https://golem.network). The idea is to have a rest API sitting on some address that when invoked, asks Golem nodes for their random data. Each node runs some special software that employ a variaty of PRNGs to provide the requested randomness. At the moment, there are two PRNGs, one based on [Chaos machines](https://github.com/maciejczyzewski/libchaos) and the other that makes use of [Sodium](https://libsodium.org/).### Invocation
first off please head to Golem handbook and learn how to setup a [requestor workflow](https://handbook.golem.network/requestor-tutorials/flash-tutorial-of-requestor-development).
Simply run the `script.sh` file via your shell and wait for the output. The output you receive depends on the length and number sources you pass to the script.
Example:
`~$ ./script.sh -s 8 -l 16` asks for 16 bytes of random data from 8 sources.
The output would be:
{
"csprng": {
"xored": "2NyHU/7UtXf5q0kZsi9C5g==",
"streams": [
"F4wOs1o/9K0CaxYpBnrgNQ==",
"B+ID7aLtBYWicr5bdSV00w==",
"IpY6WCP3LcsnBOnq4HXWQA==",
"JawP1hOK6EqWHfFZ8KarIg==",
"FH5XJRJ7VkDbly6vV7mrCw==",
"oF9yoBlzqsTASyl4YOCQRA=="
]
},
"chaos": {
"xored": "NKMedZrCXZZsaYCAyZoiyg==",
"streams": [
"pwzGJczOkP6KQuQUySiuNg==",
"tE8AgO7SFzp2gHz6WNx+Xg==",
"CNBMpcYIJnTwwSgRXKqvTA==",
"mC+wQN7sDpDPCWB4TtqhgA==",
"OgCY3WKKRJrsboyegWAivA==",
"rKfiPKBYglTdZ5CAzBKloA=="
]
}
}
If sources are > 2, two are choosen in random, removed from the list and xored. This is done to enrich the outcome.## Caveat
Note that this API is just an experiment and still in development. So, please employ extreme caution in using it in real applications.## TODO
- Make sure the sources are distinct
- Cryptographically secure tests & benchmarks
- Hook a public REST API for smart contract consumers## Demo
[Presentation in PDF](https://siasky.net/BACpmQBkTw5Ut1wuWFa6r3xQZcQMGlf26LhE2PmpkviVAQ)
[Video-taped demo](https://youtu.be/Em1Z0dweJ98)