diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-01-03 00:52:52 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-01-03 00:52:52 +0200 |
commit | a58f394e8dab0f309f340d743a5992213a748e0c (patch) | |
tree | b66d8cda5e82615bf762ce4a91bb4964e166aa2a /src | |
parent | ac62c8900d2f87c4232165ab1e294b4c65ce4db1 (diff) | |
download | gnutls-a58f394e8dab0f309f340d743a5992213a748e0c.tar.gz |
print the RSA and DH bits as well as EC bits for comparison.
Diffstat (limited to 'src')
-rw-r--r-- | src/benchmark-tls.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/benchmark-tls.c b/src/benchmark-tls.c index d0bbfdd8d5..4528b77192 100644 --- a/src/benchmark-tls.c +++ b/src/benchmark-tls.c @@ -53,6 +53,9 @@ // #define PARAMS_1024 #ifdef PARAMS_1024 + +static const int rsa_bits = 1024, ec_bits = 192; + const char *pkcs3 = "-----BEGIN DH PARAMETERS-----\n" "MIIBCwKBgQCsIrA9BK23OUVIwrC4c65YJ2t8bqoGpJpuISjO07lAbWHWa47Kf9/t\n" @@ -97,6 +100,9 @@ static unsigned char server_key_pem[] = "-----END RSA PRIVATE KEY-----\n"; #else + +static const int rsa_bits = 1840, ec_bits = 192; + /* DH of 1840 bits that is pretty close equivalent to 192 bits of ECDH. */ const char *pkcs3 = @@ -423,7 +429,7 @@ void benchmark_tls(int debug_level) test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 8 * 1024); test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 15 * 1024); - printf("\nTesting key exchanges:\n"); + printf("\nTesting key exchanges (RSA/DH bits: %d, EC bits: %d):\n", rsa_bits, ec_bits); test_ciphersuite_kx(PRIO_DH); test_ciphersuite_kx(PRIO_ECDH); test_ciphersuite_kx(PRIO_ECDHE_ECDSA); |