Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
ca6402a0
Commit
ca6402a0
authored
Jan 11, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
able to use conf and don't know why
parent
c95f1a86
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
10 deletions
+44
-10
CURRENT.conf
conf/CURRENT.conf
+8
-0
WORKED.conf
conf/WORKED.conf
+9
-0
test_onion_conf.cc
debug/test_onion_conf.cc
+5
-5
schema.cc
main/schema.cc
+8
-4
onions.cc
util/onions.cc
+8
-0
onions.hh
util/onions.hh
+6
-1
No files found.
conf/CURRENT.conf
View file @
ca6402a0
#oDET: DETJOIN DET RND
#oOPE: OPEFOREIGN OPE RND
#oAGG: HOM
#oASHE: ASHE
[
onions
for
num
]
oDET
:
DETJOIN
DET
RND
oOPE
:
OPEFOREIGN
OPE
RND
oAGG
:
HOM
[
end
]
#oSWP: SEARCH
#oDET: DETJOIN DET RND
#oOPE: OPEFOREIGN OPE RND
[
onions
for
str
]
oDET
:
DETJOIN
DET
RND
oOPE
:
OPEFOREIGN
OPE
RND
oSWP
:
SEARCH
conf/WORKED.conf
0 → 100644
View file @
ca6402a0
[
onions
for
num
]
oDET
:
DETJOIN
DET
RND
oOPE
:
OPEFOREIGN
OPE
RND
oAGG
:
HOM
[
end
]
[
onions
for
str
]
oDET
:
DETJOIN
DET
RND
oOPE
:
OPEFOREIGN
OPE
RND
debug/test_onion_conf.cc
View file @
ca6402a0
...
...
@@ -2,7 +2,7 @@
#include <assert.h>
static
void
is_onionlayout_equal
(
onionlayout
&
ol1
,
onionlayout
&
ol2
){
void
test_
is_onionlayout_equal
(
onionlayout
&
ol1
,
onionlayout
&
ol2
){
for
(
auto
item
:
ol1
){
auto
key
=
item
.
first
;
assert
(
ol2
.
find
(
key
)
!=
ol2
.
end
());
...
...
@@ -16,11 +16,11 @@ int main(){
onion_conf
of
(
di
);
auto
res
=
of
.
get_onionlayout_for_num
();
auto
res2
=
of
.
get_onionlayout_for_str
();
is_onionlayout_equal
(
res
,
NUM_ONION_LAYOUT
);
is_onionlayout_equal
(
NUM_ONION_LAYOUT
,
res
);
test_
is_onionlayout_equal
(
res
,
NUM_ONION_LAYOUT
);
test_
is_onionlayout_equal
(
NUM_ONION_LAYOUT
,
res
);
is_onionlayout_equal
(
res2
,
STR_ONION_LAYOUT
);
is_onionlayout_equal
(
STR_ONION_LAYOUT
,
res2
);
test_
is_onionlayout_equal
(
res2
,
STR_ONION_LAYOUT
);
test_
is_onionlayout_equal
(
STR_ONION_LAYOUT
,
res2
);
return
0
;
}
main/schema.cc
View file @
ca6402a0
...
...
@@ -431,11 +431,15 @@ onionlayout FieldMeta::determineOnionLayout(const AES_KEY *const m_key,
/*we only support sensitive rating here*/
if
(
SECURITY_RATING
::
SENSITIVE
==
sec_rating
)
{
if
(
true
==
isMySQLTypeNumeric
(
f
))
{
//return CURRENT_NUM_LAYOUT;
//is_onionlayout_equal(CURRENT_NUM_LAYOUT,NUM_ONION_LAYOUT);
//is_onionlayout_equal(NUM_ONION_LAYOUT, CURRENT_NUM_LAYOUT);
return
CURRENT_NUM_LAYOUT
;
// return NUM_ONION_LAYOUT;
}
else
{
// return CURRENT_STR_LAYOUT;
//is_onionlayout_equal(CURRENT_STR_LAYOUT,STR_ONION_LAYOUT);
//is_onionlayout_equal(STR_ONION_LAYOUT,CURRENT_STR_LAYOUT);
return
CURRENT_STR_LAYOUT
;
// return STR_ONION_LAYOUT;
}
}
else
if
(
SECURITY_RATING
::
BEST_EFFORT
==
sec_rating
)
{
if
(
true
==
isMySQLTypeNumeric
(
f
))
{
...
...
util/onions.cc
View file @
ca6402a0
...
...
@@ -146,4 +146,12 @@ onionlayout CURRENT_NUM_LAYOUT = global_onion_conf.get_onionlayout_for_num();
onionlayout
CURRENT_STR_LAYOUT
=
global_onion_conf
.
get_onionlayout_for_str
();
void
is_onionlayout_equal
(
onionlayout
&
ol1
,
onionlayout
&
ol2
){
for
(
auto
item
:
ol1
){
auto
key
=
item
.
first
;
assert
(
ol2
.
find
(
key
)
!=
ol2
.
end
());
assert
(
ol2
[
key
]
==
ol1
[
key
]);
}
}
util/onions.hh
View file @
ca6402a0
...
...
@@ -121,7 +121,7 @@ static onionlayout STR_ONION_LAYOUT = {
{
oDET
,
std
::
vector
<
SECLEVEL
>
({
SECLEVEL
::
DETJOIN
,
SECLEVEL
::
DET
,
SECLEVEL
::
RND
})},
{
oOPE
,
std
::
vector
<
SECLEVEL
>
({
SECLEVEL
::
OPEFOREIGN
,
SECLEVEL
::
OPE
,
SECLEVEL
::
RND
})},
//
{oSWP, std::vector<SECLEVEL>({SECLEVEL::SEARCH})}
{
oSWP
,
std
::
vector
<
SECLEVEL
>
({
SECLEVEL
::
SEARCH
})}
// {oSWP, std::vector<SECLEVEL>({SECLEVEL::PLAINVAL, SECLEVEL::DET,
// SECLEVEL::RND})}
};
...
...
@@ -189,3 +189,8 @@ public:
extern
onionlayout
CURRENT_NUM_LAYOUT
;
extern
onionlayout
CURRENT_STR_LAYOUT
;
void
is_onionlayout_equal
(
onionlayout
&
ol1
,
onionlayout
&
ol2
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment