Commit 51858ff1 authored by casualet's avatar casualet

remove multi-principal

parent e016c5cd
#include <util/cryptdb_log.hh>
uint64_t cryptdb_logger::enable_mask = //0;
// cryptdb_logger::mask(log_group::log_debug) |
// cryptdb_logger::mask(log_group::log_cdb_v) |
// cryptdb_logger::mask(log_group::log_wrapper) |
// cryptdb_logger::mask(log_group::log_encl) |
// cryptdb_logger::mask(log_group::log_edb_v) |
//cryptdb_logger::mask(log_group::log_am_v) |
// cryptdb_logger::mask(log_group::log_test) |
cryptdb_logger::mask(log_group::log_warn);
uint64_t cryptdb_logger::enable_mask = cryptdb_logger::mask(log_group::log_warn);
#include "util/onions.hh"
#include "util/util.hh"
......@@ -110,81 +110,6 @@ typedef struct Predicate {
/********* Data structures for multi-key CryptDB -- should not be used by
single-principal ****/
typedef struct AccessRelation {
AccessRelation(const std::string &hacc, const std::string &acct) {
hasAccess = hacc;
accessTo = acct;
}
std::string hasAccess;
std::string accessTo;
} AccessRelation;
typedef struct AccessRelationComp {
bool operator() (const AccessRelation& lhs, const AccessRelation& rhs) const {
if (lhs.hasAccess < rhs.hasAccess) {
return true;
}
if (lhs.hasAccess > rhs.hasAccess) {
return false;
}
if (lhs.accessTo < rhs.accessTo) {
return true;
} else {
return false;
}
}
} AccessRelationComp;
//permanent metadata for multi-key CryptDB - stores which field is encrypted
// for which field
typedef struct MultiKeyMeta {
//e.g., msg_text encrypted for principal u.id
std::map<std::string, std::string> encForMap;
//contains an element if that element has some field encrypted to it
std::map<std::string, bool > reverseEncFor;
std::map<AccessRelation, Predicate *, AccessRelationComp> condAccess; //maps a field having accessto to
// any conditional predicate it
// may have
MultiKeyMeta() {}
~MultiKeyMeta() {
for (auto i = condAccess.begin(); i != condAccess.end(); i++) {
delete i->second;
}
}
} MKM;
//temporary metadata for multi-key CryptDB that belongs to the query or result
// being processed
typedef struct TempMKM {
//maps a field (fullname) that has another field encrypted for it to its
// value
// groups.gid 23
std::map<std::string, std::string> encForVal;
//maps a field that has another field encrypted for it to the index in the
// response std::list of values containing its value
// groups.gid 5
std::map<std::string, int> encForReturned;
// contains fullnames of principals that were seen already in a response
std::map<std::string, bool> principalsSeen;
//true if current processing is query rather
bool processingQuery;
//some fields will be selected in order to be able to decrypt others, but
// should not
// be returned in the response to the application
// maps position in raw DBMS response to whether it should be returned to
// user or not
std::map<unsigned int, bool> returnBitMap;
} TMKM;
//============= Useful functions =========================//
// extracts (nobytes) bytes from int by placing the most significant bits at
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment