Java Keystore is giving performance issue? -


this question has answer here:

we have developed application encrypt/decrypt request/response from/to server. doing performance testing of encryption/decryption application have observed encryption/decryption process taking time, while many threads doing @ same time. identify issue, have logged every methods part of encryption/decryption process. logger have found key fetching process taking 70-80% of time overall time of process.

  1. we have used aes algorithm encryption/decryption
  2. aes key stored in key store unique id.
  3. before encryption/decryption process, fetch aes key stored against unique id key store & perform encryption/decryption.
  4. performance getting worse when key store size getting increased.

on further analysis, have found key store internally using hashtable. giving performance issue?

when key store size 2002 --- tps 85 key store size 14007 -- tps 38

please help.

note: answer bases on assumptions not provide details on used keystore format (jks, bks, jceks, ...).

i assume every time need key, load java keystore file (jks format).

the key store protected password , if don't use (empty password) password string used generate encryption key protects java keystore.

your main problem key derivation process password incorporates anti-brute-force algorithm performs 1000 or more iterations of sha1 on password. consumes lot of time intended result exists slowing down brute-force attacks.

edit: seems jks format not performs operation when loading when loading key.

conclusion: don't load java keystore or key every time. not designed loaded more once in minute.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -