Coder Social home page Coder Social logo

cryptdb / cryptdb Goto Github PK

View Code? Open in Web Editor NEW
497.0 30.0 97.0 156.63 MB

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

License: Other

Vim Script 0.01% C++ 13.59% Perl 0.07% TeX 0.12% Shell 0.14% Java 6.59% Python 0.82% PHP 75.71% CSS 1.54% JavaScript 0.62% Ruby 0.09% Lua 0.17% C 0.54%

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptdb's Issues

Error on installation ubuntu 14.04

I get:
configure.in:106: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from...
configure.in:106: the top level
configure.in:76: error: possibly undefined macro: AC_MSG_RESULT
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:77: error: possibly undefined macro: AC_MSG_ERROR
configure.in:248: error: possibly undefined macro: AC_DEFINE
./install.rb:167:in pretty_execute': ./autogen.shfailed (RuntimeError) from ./install.rb:160:in>'
from ./install.rb:86:in fn' from ./install.rb:272:in

'

cryptdb is not endian-safe

operations such as crypto/blowfish:
uint64_t decrypt(uint64_t ct) const {
uint64_t pt;
block_decrypt(&ct, &pt);
return pt;
}
is not endian-safe.

cryptdb add a static library

Hello,
I am studying on the Cryptdb and I want to add the static library .a in the Cryptdb and after I want to call some functions from static library .a .
Could you help me please how to add the static library?

Thanks!

ERROR 1105 (HY000): (proxy) all backends are down.

My system is Debian 9 which doesn't get some of the necessary Dependency packages (liblua5.1-0-dev libmysqlclient-dev for example). So I pull an ubuntu 12 's docker image and install the cryptDB on the container. I am definitely following the readme of the CryptDB. And I install successfully.
than I test the cryptdb with the command :

    /root/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

it gets:

2018-11-05 14:58:07: (critical) plugin proxy 0.8.4 started

And I open another terminal with of the same container and run :

mysql -u root -pletmein -h 127.0.0.1 -P 3307

Unfortunately, it gets :

ERROR 1105 (HY000): (proxy) all backends are down.

And simultaneously the proxy gets:

2018-11-06 02:23:54: (critical) proxy-plugin.c.1865: Cannot connect, all backends are down.

I really get confused. Any advice will be appreciated. Thanks a lot!

PS: here is another bro who have the same problem. another similar question

Errors and warnings

When I run install.rb file, it gives so much errors and warnings. Can someone please help me sort this out?
I am using VMware and Ubuntu 18.04.3.

Is this project discounted?

Hi,
I wanna know if this project is disontinued or not?
And if yes, what's the reason. Is there any known security breaches vulnerability or some tricks to hack the encryption scheme that caused the project to be discontinued?
Thanks

how to run cryptdb on postgresql?

Compile: cd src/EDB/; make
-- Run: ./test [runs integration tests]
./test shell [runs a shell]
-- there are other tests in test.cc
In /cryptdb/blob/master/doc/notes/oldpostgres,I don't find the src/EDB/,and I don't know how to run ./test.

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.