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))
all: $(OBJDIR)/libedbcrypto.a $(OBJDIR)/libedbcrypto.so
$(OBJDIR)/libedbcrypto.so: $(CRYPTOOBJ) $(OBJDIR)/libedbutil.so
$(CXX) -shared -o $@ $(CRYPTOOBJ) $(LDFLAGS) $(LDRPATH) \
$(CXX) -fPIC -shared -o $@ $(CRYPTOOBJ) $(LDFLAGS) $(LDRPATH) \
-ledbutil -lcrypto -lntl
$(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
#include <vector>
#include <crypto/hmac.hh>
#include <crypto/arc4.hh>
using std::make_pair;
template<typename T>
class gfe {
public:
......
......@@ -312,6 +312,8 @@ private:
const std::pair<int64_t, uint64_t> inclusiveRange;
};
static CryptedInteger
overrideCreateFieldCryptedIntegerFactory(const Create_field &cf,
const std::string &key,
......@@ -1375,9 +1377,10 @@ HOM::newCreateField(const Create_field &cf,
&my_charset_bin);
}
//if first, use seed key to generate
void
HOM::unwait() const
{
HOM::unwait() const {
const std::unique_ptr<streamrng<arc4>>
prng(new streamrng<arc4>(seed_key));
sk = new Paillier_priv(Paillier_priv::keygen(prng.get(), nbits));
......
......@@ -177,3 +177,10 @@ public:
std::string doSerialize() const;
};
#include <main/dispatcher.hh>
/*
This file contains functions for SQLDispatcher and
AlterDispatcher
*/
//########################SQLDispatcher#########################
bool
SQLDispatcher::canDo(LEX *const lex) const
{
......@@ -22,6 +27,9 @@ SQLDispatcher::extract(LEX *const lex) const
return lex->sql_command;
}
//#####################AlterDispatcher##########################
bool
AlterDispatcher::canDo(LEX *const lex) const
{
......
......@@ -270,6 +270,8 @@ determineSecLevelData(onion o, std::vector<SECLEVEL> levels, bool unique)
|| SECLEVEL::RND == levels.back());
} else if (oOPE == o) {
assert(SECLEVEL::RND == levels.back());
levels.pop_back();
assert(SECLEVEL::OPE == levels.back());
} else if (oAGG == o) {
assert(SECLEVEL::HOM == levels.back());
} 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