Skip to content

Commit

Permalink
Update README to reflect prng struct wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zane Beckwith committed Sep 20, 2017
1 parent 89fc0c0 commit 3fae763
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A C implementation of elliptic-curve-based Direct Anonymous Attestation signatur

- The CMake build system is used for building.
- gcc
- libsodium (optionally, see below)
- For building the AMCL dependency:
- python3

Expand All @@ -37,17 +38,17 @@ ctest -V
## Random number generator

Many of the functions provided by this library (particularly, those used by an Issuer or a Member)
require a pointer to a pseudo-random number generator (type `csprng`).
require a pointer to a pseudo random number generator (type `ecdaa_prng`).
The security of these algorithms depends critically on the proper seeding of this prng.
This means that the first use of any `ecdaa_prng` MUST be preceeded by a call to
`ecdaa_prng_init` on the prng.

The seed for the `ecdaa_prng` is generated using code adapted from Libsodium's
`randombytes_buf`.
By default, the seed for the `ecdaa_prng` is generated from Libsodium's
`randombytes_buf` function.
A discussion on how this function works and any caveats can be found at Libsodium's webpage.
Specifically, the procedure for using a non-standard random number generator
(e.g. in environments where `/dev/urandom` isn't available but a hardware rng is)
may be useful.
To use a different function for obtaining cryptographically-secure random data for a seed,
pass the option `-DUSE_LIBSODIUM_RNG_SEED_FUNCTION=OFF` to cmake
and use the function `ecdaa_prng_set_seed_function` before any calls to `ecdaa_prng_init`.

## Naming Convention in API

Expand Down

0 comments on commit 3fae763

Please sign in to comment.