#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    5
    Rep 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. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    11
    Rep Power
    0
    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
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    5
    Rep Power
    0
    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
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    11
    Rep 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?

IMN logo majestic logo threadwatch logo seochat tools logo