diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-12-12 02:18:59 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-12-12 02:56:01 +0100 |
commit | bd617810e4338294aa0c6b74da81274bae045f10 (patch) | |
tree | d938f496564dd1e2f20dc426a9128b74e4c9d8e9 /lib/auth/rsa.c | |
parent | 09ec28b2d701d7b27a1a2171988b98ff08690257 (diff) | |
download | gnutls-bd617810e4338294aa0c6b74da81274bae045f10.tar.gz |
Optimizations in DH parameter generation.
The larger prime is find first and the big loop needs to
find a smaller prime, increasing performance.
The _gnutls_rnd() function is now inline and GNUTLS_RND_NONCE doesn't update random generator state.
Diffstat (limited to 'lib/auth/rsa.c')
-rw-r--r-- | lib/auth/rsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c index a9a88aa872..030ed35dde 100644 --- a/lib/auth/rsa.c +++ b/lib/auth/rsa.c @@ -213,7 +213,7 @@ proc_rsa_client_kx (gnutls_session_t session, opaque * data, /* we do not need strong random numbers here. */ - ret = gnutls_rnd (GNUTLS_RND_NONCE, session->key->key.data, + ret = _gnutls_rnd (GNUTLS_RND_NONCE, session->key->key.data, session->key->key.size); if (ret < 0) { @@ -268,7 +268,7 @@ _gnutls_gen_rsa_client_kx (gnutls_session_t session, gnutls_buffer_st* data) return GNUTLS_E_MEMORY_ERROR; } - ret = gnutls_rnd (GNUTLS_RND_RANDOM, session->key->key.data, + ret = _gnutls_rnd (GNUTLS_RND_RANDOM, session->key->key.data, session->key->key.size); if (ret < 0) { |