Commit a6c0a985 authored by casualet's avatar casualet

modify crypto/gfe.hh to include more .hh files in it. and modify…

modify crypto/gfe.hh to include more .hh files in it. and modify init_onion_layout in main/schema.cc to let ope be in the ope layer for unique fields
parent 23c57509
...@@ -7,7 +7,7 @@ CRYPTOOBJ := $(patsubst %.cc,$(OBJDIR)/crypto/%.o,$(CRYPTOSRC)) ...@@ -7,7 +7,7 @@ CRYPTOOBJ := $(patsubst %.cc,$(OBJDIR)/crypto/%.o,$(CRYPTOSRC))
all: $(OBJDIR)/libedbcrypto.a $(OBJDIR)/libedbcrypto.so all: $(OBJDIR)/libedbcrypto.a $(OBJDIR)/libedbcrypto.so
$(OBJDIR)/libedbcrypto.so: $(CRYPTOOBJ) $(OBJDIR)/libedbutil.so $(OBJDIR)/libedbcrypto.so: $(CRYPTOOBJ) $(OBJDIR)/libedbutil.so
$(CXX) -shared -o $@ $(CRYPTOOBJ) $(LDFLAGS) $(LDRPATH) \ $(CXX) -fPIC -shared -o $@ $(CRYPTOOBJ) $(LDFLAGS) $(LDRPATH) \
-ledbutil -lcrypto -lntl -ledbutil -lcrypto -lntl
$(OBJDIR)/libedbcrypto.a: $(CRYPTOOBJ) $(OBJDIR)/libedbcrypto.a: $(CRYPTOOBJ)
......
BasicCrypto.cc
paillier.cc
urandom.cc
arc4.cc
hgd.cc
pbkdf2.cc
ecjoin.cc
ECJoin.cc
search.cc
skip32.cc
ffx.cc
online_ope.cc
mont.cc
prng.cc
ope.cc
SWPSearch.cc
#pragma once #pragma once
#include <vector> #include <vector>
#include <crypto/hmac.hh>
#include <crypto/arc4.hh> #include <crypto/arc4.hh>
using std::make_pair;
template<typename T> template<typename T>
class gfe { class gfe {
public: public:
......
...@@ -312,6 +312,8 @@ private: ...@@ -312,6 +312,8 @@ private:
const std::pair<int64_t, uint64_t> inclusiveRange; const std::pair<int64_t, uint64_t> inclusiveRange;
}; };
static CryptedInteger static CryptedInteger
overrideCreateFieldCryptedIntegerFactory(const Create_field &cf, overrideCreateFieldCryptedIntegerFactory(const Create_field &cf,
const std::string &key, const std::string &key,
...@@ -1375,9 +1377,10 @@ HOM::newCreateField(const Create_field &cf, ...@@ -1375,9 +1377,10 @@ HOM::newCreateField(const Create_field &cf,
&my_charset_bin); &my_charset_bin);
} }
//if first, use seed key to generate
void void
HOM::unwait() const HOM::unwait() const {
{
const std::unique_ptr<streamrng<arc4>> const std::unique_ptr<streamrng<arc4>>
prng(new streamrng<arc4>(seed_key)); prng(new streamrng<arc4>(seed_key));
sk = new Paillier_priv(Paillier_priv::keygen(prng.get(), nbits)); sk = new Paillier_priv(Paillier_priv::keygen(prng.get(), nbits));
......
...@@ -177,3 +177,10 @@ public: ...@@ -177,3 +177,10 @@ public:
std::string doSerialize() const; std::string doSerialize() const;
}; };
#include <main/dispatcher.hh> #include <main/dispatcher.hh>
/*
This file contains functions for SQLDispatcher and
AlterDispatcher
*/
//########################SQLDispatcher#########################
bool bool
SQLDispatcher::canDo(LEX *const lex) const SQLDispatcher::canDo(LEX *const lex) const
{ {
...@@ -22,6 +27,9 @@ SQLDispatcher::extract(LEX *const lex) const ...@@ -22,6 +27,9 @@ SQLDispatcher::extract(LEX *const lex) const
return lex->sql_command; return lex->sql_command;
} }
//#####################AlterDispatcher##########################
bool bool
AlterDispatcher::canDo(LEX *const lex) const AlterDispatcher::canDo(LEX *const lex) const
{ {
......
...@@ -270,6 +270,8 @@ determineSecLevelData(onion o, std::vector<SECLEVEL> levels, bool unique) ...@@ -270,6 +270,8 @@ determineSecLevelData(onion o, std::vector<SECLEVEL> levels, bool unique)
|| SECLEVEL::RND == levels.back()); || SECLEVEL::RND == levels.back());
} else if (oOPE == o) { } else if (oOPE == o) {
assert(SECLEVEL::RND == levels.back()); assert(SECLEVEL::RND == levels.back());
levels.pop_back();
assert(SECLEVEL::OPE == levels.back());
} else if (oAGG == o) { } else if (oAGG == o) {
assert(SECLEVEL::HOM == levels.back()); assert(SECLEVEL::HOM == levels.back());
} else { } else {
......
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