News for hackers. Stuff that matters.
Re:Ask HN: Securely store sensitive data in the DB? by raverbashing on Sunday July 28, 2013 @06:46AM (#6116290)
- Keep passwords in memory (so as if you start the service it prompts for the password)

- Asymmetrical crypto. So for example, you encrypt your CC data upon sign-up but then to run the charges you need the private key (and this is somewhere else)

- Enable SSL communication with your DB. Postgres has this, because being defeated by network sniffing is bad.

Re:Ask HN: Securely store sensitive data in the DB? by ra on Sunday July 28, 2013 @07:34AM (#6116364)
Memory is not secure. It's quite a common attack to grab keys / passwords from the memory of an executing program.
Re:Ask HN: Securely store sensitive data in the DB? by raverbashing on Sunday July 28, 2013 @11:29AM (#6116941)
No, it is one of the safest places.

If your attacker has access to arbitrary memory of a process, you're using an insecure OS/version. Or they dumped your process memory using a vulnerability (in your system)

Yes, there are some possible attacks (page file, cache, etc)

Attacking memory after a reboot requires physical access (unless you hibernated without an encrypted file, in this case...)

It certainly beats the security of file/network

Re:Ask HN: Securely store sensitive data in the DB? by ra on Monday July 29, 2013 @05:47PM (#6124100)
Just because it's more secure than network / file doesn't mean it's secure. That's why we have smartcards / HSMs.
Re:Ask HN: Securely store sensitive data in the DB? by raverbashing on Tuesday July 30, 2013 @10:16AM (#6127046)
Smartcards are vulnerable as well and there has been successful attacks towards some smartcards (google it)

And not every system has an HSM available

Re:Ask HN: Securely store sensitive data in the DB? by ra on Wednesday July 31, 2013 @07:00AM (#6132875)
Sure but smartcards and HSMs are slow and in a properly managed environment are much safer than memory.

Whether or not the OP has an HSM is moot. The OP said, "I want to design and implement a solution as secure as it can be" ... and that means (among many other things) keys on HSM.

Re:Ask HN: Securely store sensitive data in the DB? by nandemo on Sunday July 28, 2013 @08:07PM (#6118659)
In the first case, what if we're running a service in a cluster that starts instances automatically?