Custom fork of rust-secp256k1 with unsafe modifications for higher speed. Unsuitable for production.
Go to file
Andrew Poelstra d94345f721 Generate keys from Fortuna rather than always using the OsRng
When creating a Secp256k1, we attach a Fortuna CSRNG seeded from the
OS RNG, rather than using the OS RNG all the time. This moves the
potential RNG failure to the creation of the object, rather than at
every single place that keys are generated. It also reduces trust
in the operating system RNG.

This does mean that Secp256k1::new() now returns an IoResult while
the generate_* methods no longer return Results, so this is a breaking
change.

Also add a benchmark for key generation. On my system I get:

test tests::generate_compressed   ... bench:    492990 ns/iter (+/- 27981)
test tests::generate_uncompressed ... bench:    495148 ns/iter (+/- 29829)

Contrast the numbers with OsRng:

test tests::generate_compressed   ... bench:     66691 ns/iter (+/- 3640)
test tests::generate_uncompressed ... bench:     67148 ns/iter (+/- 3806)

Not too shabby :)

[breaking-change]
2014-08-31 22:26:02 -05:00
src Generate keys from Fortuna rather than always using the OsRng 2014-08-31 22:26:02 -05:00
.gitignore Add gitignore 2014-08-04 19:59:58 -04:00
.travis.yml Travis speaks rust now :D 2014-08-27 10:58:24 -07:00
Cargo.toml Generate keys from Fortuna rather than always using the OsRng 2014-08-31 22:26:02 -05:00
LICENSE Add `LICENSE`. 2014-08-10 16:23:40 -07:00
LICENSE-CC0 Add CC0 license and header to all files 2014-08-11 19:26:45 -07:00
Makefile Initial (failing) implementation. 2014-07-06 22:41:22 -07:00