From: couturie Date: Tue, 10 Jul 2018 13:55:51 +0000 (+0200) Subject: new X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/994c6a6e920abfc3823984ef4d6caaf85c2008da new --- diff --git a/Arduino/sketch_AES/sketch_AES.ino b/Arduino/sketch_AES/sketch_AES.ino index 998f763..c2805c3 100644 --- a/Arduino/sketch_AES/sketch_AES.ino +++ b/Arduino/sketch_AES/sketch_AES.ino @@ -6,7 +6,7 @@ AES aes ; byte *key = (unsigned char*)"0123456789010123"; -const int size_mesg=64; +const int size_mesg=16*15; diff --git a/IDA/Makefile b/IDA/Makefile index 71745c6..f34a69b 100644 --- a/IDA/Makefile +++ b/IDA/Makefile @@ -16,7 +16,7 @@ ida_gf64: ida_gf64.cpp g++ -o $@ $< -std=c++11 -O3 -lm -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -g -O3 -Wall -I/home/couturie/ajeter/jerasure/include /home/couturie/ajeter/jerasure/src/.libs/jerasure.o /home/couturie/ajeter/jerasure/src/.libs/galois.o -lgf_complete -fpermissive ida_gf65: ida_gf65.cpp - g++ -o $@ $< -std=c++11 -O3 -lm -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -g -O3 -Wall -I/home/couturie/ajeter/jerasure/include /home/couturie/ajeter/jerasure/src/.libs/jerasure.o /home/couturie/ajeter/jerasure/src/.libs/galois.o -lgf_complete -fpermissive + g++ -o $@ $< -std=c++11 -O3 -lm -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -g -O3 -Wall -I/home/couturie/ajeter/jerasure/include /home/couturie/ajeter/jerasure/src/.libs/jerasure.o /home/couturie/ajeter/jerasure/src/.libs/galois.o -lgf_complete -fpermissive -lpthread clean: rm test_mat2 ida ida_gf64 diff --git a/IDA/ida_gf65.cpp b/IDA/ida_gf65.cpp index 09c4162..2a914c5 100644 --- a/IDA/ida_gf65.cpp +++ b/IDA/ida_gf65.cpp @@ -10,6 +10,10 @@ #include #include // std::random_shuffle #include // std::vector +#include +#include + + extern "C" { #include "jerasure.h" } @@ -20,7 +24,7 @@ typedef unsigned long mylong; using namespace std; -string cloud[5]={"dropboxida1","googleida1","megaida1","onedriveida1","pcloudida1"}; +string cloud[5]={"dropboxida1","googleida1","onedriveida2","onedriveida1","pcloudida1"}; void display(mylong *mat, int r, int c) { @@ -441,18 +445,27 @@ int main(int argc, char **argv) // display(matC,t,t); - + thread th[n]; //Save trunks for(int i=0;i=t;i--) { -// for(int i=0;i #include #include +#include + /*#include #include diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index be38534..d4441a9 100644 --- a/OneRoundIoT/OneRound/one_round_new.cpp +++ b/OneRoundIoT/OneRound/one_round_new.cpp @@ -9,6 +9,8 @@ #include #include #include +#include + /*#include #include @@ -412,6 +414,10 @@ int main(int argc, char** argv) { uchar *data_R, *data_G, *data_B; int imsize; uchar *buffer; + + + + if(lena==1) { load_RGB_pixmap("lena.ppm", &width, &height, &data_R, &data_G, &data_B); @@ -466,15 +472,27 @@ int main(int argc, char** argv) { for (int i = 0; i < 256 ; i++) { mix[i]=Secretkey[i]^counter[i]; + } + gchar *sha512; + + sha512 = g_compute_checksum_for_string(G_CHECKSUM_SHA512, (const char*) mix, 256); +// g_print("%s\n", sha512); + + + + + + + // cout<<"hash "<