Hacker News new | ask | show | jobs
by singlow 4790 days ago
Well - it is not likely you will need you public key on the non-web-accessible server. In this type of application the public key is needed in the place that encryption happens and the private key is needed where decryption happens. If the two are on the same machine it likely means you messed up.
1 comments

Or it means you didn't bother to delete the public key (since, hey, free backup at the cost of not typing rm) when you generated the keypair.
You're assuming a single piece of information has a single key-pair. E.g.:

  1. Obtain sensitive information
  2. Generate a new key-pair
  3. Encrypt with public key
  4. Store encrypted info
  5. Delete public key
  6. Use private key to decrypt when reading the data
It's also likely they they were using one key-pair to encrypt all of their data (or all of a specific type, e.g. one key-pair to encrypt all passwords). In this case, the public key would be needed to encrypt new data coming in.
No, I was thinking the latter, but the data should in that case be encrypted with the public key, which can be copied to the web-facing servers.