I have developed an online system (HTML+Javascript+PHP) that allows users to encrypt and decrypt messages using opengpg.js.
My main concern is the security of storing the private key on the server. Is there any way to store the data locally on the user's machine so that the HTML page can access it and retrieve the key?
There will be approximately 15 users accessing the site, so I am willing to manually configure their clients if necessary.
One approach I have tried, though unsuccessfully, is:
HTML Page (hosted on the Internet):
<script src="file:///Users/kristoffer/Documents/key.js"></script>
<script>yourkey = key;</script>
Local file (key.js)
key = "the-private-key";