PGPSecretKey.extractPrivateKey taking > 20s

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PGPSecretKey.extractPrivateKey taking > 20s

Jonny Rylands

Hi

 

I’m using version 1.54 of bcpg-jdk15on to decrypt and verify a 6 KB PGP (encrypted and signed) file.

 

I can successfully decrypt and verify the signature of the PGP file, however it is taking more than 20 seconds on a 2.9GHz i5 machine with 16GB of RAM.

 

Stepping through the code shows that the majority of the time is taken on the following line:

 

PGPPrivateKey pgpPrivateKey = pgpSecretKey.extractPrivateKey(pbeSecretKeyDecryptor);

 

The key is a 4096 bit RSA key.

 

Is this an expected length of time for such a key?

 

Many thanks

Jonny

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PGPSecretKey.extractPrivateKey taking > 20s

Mark Grandi
I notice when debugging that decrypting the keys takes a very long time, but having it run normally (or debugging before you hit a breakpoint) its not as bad.

~Mark 

On Jul 14, 2016, at 10:56, Jonny Rylands <[hidden email]> wrote:

Hi
 
I’m using version 1.54 of bcpg-jdk15on to decrypt and verify a 6 KB PGP (encrypted and signed) file.
 
I can successfully decrypt and verify the signature of the PGP file, however it is taking more than 20 seconds on a 2.9GHz i5 machine with 16GB of RAM.
 
Stepping through the code shows that the majority of the time is taken on the following line:
 
PGPPrivateKey pgpPrivateKey = pgpSecretKey.extractPrivateKey(pbeSecretKeyDecryptor);
 
The key is a 4096 bit RSA key.
 
Is this an expected length of time for such a key?
 
Many thanks
Jonny

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PGPSecretKey.extractPrivateKey taking > 20s

Jonny Rylands

Thanks, that is it!

 

I’ve been mainly running in debug mode – and not yet noticed that it runs way quicker without debug.

 

Regards

Jonny

 

From: Mark Grandi <[hidden email]>
Date: Thursday, 14 July 2016 at 19:38
To: <[hidden email]>
Cc: <[hidden email]>
Subject: Re: [dev-crypto] PGPSecretKey.extractPrivateKey taking > 20s

 

I notice when debugging that decrypting the keys takes a very long time, but having it run normally (or debugging before you hit a breakpoint) its not as bad.

 

~Mark 

 

On Jul 14, 2016, at 10:56, Jonny Rylands <[hidden email]> wrote:

 

Hi

 

I’m using version 1.54 of bcpg-jdk15on to decrypt and verify a 6 KB PGP (encrypted and signed) file.

 

I can successfully decrypt and verify the signature of the PGP file, however it is taking more than 20 seconds on a 2.9GHz i5 machine with 16GB of RAM.

 

Stepping through the code shows that the majority of the time is taken on the following line:

 

PGPPrivateKey pgpPrivateKey = pgpSecretKey.extractPrivateKey(pbeSecretKeyDecryptor);

 

The key is a 4096 bit RSA key.

 

Is this an expected length of time for such a key?

 

Many thanks

Jonny

 

Loading...