use 128-bit hex seed

This commit is contained in:
Pieter Wuille
2015-02-14 15:30:58 -08:00
parent 02efd06554
commit 8956111802
3 changed files with 31 additions and 10 deletions

View File

@@ -17,8 +17,8 @@ static secp256k1_rfc6979_hmac_sha256_t secp256k1_test_rng;
static uint32_t secp256k1_test_rng_precomputed[8];
static int secp256k1_test_rng_precomputed_used = 8;
SECP256K1_INLINE static void secp256k1_rand_seed(uint64_t v) {
secp256k1_rfc6979_hmac_sha256_initialize(&secp256k1_test_rng, (const unsigned char*)"PRNG", 4, (const unsigned char*)&v, sizeof(v));
SECP256K1_INLINE static void secp256k1_rand_seed(const unsigned char *seed16) {
secp256k1_rfc6979_hmac_sha256_initialize(&secp256k1_test_rng, (const unsigned char*)"TestRNG", 7, seed16, 16);
}
SECP256K1_INLINE static uint32_t secp256k1_rand32(void) {