Created
January 17, 2011 13:25
-
-
Save DanielG/782835 to your computer and use it in GitHub Desktop.
Unhosted privacy enhancements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Make keys unfindable | |
| key: sha1( salt + keyPath ) | |
| salt: sha1(rsaSign(userEmail, userPrivKey)) | |
| or sha1(sessionKey) # Probably better, a subscriber would already have the session key | |
| Example | |
| ------- | |
| Publisher: SET sha1("sekey" + "/blog"): aes("Hello World", "sekey") | |
| Subscriber: SEND sha1("/subscribe"): msgEnc("SUB /blog") | |
| Publisher: RECEIVE sha1("/subscribe") | |
| -> SEND sha1("/published/blog"): msgEnc("PUB sekey") | |
| Subscriber: RECEIVE sha1("/published/blog") | |
| -> "sekey" | |
| Subscriber: GET sha1("sekey" + "/blog") | |
| -> "Hello World" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment