I have a vision to develop a userscript that can decrypt encrypted text depending on the user who created the text. To achieve this, I am looking to implement a database within the browser to store and retrieve decryption keys.
Imagine if Twitter user A wants to receive encrypted posts from Twitter user B. The userscript will prompt user A to authenticate in order to access the decryption keys stored in the database. Upon confirming that the post is from user B, the userscript will call upon the database to provide the necessary decryption keys for user B.
The ideal database should:
1. Require authentication for accessing user's keys
2. Come with a JavaScript API for easier integration
3. Be able to transmit decryption keys in JSONP format for cross-domain compatibility
4. Offer a sharing feature so that user A can share decryption keys with user B upon request
Do you know of any open-source databases that meet these criteria?