Skip to content

Entropy Pool in AO for generating pseudo-random numbers in a deterministic environment

License

Notifications You must be signed in to change notification settings

edervanzei/ao-entropy-pool

Repository files navigation

AO Entropy Pool: /dev/urandom in AO

AO Entropy Pool is based on /dev/urandom, a CSPRNG (Cryptographically secure pseudorandom number generator), in AO.

Verifiable and deterministic generator, but extremely unpredictable.

Index

How it works?

AO Entropy Pool implements a circular pool of 8192 bytes. Every time an interaction occurs with the process, the "Add-Entropy" Handler is called, adding to the pool the following data from the message:

  • ID
  • Timestamp
  • Anchor
  • Block

These 4 fields were chosen for the following reason:

  • ID: A Hash of the message signature, by nature, hard to predict and manipulate
  • Timestamp, Anchor, Block: not controlled by the sender (at least, not at all)

AO Entropy Pool expect to other processes interact with it, simulating /dev/urandom, where the data sent by other processes work as noise for the pool.

When a random number is requested, slices of the pool are extracted and applied into a hash function (which can be chosen by the requester), then the hash digests are also shuffled in the pool.

Documentation

Here are the technical details about the implementation and the methods used to handle malicious users, spam, and others, while keeping the generator secure.

Contribute

WIP

About

Entropy Pool in AO for generating pseudo-random numbers in a deterministic environment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published