summaryrefslogtreecommitdiffstats
path: root/crypto/ecdsa
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-09-09 12:14:36 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-09-09 12:14:36 +0000
commit1a3914fe0cb3f1bcfeb7e80bbcb72bc7f279892d (patch)
treef4df00e107223d75b90babe453bc1f72744a25fb /crypto/ecdsa
parentb7e3cb31a55e662b4f16f15e196019dac5e07293 (diff)
Seed PRNG with DSA and ECDSA digests for additional protection against
possible PRNG state duplication.
Diffstat (limited to 'crypto/ecdsa')
-rw-r--r--crypto/ecdsa/ecs_sign.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ecdsa/ecs_sign.c b/crypto/ecdsa/ecs_sign.c
index 74b1fe8caf..353d5af514 100644
--- a/crypto/ecdsa/ecs_sign.c
+++ b/crypto/ecdsa/ecs_sign.c
@@ -57,6 +57,7 @@
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#endif
+#include <openssl/rand.h>
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey)
{
@@ -83,6 +84,7 @@ int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char
EC_KEY *eckey)
{
ECDSA_SIG *s;
+ RAND_seed(dgst, dlen);
s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
if (s == NULL)
{