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
b7583717
Commit
b7583717
authored
May 17, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aes test fail
parent
ce655543
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
35 deletions
+4
-35
test_layer_DET_str.cc
test_enclayers/test_layer_DET_str.cc
+2
-34
bench_AES.cc
test_main/bench_AES.cc
+2
-1
No files found.
test_enclayers/test_layer_DET_str.cc
View file @
b7583717
...
...
@@ -66,38 +66,6 @@ getItemString(std::string input) {
}
/*
static
Item *
getItemInt(std::string input) {
return new (current_thd->mem_root)
Item_int(static_cast<ulonglong>(valFromStr(input)));
}
static
Item *
getItemString(std::string input) {
return MySQLFieldTypeToItem(MYSQL_TYPE_STRING, input);
}
static
Create_field* getStringField(int length) {
Create_field *f = new Create_field;
f->sql_type = MYSQL_TYPE_VARCHAR;
f->length = length;
return f;
}
static
Create_field* getUnsignedIntField(){
Create_field *f = new Create_field;
f->sql_type = MYSQL_TYPE_LONG;
f->flags |= UNSIGNED_FLAG;
return f;
}
*/
static
void
control
(
DET_str
*
ds
,
Item
*
plain
,
int
num_of_tests
,
int
length
)
{
Item
*
enc
=
NULL
;
...
...
@@ -123,7 +91,7 @@ int
main
(
int
argc
,
char
**
argv
)
{
init
();
create_embedded_thd
(
0
);
std
::
string
key
=
"key"
;
std
::
string
key
(
16
,
'a'
)
;
Create_field
*
cf
=
NULL
;
DET_str
*
ds
=
new
DET_str
(
*
cf
,
key
);
...
...
@@ -138,7 +106,7 @@ main(int argc,char**argv) {
return
0
;
}
for
(
int
i
=
1
;
i
<=
100
;
i
++
)
{
std
::
string
input
=
ggetpRandomName
(
length
*
i
);
std
::
string
input
=
"abc"
;
//=
ggetpRandomName(length*i);
Item
*
plain
=
getItemString
(
input
)
;
control
(
ds
,
plain
,
num_of_tests
,
length
*
i
)
;
}
...
...
test_main/bench_AES.cc
View file @
b7583717
...
...
@@ -4,7 +4,8 @@ static void
test_aes_cmc
(
int
num_of_tests
,
int
len
)
{
std
::
string
key
(
16
,
'a'
);
AES_KEY
*
ak
=
get_AES_dec_key
(
key
);
std
::
string
plain
(
len
,
'a'
);
// std::string plain(len,'a');
std
::
string
plain
=
"abc"
;
std
::
string
enc
,
dec
;
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
){
enc
=
encrypt_AES_CMC
(
plain
,
ak
,
true
);
...
...
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