]> git.ipfire.org Git - thirdparty/tor.git/commit
Refactor strong os-RNG into its own function
authorNick Mathewson <nickm@torproject.org>
Tue, 4 Dec 2012 04:31:07 +0000 (23:31 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 2 Jan 2013 19:11:13 +0000 (14:11 -0500)
commit25c05cb747eece7d720a3f79c172e83a0e79a3a1
tree8aab82509ef888cbc2b385fb3275405ee0381577
parent4d36eafd74e9c66a0dc76e5543a2aaabfa11f8b2
Refactor strong os-RNG into its own function

Previously, we only used the strong OS entropy source as part of
seeding OpenSSL's RNG.  But with curve25519, we'll have occasion to
want to generate some keys using extremely-good entopy, as well as the
means to do so.  So let's!

This patch refactors the OS-entropy wrapper into its own
crypto_strongest_rand() function, and makes our new
curve25519_secret_key_generate function try it as appropriate.
src/common/crypto.c
src/common/crypto.h
src/common/crypto_curve25519.c
src/test/test_crypto.c