leocharre has asked for the wisdom of the Perl Monks concerning the following question:
I have a web app transmitting info via ssl.
This app allows the server to receive client requests to meddle with local files.
The server encrypts "references" (used in the vaguest sense here) to files the client is allowed to meddle with, sends it to them (the list of options, files they can select).
The server receives a selected reference, decrypts it, checks that the user is allowed to screw with it and how much, and proceeds.
I am using Crypt::Lite to encrypt the references and other data, with a randomly generated key (per session).
What I am finding is.. For 500 references, this can take 1.4 seconds.
I compared making the key (the encrypt string) eight chars, four chars, one char.. and it seems to make little difference in expense.
Anybody suggest something faster then Crypt::Lite? Should I use something more mediocre? Maybe even make a half-@zed encryption method myself- since this is already in ssl and they key is random every session.. and.. the reference is checked once decrypted... ??
update: (not sure about this.. but it's deff looking like crypt lite is a bull )
small string, (38 chars) 100 trials of Crypt::Lite::encrypt (186.422ms total), 1.864ms/trial 100 trials of Crypt::Lite::decrypt (191.886ms total), 1.919ms/trial 100 trials of Crypt::CBC::encrypt_Camellia (122.917ms total), 1.229ms/trial 100 trials of Crypt::CBC::decrypt_Camellia (16.598ms total), 165us/trial 100 trials of Crypt::CBC::encrypt_Blowfish (138.889ms total), 1.389ms/trial 100 trials of Crypt::CBC::decrypt_Blowfish (31.868ms total), 318us/trial 100 trials of Crypt::CBC::encrypt_CAST5 (121.867ms total), 1.219ms/trial 100 trials of Crypt::CBC::decrypt_CAST5 (14.445ms total), 144us/trial 100 trials of Crypt::CBC::encrypt_IDEA (122.123ms total), 1.221ms/trial 100 trials of Crypt::CBC::decrypt_IDEA (15.692ms total), 156us/trial 100 trials of Crypt::CBC::encrypt_DES (121.836ms total), 1.218ms/trial 100 trials of Crypt::CBC::decrypt_DES (15.422ms total), 154us/trial 100 trials of Crypt::CBC::encrypt_Rijndael (123.684ms total), 1.237ms/trial 100 trials of Crypt::CBC::decrypt_Rijndael (15.554ms total), 155us/trial 100 trials of Crypt::CBC::encrypt_DES_EDE3 (131.234ms total), 1.312ms/trial 100 trials of Crypt::CBC::decrypt_DES_EDE3 (24.392ms total), 243us/trial large string, (6490 chars) 100 trials of Crypt::Lite::encrypt (21.259s total), 212.592ms/trial 100 trials of Crypt::Lite::decrypt (22.283s total), 222.829ms/trial 100 trials of Crypt::CBC::encrypt_Camellia (461.235ms total), 4.612ms/trial 100 trials of Crypt::CBC::decrypt_Camellia (371.517ms total), 3.715ms/trial 100 trials of Crypt::CBC::encrypt_Blowfish (668.723ms total), 6.687ms/trial 100 trials of Crypt::CBC::decrypt_Blowfish (611.216ms total), 6.112ms/trial 100 trials of Crypt::CBC::encrypt_CAST5 (723.785ms total), 7.238ms/trial 100 trials of Crypt::CBC::decrypt_CAST5 (622.947ms total), 6.229ms/trial 100 trials of Crypt::CBC::encrypt_IDEA (679.809ms total), 6.798ms/trial 100 trials of Crypt::CBC::decrypt_IDEA (634.063ms total), 6.341ms/trial 100 trials of Crypt::CBC::encrypt_DES (666.129ms total), 6.661ms/trial 100 trials of Crypt::CBC::decrypt_DES (607.540ms total), 6.075ms/trial 100 trials of Crypt::CBC::encrypt_Rijndael (460.238ms total), 4.602ms/trial 100 trials of Crypt::CBC::decrypt_Rijndael (370.174ms total), 3.702ms/trial 100 trials of Crypt::CBC::encrypt_DES_EDE3 (1.497s total), 14.972ms/trial 100 trials of Crypt::CBC::decrypt_DES_EDE3 (1.425s total), 14.251ms/trial
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Anything faster then Crypt::Lite?
by samtregar (Abbot) on Jul 27, 2006 at 17:21 UTC | |
by ikegami (Patriarch) on Jul 27, 2006 at 17:39 UTC | |
by leocharre (Priest) on Jul 27, 2006 at 18:47 UTC | |
|
Re: Anything faster then Crypt::Lite?
by CountZero (Bishop) on Jul 27, 2006 at 21:01 UTC | |
by leocharre (Priest) on Jul 28, 2006 at 14:04 UTC | |
|
Re: Anything faster then Crypt::Lite?
by Anonymous Monk on Jul 28, 2006 at 05:54 UTC | |
|
Re: Anything faster then Crypt::Lite?
by gellyfish (Monsignor) on Jul 28, 2006 at 14:13 UTC | |
by leocharre (Priest) on Jul 29, 2006 at 12:31 UTC |