Hello All,
I made a more detailed ZeroBin implementation plan (see below). Please
comment, question, etc.
-Sean
__________
ZeroBin Implementation Plan
The ZeroBin implementation is a great proof of concept for the first
round of encryption in Privly. Since integrating existing projects
speeds development and saves resources, I drew up this plan to
generalize the ZeroBin application to Privly's needs. I have not
showed these changes to the ZeroBin dev yet because I wanted to float
the plan with you all first.
How ZeroBin Works
Basically, ZeroBin is an extension-less web application for generating
and posting encrypted content to a server, as well as fetching it and
decrypting content for viewing. ZeroBin uses the Stanford Web Crypto
Library (based in Javascript*) to encrypt content before sending it to
the remote server. The remote server saves the encrypted text and
sends back a URL for the saved content. When the client-side
application receives the URL, it appends the decryption key as an
anchor. Since the decryption key is never sent to the remote server
(anchors are not sent to remote servers in accordance with browser
standards), the remote server never has access to the key.
How We Have to Change ZeroBin
ZeroBin is nearly backend agnostic. It is currently integrated with a
PHP templating system, but the site only uses templating for adding
the cipher text to the page before it renders. We can easily remove
this PHP requirement by making the application request the cipher text
with a JSON request. This will make the web application completely
static (we could serve it out of GitHub if we wanted to).
How We Will Use ZeroBin: Content Viewing
ZeroBin will become the web application we are injecting into the host
pages. After injection, it will fetch the content with a JSONP
request, and place it onto the page. For this use, we will have to
strip it of most templating. Initially this application will be an
injected iframe whose source is on the remote server, but in time we
will move it into the extensions to run locally. Running the
application locally will ensure it can't be changed surreptitiously,
and increases performance.
How We Will Use ZeroBin: Content Creation
Users will create content using these steps:
1. The user selects a form element they want to post to Privly
2. A new protected form pops up (the ZeroBin application)
3. The user submits the ZeroBin form, which encrypts the content
before sending it our for storage
4. The user receives back a URL for the new content, which the
extension places into the host page with the decryption key appended
5. The user submits the host page's form
To speed implementation and iteration, we should implement this
functionality with an extension-level iframe whose source is the
remote content server. The specifics of this implementation is likely
platform dependent.
Will We Always Use ZeroBin?
As we add more functionality to creating posts, we will begin to
diverge significantly from ZeroBin's original use case, and we will
either need to maintain our own fork, or create our own similar
application tailored to our use case. However, ZeroBin is a good place
to start.
* (note) Since our key is shared openly on the link, using a
Javascript crypto library is not a problem. The more advanced sharing
models will also require the compiled encryption library.
--
Sean McGregor
Graduate Research Assistant in Machine Learning
Oregon State University, Department of Computer Science
Twitter: seanmcgregor
Facebook:
facebook.com/SeanBMcGregor