Coder Social home page Coder Social logo

rodelfmiguel / cryptdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptdb/cryptdb

0.0 1.0 0.0 156.63 MB

A database system that can process SQL queries over encrypted data.

License: Other

Makefile 0.03% C++ 6.62% Batchfile 0.01% Shell 0.07% Java 3.21% Python 0.82% Perl 0.02% PHP 36.88% ApacheConf 0.01% HTML 6.27% CSS 0.75% JavaScript 0.30% PLSQL 0.28% PLpgSQL 41.80% Lua 0.08% C 0.26% Yacc 2.54% Ruby 0.04% SQLPL 0.01%

cryptdb's Introduction

CryptDB's website (including latest source code): http://css.csail.mit.edu/cryptdb

Wiki: https://github.com/burrows-labs/cryptdb-wiki/wiki/_pages

Convention : When this document uses syntax like single-quote text single-quote + 'some-text-here' + 'a second example' it indicates that the reader is to use the value without the single-quotes.

######################################### ######################################### ########### Getting started ########### ######################################### ######################################### * Requirements: > Ubuntu 12.04, 13.04; Not tested on a different OS. > ruby * Build CryptDB using the installation script. > note, this script will stop and start your mysql instance. > scripts/install.rb + should just be '.' if you are in the cryptdb directory + the script will likely require root privileges in order to install dependencies and UDFs. * Username/Password By default cryptdb uses 'root' for the username and 'letmein' for the password. You can change this by modifying the source. + Tests: test/test_utils.hh + Shell: main/cdb_test.cc + Proxy: mysqlproxy/wrapper.lua * Rebuildling CryptDB If you modify the source and want to rebuild, issue 'make' in the cryptdb directory. If you change the UDFs you will also need to do 'make install' (which will likely require root privilege).

######################################### ######################################### ####### A few ways to run CryptDB ####### ######################################### ######################################### Set (or place in your .bashrc): > export EDBDIR=/full/path/to/cryptdb/

I. Shell
    > To Start: obj/main/cdb_test  ./shadow <some-database-name>
    > Type SQL queries that will be encrypted.

II. Proxy
    A) To Start: 
         > /path/to/cryptdb/bins/proxy-bin/bin/mysql-proxy         \
                     --plugins=proxy --event-threads=4             \
                     --max-open-files=1024                         \
                     --proxy-lua-script=$EDBDIR/mysqlproxy/wrapper.lua \
                     --proxy-address=127.0.0.1:3307                \
                     --proxy-backend-addresses=localhost:3306

    B) Connect to CryptDB: (where root/letmein are username/password)
       mysql -u root -pletmein -h 127.0.0.1 -P 3307
    C) CREATE a database; USE it; Then type queries that will execute
       on encrypted data at the DB server!

III. Tests
    > To Start:
        obj/test/test queries plain proxy-single

######################################### ######################################### ############ Failing queries ############ ######################################### #########################################

Note that CryptDB is not a product, but just a more advanced research
prototype. It only has implemented a subset of SQL queries. For example,
it supports the regular MySQL client and a variety of queries you can
play with from this shell, Wordpress, and other apps. We did not test
it with other MySQL clients (e.g., PHP, Java) and these likely issue
some uncommon metadata query we did not implement. Feel free to
implement what's missing!


> Queries can fail for a few reasons.
  I) CryptDB can support the query, but we have not yet implemented it.
     This should throw an UNIMPLEMENTED exception.
  II) CryptDB can not support this type of query, likely for
      cryptographic reasons. The error should include a message telling
      you more about the issue.

        For example if you issue this query to the shell.
        SELECT * FROM t WHERE x + 10 < 50

        You should get feedback. You will see that the feedback
        tells you the desired security level for the operation at
        each onion, and the current security level of each argument
        for each onion.

        In the case of this query, you can see that it would like
        to compare order with onion 1 (OPE), 4 (PLAIN) or 6 (WAIT).

        But if you look at it's first child "additive", you can see
        that it would like to use the HOM onion.  Because the HOM
        onion is not supported by the order operation, the query
        fails and gives you this error message.

        Look to the CryptDB paper for more information regarding
        how MySQL operations correspond to the cryptographic onions.
  III) State corruption (ie a bug in our code), this will likely lead
       to a crash.
  IV) Invalid query; problem with the query syntax.

######################################### ######################################### ################ Misc ################### ######################################### #########################################

> The benchmarks in the CryptDB paper are based on an older version of
  CryptDB. We have added new features and functionality to the current
  version which we have not yet optimized (but it is part of our
  roadmap).
> For example queries, take a look at our tests test/TestQueries.cc
> Consider connecting directly to MySQL to see what is in the raw
  database.
> Resetting state (e.g., after running tests)
    > Take a look at scripts/refresh.sh ; you probably want that.
    > If you create a database in cryptdb and then reset
      the state without first dropping the database from _within_
      cryptdb; you will need to drop it from the regular mysql client.
> Modifying the UDFs.
    + If you make changes to edb/udf.cc, you must reinstall the UDFs
      before your changes will take affect.
        > sudo service mysql stop
        > sudo make install
        > sudo service mysql start
> This new version of CryptDB is only single principal. We are in the
  process of developling a new platform that more affectively addresses
  multiple principals.

cryptdb's People

Contributors

ralucaada avatar

Watchers

Rodel Felipe Miguel avatar

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.