As per PCI-DSS requirements, we have to use either HSM (Hardware Security Module), or Key Server to store the KEK (Key Encryption Key).

If I'm storing encrypted DEK (Data Encryption Key) in an App Server, how can I securely store the KEK which encrypts the DEK?

The two options:

  • If I decide to use a Key Server, then if someone hacks the App Server, he could easily gain access to the Key Server. So how to protect my Key Server?

  • If HSM is used for storing the KEK, then if someone hacks my app server, can they hack my HSM too?

Which of the two would be a more secure way, HSM or a Key server?

  • Possible duplicate: security.stackexchange.com/questions/52236/… – kiBytes Mar 3 '14 at 10:21
  • @kiBytes I saw that question. But I want to know how to protect key server or HSM? Is that easy to compromise key server or HSM? – nathi Mar 3 '14 at 10:23
  • So, is it your question "how can I protect a server?"? if so the HSM thing is incidental, isn't it? – kiBytes Mar 3 '14 at 10:25
  • @kiBytes I also want to know which is the best way and how to protect it? Someone says HSM is more protective, but how do they say that it is more secure? – nathi Mar 3 '14 at 10:28
  • nathi - can you clarify which question you want answered. And asking for 'best' is not going to work here. You need to state the problem you are trying to solve, so we can help. – Rory Alsop Mar 3 '14 at 11:00

The point of a key server or HSM is to isolate the application from the storage (and potentially usage) of the key. Ideally, you would want to offload and rate limit all cryptography operations to the HSM or Key Server so that the application never has access to the decryption key.

This allows you to do intrusion detections such as rate limits and such to prevent bulk decryption of records if the application server is compromised. The attacker could still queue up records to be passed through the HSM or Keyserver for decryption, however the spike in the rate of requests would start throwing up red flags that a compromise may have occurred.

Either could potentially be more secure since both provide the same type of isolation. A key server provides a higher degree of physical isolation, but depending on implementation, the complexity may leave a larger attack surface. HSMs on the other hand are simpler, but also local. Either way, if properly implemented, only a vulnerability in the interfaces themselves should allow the key to leak.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.