Skip to content

Commit

Permalink
simplify readme
Browse files Browse the repository at this point in the history
  • Loading branch information
isidroas committed Jun 9, 2024
1 parent 649dceb commit 3bf8d43
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
A didactic implementation of the Fortuna cryptographically secure pseudorandom number generator.
A didactic and minimal implementation of the Fortuna cryptographically secure pseudorandom number generator.

Examples only tested in Linux, but they should work also in macOS.

```
$ pip install .
Expand All @@ -19,25 +18,25 @@ EOF print_pools print_seed_file update_seed_file
(fortuna)
```

In your terminal, a colored tracing will be displayed:

![screenshot](./docs/screenshot.png)

# Learn specification
The example has only been tested on Linux, but it should work on macOS as well.

## Learn specification

- https://en.wikipedia.org/wiki/Fortuna_(PRNG)
- https://www.schneier.com/academic/paperfiles/fortuna.pdf
- https://www.schneier.com/academic/paperfiles/fortuna.pdf This is a chapter
part of the book `Cryptography Engineering`. Previous chapters will help you
to understand this one.

# Other implementations
## Other implementations

- https://github.com/otms61/fortuna
The base of this project but it seems unmaintained.
- https://github.com/seehuhn/fortuna
- Interface for entropy sources is easier for user/application.
In `entropy.go` the following functions are defined:
- `func (acc *Accumulator) addRandomEvent(source uint8, seq uint, data []byte)`
It accepts a sequence number instead of pool index.
- `func (acc *Accumulator) allocateSource() uint8`
To ease that 2 sources doesn't share the same identifier.
In line with the book: *allocate source numbers statically or dinamically*
- `func (acc *Accumulator) NewEntropyDataSink() chan<- []byte`
- `func (acc *Accumulator) NewEntropyTimeStampSink() chan<- time.Time`
- [pycrypto/Fortuna](https://github.com/pycrypto/pycrypto/tree/65b43bd4ffe2a48bdedae986b1a291f5a2cc7df7/lib/Crypto/Random/Fortuna)
- pycrypto/lib/Crypto/Random/Fortuna/
- FortunaAccumulator.py
Expand All @@ -47,12 +46,4 @@ EOF print_pools print_seed_file update_seed_file
- test_FortunaAccumulator.py
- test_FortunaGenerator.py
- test_SHAd256.py
- https://nvd.nist.gov/vuln/detail/cve-2013-1445
- `class FortunaPool`
- `which_pool()` function separated from `random_data()` making it more testeable
- seed file not supported
- extensively commented
- `class Util.Counter`
- `FortunaGenerator.max_blocks_per_request` explanation
- `AES` returns integers instead of bytes
- https://github.com/freebsd/freebsd-src/blob/main/sys/dev/random/fortuna.c

0 comments on commit 3bf8d43

Please sign in to comment.