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
51858ff1
Commit
51858ff1
authored
Mar 07, 2017
by
casualet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove multi-principal
parent
e016c5cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
86 deletions
+1
-86
cryptdb_log.cc
util/cryptdb_log.cc
+1
-9
onions.cc
util/onions.cc
+0
-2
util.hh
util/util.hh
+0
-75
No files found.
util/cryptdb_log.cc
View file @
51858ff1
#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
);
util/onions.cc
View file @
51858ff1
#include "util/onions.hh"
#include "util/util.hh"
util/util.hh
View file @
51858ff1
...
...
@@ -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
...
...
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