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
30cbd3f8
Commit
30cbd3f8
authored
May 17, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bench_pailliar
parent
8c5e06bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
.bench_ope_int.cc.swp
test_crypto/.bench_ope_int.cc.swp
+0
-0
bench_pailliar.cc
test_crypto/bench_pailliar.cc
+11
-2
No files found.
test_crypto/.bench_ope_int.cc.swp
0 → 100644
View file @
30cbd3f8
File added
test_crypto/bench_pailliar.cc
View file @
30cbd3f8
...
@@ -29,18 +29,27 @@ test_pailliar(int num_of_tests) {
...
@@ -29,18 +29,27 @@ test_pailliar(int num_of_tests) {
ZZ
pt0
=
NTL
::
to_ZZ
(
1
);
ZZ
pt0
=
NTL
::
to_ZZ
(
1
);
ZZ
enc0
;
ZZ
enc0
;
timer
t
;
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
){
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
){
enc0
=
sk
->
encrypt
(
pt0
);
enc0
=
sk
->
encrypt
(
pt0
);
}
}
std
::
cout
<<
"enc_pailliar_in_us: "
<<
t
.
lap
()
*
1.0
/
num_of_tests
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
){
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
){
const
ZZ
dec0
=
sk
->
decrypt
(
enc0
);
const
ZZ
dec0
=
sk
->
decrypt
(
enc0
);
}
}
std
::
cout
<<
"dec_pailliar_in_us: "
<<
t
.
lap
()
*
1.0
/
num_of_tests
<<
std
::
endl
;
}
}
int
int
main
(
int
argc
,
char
**
argv
)
{
main
(
int
argc
,
char
**
argv
)
{
test_pailliar
(
100
);
int
num_of_tests
=
10000
;
if
(
argc
==
2
){
num_of_tests
=
std
::
stoi
(
std
::
string
(
argv
[
1
]));
}
else
{
std
::
cout
<<
"num_of_tests"
<<
std
::
endl
;
return
0
;
}
test_pailliar
(
num_of_tests
);
return
0
;
return
0
;
}
}
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