Code Monkey home page Code Monkey logo

mylar's Introduction

Note

  1. Just use the "public" branch to be have a more current version of mylar.
  2. My upstream is from git://g.csail.mit.edu/mylar
  3. Github has a statistical overview on the code

Mylar

Mylar is a platform for building web applications that protects data confidentiality against attackers who fully compromise the servers.

Mylar is built on Meteor, a purely Javascript web application framework: http://docs.meteor.com/

Building

You'll need the following libraries to build Mylar:

  • libreadline
  • libgmp
  • libpbc
  • libcrypto++9

Demo

Download the EncChat app: git clone git://g.csail.mit.edu/EncChat

cd EncChat /path/to/mylar/meteor

Open a browser and visit localhost:3000 or from a different machine than the server, visit http://:3000. Have fun with the application!

The app is secured against passive adversaries (adversaries who read all data at the server, but do not actively change information).

Examine

Check that messages are encrypted in the mongo database. EncChat$ /path/to/mylar/meteor mongo

db.messages.findOne()

You should see a field "message_enc" that contains the encryption of the message. There should be no field "message", which before contained the unencrypted data. You can also see "roomprinc", which is the principal for the room that the message is encrypted for.

If you open a developer console in the client browser, issue Messages.find({}).fetch() and examine the results, you will see the unencrypted ``message'' field, which is only accessible to the client browser!

You can also use tcpdump to check that the client browser only sends encrypted messages to the server!

Cleanup

If you want to reset the application, do: EncChat$ /path/to/mylar meteor reset

Enable search

To enable search, you need two things:

  1. Install the search plugin In order to use the search plugin, you'll need to build it for your system using the FireBreath framework for Firefox. You should navigate to enc_modules/crypto_fire and follow the README there in order to set it up. In addition, there is a binary that works on some systems in the enc_modules/crypto_fire/Binaries/ folder, which you should copy to: $(HOME)/.mozilla/plugins/, creating the plugins folder if necessary.

The plugin has been tested to work on 32 and 64-bit distributions of Linux and on Mac OS X.

  1. add the search package to the application EncChat$ /path/to/mylar add search

Active adversary

[documentation coming soon]

Develop a new app

Follow the steps:

  1. Write a regular Meteor application. Meteor is very easy and fun to learn! https://www.meteor.com/ has great tutorials and documentation.

  2. Secure it with Mylar:

First, read the Mylar paper and make sure you understand the section "Building a Mylar application".

2.a. in model.js, annotate which fields are sensitive and should be encrypted For example, to encrypt the field "message" of the collection "Messages", do: Messages._encrypted_fields({ 'message' : {princ: 'roomprinc', princtype: 'room', attr: 'SEARCHABLE'}}); Only the principal for the room will have access to the message.

2.b. Indicate access control annotations. Each user has a principal Principal.user() automatically created. Based on the access control desired, create principals, give principals access to other principals using "add_access", and find principals with "lookup" or "lookupUser". For example, to invite the user "invitee", to a room with principal "room_princ", do:

Principal.lookupUser(invitee, function(princ){ Principal.add_access(princ, room_princ, function () { [..] } }

======= mylar

MIT Mylar

mylar's People

Contributors

glasser avatar n1mmy avatar dgreensp avatar avital avatar gschmidt avatar ralucaada avatar slava avatar zeldovich avatar debergalis avatar helfer avatar awwx avatar dvorak42 avatar possibilities avatar timhaines avatar html5cat avatar kaashoek avatar cmather avatar muhammadn avatar zealoushacker avatar estark37 avatar tmeasday avatar dandv avatar zol avatar jonathankingston avatar clarete avatar ed-von-schleck avatar mquandalle avatar jagill avatar andreas-karlsson avatar zhangcheng avatar

Watchers

Ragunath avatar

Forkers

deathtrix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.