Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
December 26th, 2011, 11:27 AM
 Zatara27
Registered User

Join Date: Dec 2011
Posts: 5
Time spent in forums: 1 h 38 sec
Reputation Power: 0
512 bit length key consumes more time than 1024

hi there,

i ve got a strange situation:

when i'm trying to encrypt file (10 mb size) with RSA 512 bit encryption key, it needs about 1 minute for encryption..

and

when i'm trying to encrypt same file with RSA 1024 bit encryption key it needs 22 seconds for encryption...

is it normal?

#2
December 26th, 2011, 05:31 PM
 christopherx
Registered User

Join Date: Dec 2011
Posts: 11
Time spent in forums: 1 h 32 m 54 sec
Reputation Power: 0
Quote:
 Originally Posted by Zatara27 hi there, i ve got a strange situation: when i'm trying to encrypt file (10 mb size) with RSA 512 bit encryption key, it needs about 1 minute for encryption.. and when i'm trying to encrypt same file with RSA 1024 bit encryption key it needs 22 seconds for encryption... is it normal?

Haha.. no that is not normal. What implementation of the RSA algorithm are you using? Some algorithms, like RSA 1024 bit, will have optimisations.

If I were you I would construct a proper test, run a sequence of different files through the two algorithms and log the times taken. Make a graph of it, and you'll be able to discern a pattern. It might be the case that this file fits one of the optimisations very well. And if it turns out 1024 bit encryption is quicker, just enjoy it! All the more security for you

#3
December 28th, 2011, 08:28 AM
 Zatara27
Registered User

Join Date: Dec 2011
Posts: 5
Time spent in forums: 1 h 38 sec
Reputation Power: 0
Quote:
 Originally Posted by christopherx Haha.. no that is not normal. What implementation of the RSA algorithm are you using? Some algorithms, like RSA 1024 bit, will have optimisations. If I were you I would construct a proper test, run a sequence of different files through the two algorithms and log the times taken. Make a graph of it, and you'll be able to discern a pattern. It might be the case that this file fits one of the optimisations very well. And if it turns out 1024 bit encryption is quicker, just enjoy it! All the more security for you

actually i made tests like this:

created 5 different files with different size...
also i included in this application time option..

which calculates how much time did it consume on encryption process...

when i m encrypting file with 512 bit key length it needs 10 seconds
and with 1024 bit key length it needs 5 seconds.

in this case file size is 2.5 mb

#4
December 29th, 2011, 04:46 PM
 christopherx
Registered User

Join Date: Dec 2011
Posts: 11
Time spent in forums: 1 h 32 m 54 sec
Reputation Power: 0
I see..

and what language are you using? Is it your own version of the RSA algorithm or is it a package that came with the language?

 Viewing: Dev Shed Forums > System Administration > Security and Cryptography > 512 bit length key consumes more time than 1024