Friday, May 23, 2014

Week 2

Week 2

I started implementing the chrome extension for the client side this week, with Nic working on the server. Since we do not have anything cryptographic on the server yet (a cryptographic database generator to be implemented in the near future), the client now is mainly serving as something like a test program, rather than a fully developed chrome extension for practical use. However, we did set up the a way for data transmission between the users and the server with the chrome extension. We decided to choose JSON (JavaScript Object Notation) to transmit data between the server and the client for the following reasons:

  1. Compared to XML (Extensible Markup Language), JSON uses opening and closing brackets such as {, [, ], and }, instead of opening and closing tags like <title> and </title>, which takes less space and is more efficient in communication.
  2. JSON is pretty compatible with JavaScript. A well-formatted JSON string obtained from the server can be easily parsed as a JavaScript object by calling JSON.parse(). Because JavaScript is the most popular scripting language for web development at present, compatibility with JavaScript is a great advantage.

To make the extension less dependent on a specific browser (yes, I am talking about less dependence on chrome), I implemented the extension as a webpage-based one. For now, when the user clicks on the icon to start the extension, a local html file is opened in the browser as a simple user interface.

The user can hit "Enter" directly to view a list of the available files on the server,

or enter a valid file name to view it or download it (depending on whether the publisher specifies the file as downloadable or not when the file is uploaded to the server).

Next week, I will make the extension detect the web requests so that it can be automatically invoked when the users try to access an "encrypted" file on the server. In this way, the users do not need to start the extension and enter the file name every time they want to access a file on the server. Also, I will have the extension be able to read the local files selected by users to gain their private keys for decryption.

No comments:

Post a Comment