Commit 2d415307 authored by yiwenshao's avatar yiwenshao

updat

parent 90bf3426
...@@ -30,3 +30,4 @@ packages/tls/mysqlWrapper/createSelect ...@@ -30,3 +30,4 @@ packages/tls/mysqlWrapper/createSelect
packages/tls/mysqlWrapper/main packages/tls/mysqlWrapper/main
*allTables* *allTables*
*pipelinefile* *pipelinefile*
*.conf
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "crypto/ASHE.hh" #include "crypto/ASHE.hh"
#include "util/util.cc" #include "util/util.cc"
int main(){ int main(){
const int num_of_tests = 100; const int num_of_tests = 32768;
unsigned int seed = 1u; unsigned int seed = 1u;
std::vector<unsigned int> plain; std::vector<unsigned int> plain;
std::vector<RAW_ASHE> ass; std::vector<RAW_ASHE> ass;
...@@ -14,7 +14,7 @@ int main(){ ...@@ -14,7 +14,7 @@ int main(){
ass.push_back(RAW_ASHE(IV)); ass.push_back(RAW_ASHE(IV));
ass.back().encrypt(seed,IV); ass.back().encrypt(seed,IV);
unsigned int res = ass.back().decrypt(ass.back().get_ciphertext(),IV); unsigned int res = ass.back().decrypt(ass.back().get_ciphertext(),IV);
if(res==seed) std::cout<<"pass"<<std::endl; if(res==seed) ;
else std::cout<<"not pass!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<std::endl; else std::cout<<"not pass!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<std::endl;
seed++; seed++;
} }
......
##echo $(rand 0 65535)
function rand(){
min=$1
max=$(($2-$min+1))
num=$(($RANDOM+1000000000)) #增加一个10位的数再求余
echo $(($num%$max+$min))
}
##[0, 32767]
function generate_insert_int(){ function generate_insert_int(){
head=$1 head=$1
pipe=$2 pipe=$2
......
...@@ -387,7 +387,6 @@ STORE_STRATEGY currentStrategy = STORE_STRATEGY::ALL; ...@@ -387,7 +387,6 @@ STORE_STRATEGY currentStrategy = STORE_STRATEGY::ALL;
/*storage used when we store*/ /*storage used when we store*/
void storeStrategies(std::vector<FieldMetaTrans>& res){ void storeStrategies(std::vector<FieldMetaTrans>& res){
if(currentStrategy == STORE_STRATEGY::FIRST){ if(currentStrategy == STORE_STRATEGY::FIRST){
std::vector<int> in{0}; std::vector<int> in{0};
for(auto &item:res){ for(auto &item:res){
...@@ -410,10 +409,8 @@ void storeStrategies(std::vector<FieldMetaTrans>& res){ ...@@ -410,10 +409,8 @@ void storeStrategies(std::vector<FieldMetaTrans>& res){
static const std::vector<onion> onion_order = { static const std::vector<onion> onion_order = {
oDET, oDET,
oOPE, oOPE,
oAGG,
oASHE, oASHE,
oSWP, oAGG,
oPLAIN
}; };
int getDecryptionOnionIndex(FieldMetaTrans& fdtrans) { int getDecryptionOnionIndex(FieldMetaTrans& fdtrans) {
......
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