Skip to content

Instantly share code, notes, and snippets.

@DanielG
Created January 17, 2011 13:25
Show Gist options
  • Select an option

  • Save DanielG/782835 to your computer and use it in GitHub Desktop.

Select an option

Save DanielG/782835 to your computer and use it in GitHub Desktop.
Unhosted privacy enhancements
# 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