From f11cbe1273bfdff6783877c7268525170c9c701b Mon Sep 17 00:00:00 2001 From: couturie Date: Sun, 1 Oct 2017 21:58:24 +0200 Subject: [PATCH] new --- OneRoundIoT/OneRound/run_test.sh | 2 +- OneRoundIoT/execution.R | 34 +++++++++++++++++++++++++ OneRoundIoT/execution.plot | 24 +++++++++++++++++ OneRoundIoT/execution_oneround_rpi3.txt | 8 ++++++ OneRoundIoT/execution_openssl_rpi3.txt | 8 ++++++ OneRoundIoT/openssl/execution.plot | 18 ------------- OneRoundIoT/openssl/run_test.sh | 2 +- 7 files changed, 76 insertions(+), 20 deletions(-) create mode 100644 OneRoundIoT/execution.R create mode 100644 OneRoundIoT/execution.plot create mode 100644 OneRoundIoT/execution_oneround_rpi3.txt create mode 100644 OneRoundIoT/execution_openssl_rpi3.txt delete mode 100644 OneRoundIoT/openssl/execution.plot diff --git a/OneRoundIoT/OneRound/run_test.sh b/OneRoundIoT/OneRound/run_test.sh index 7b57b13..d384c20 100644 --- a/OneRoundIoT/OneRound/run_test.sh +++ b/OneRoundIoT/OneRound/run_test.sh @@ -1,4 +1,4 @@ -#sh run_test.sh > execution.txt +#sh run_test.sh > execution_oneround.txt printf "16\t"; ./one_round_new nb10000000 lena0 ctr0 h4 sizebuf4; ./one_round_new nb10000000 lena0 ctr1 h4 sizebuf4 printf "\n" diff --git a/OneRoundIoT/execution.R b/OneRoundIoT/execution.R new file mode 100644 index 0000000..7b1f603 --- /dev/null +++ b/OneRoundIoT/execution.R @@ -0,0 +1,34 @@ +library("ggplot2") +library(reshape2) + +setwd("~/work/Cipher_code/OneRoundIoT/") + +openrpi3=read.csv('execution_openssl_rpi3.txt',sep="\t",header=F) +onerpi3=read.csv('execution_oneround_rpi3.txt',sep="\t",header=F) + +openrpi3=openrpi3[c(1,2,3,5)] +onerpi3=onerpi3[c(2,3,5)] + +res=data.frame(openrpi3,onerpi3) +names(res)=c("Buffer","OpenSSL enc CBC","OpenSSL dec CBC", "OpenSSL (en|de)c CTR", "OneRound enc DECB", "OneRound dec DECB", "OneRound (en|de)c CTR") + + + + + +df2 <- melt(data = res, id.vars = 1) +#names(df2)[2]="Legend" +#names(df2)[3]="Accuracy" + + +#g=ggplot(res, aes(iteration)) + +# geom_line(aes(y = test, colour = "testing accuracy")) + +# geom_line(aes(y = train, colour = "training accuracy"))+ + +g=ggplot(data = df2, aes(x=Buffer, y=value)) + geom_line(aes(colour=variable)) + scale_x_log10("Buffer size") + + scale_y_log10("Bytes per second")+annotation_logticks(sides="trbl") +#g <- ggplot(data = df2, aes(x = 1, y = 3, colour = 2)) + geom_line()+scale_color_manual(values=c("#888888", "#000000"))+ +#theme(legend.justification=c(1,0), legend.position=c(1,0)) +ggsave("execution_rpi3.pdf",width = 15, height = 10, units = "cm") + +print(g) diff --git a/OneRoundIoT/execution.plot b/OneRoundIoT/execution.plot new file mode 100644 index 0000000..5b869ca --- /dev/null +++ b/OneRoundIoT/execution.plot @@ -0,0 +1,24 @@ +# Analysis description +set encoding iso_8859_1 +set terminal x11 +set size 1,0.5 +set term postscript enhanced portrait "Helvetica" 12 + +set style line 2 lc rgb '#0025ad' lt 1 lw 1.5 # --- blue + + +set log x +set log y +set ylabel "bytes per second" + +set xlabel "buffer size" +#set key on outside left bmargin +plot 'execution_openssl_rpi3.txt' using 1:2 t "OpenSSL enc CBC" with linespoints lt 1 lw 2 ps 0 pt 5,\ + 'execution_openssl_rpi3.txt' using 1:3 t "OpenSSL dec CBC" with linespoints lt 2 lw 2 ps 0 pt 1,\ + 'execution_openssl_rpi3.txt' using 1:4 t "OpenSSL (en|de)c CTR" with linespoints lt 3 lw 2 ps 0 pt 1,\ + 'execution_oneround_rpi3.txt' using 1:2 t "OneRound enc DECB" with linespoints lt 1 lw 2 ps 0 pt 5 ,\ + 'execution_oneround_rpi3.txt' using 1:3 t "OneRound dec DECB" with linespoints lt 2 lw 2 ps 0 pt 1 ,\ + 'execution_oneround_rpi3.txt' using 1:4 t "OneRound (en|de)c CTR" with linespoints ls 2 + + + diff --git a/OneRoundIoT/execution_oneround_rpi3.txt b/OneRoundIoT/execution_oneround_rpi3.txt new file mode 100644 index 0000000..89bc219 --- /dev/null +++ b/OneRoundIoT/execution_oneround_rpi3.txt @@ -0,0 +1,8 @@ +16 6.43233e+07 7.26757e+07 5.89327e+07 5.8578e+07 +64 7.95005e+07 7.98921e+07 8.05238e+07 8.01891e+07 +256 9.12627e+07 8.97198e+07 9.8069e+07 9.76298e+07 +1024 9.22524e+07 8.96985e+07 8.82194e+07 8.77297e+07 +4096 9.24385e+07 8.98687e+07 1.07994e+08 1.07318e+08 +16384 9.156e+07 8.90901e+07 1.12789e+08 1.12446e+08 +65536 9.101e+07 8.85571e+07 1.14084e+08 1.13321e+08 +262144 9.04198e+07 8.72321e+07 1.12576e+08 1.12101e+08 diff --git a/OneRoundIoT/execution_openssl_rpi3.txt b/OneRoundIoT/execution_openssl_rpi3.txt new file mode 100644 index 0000000..12015c7 --- /dev/null +++ b/OneRoundIoT/execution_openssl_rpi3.txt @@ -0,0 +1,8 @@ +16 35561260.620602 15349429.701052 34179130.809634 31262230.547364 +64 45942686.845827 31205253.694033 46534726.130423 44768183.805224 +256 50312774.420496 46598509.608827 57205348.867379 55106180.037713 +1024 51538546.476405 54469808.734056 63174057.930832 62542371.811188 +4096 51895378.916934 57106256.952191 64880017.444474 64691175.359870 +16384 51675853.653139 57536085.883879 65275030.232913 64992940.131626 +65536 51801725.903878 57787881.822545 65318027.395760 64947046.995387 +262144 51436284.112597 57037101.880622 64469254.502370 64407008.093500 diff --git a/OneRoundIoT/openssl/execution.plot b/OneRoundIoT/openssl/execution.plot deleted file mode 100644 index 83060ab..0000000 --- a/OneRoundIoT/openssl/execution.plot +++ /dev/null @@ -1,18 +0,0 @@ -# Analysis description -set encoding iso_8859_1 -set terminal x11 -set size 1,0.5 -set term postscript enhanced portrait "Helvetica" 12 - -set log x -set log y -set ylabel "bytes per second" - -set xlabel "buffer size" -#set key on outside left bmargin -plot 'execution.txt' using 1:2 t "encrypt CBC" with linespoints lt 1 lw 2 ps 0 pt 5,\ - 'execution.txt' using 1:3 t "decrypt CBC" with linespoints lt 2 lw 2 ps 0 pt 1,\ - 'execution.txt' using 1:4 t "(en|de)crypt CTR" with linespoints lt 3 lw 2 ps 0 pt 1 - - - diff --git a/OneRoundIoT/openssl/run_test.sh b/OneRoundIoT/openssl/run_test.sh index 2251b6d..df6c02b 100644 --- a/OneRoundIoT/openssl/run_test.sh +++ b/OneRoundIoT/openssl/run_test.sh @@ -1,4 +1,4 @@ -#sh run_test.sh > execution.txt +#sh run_test.sh > execution_openssl.txt printf "16\t"; ./openssl_evp nb10000000 lena0 ctr0 sizebuf4; ./openssl_evp nb10000000 lena0 ctr1 sizebuf4 printf "\n" -- 2.39.5