-#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"
--- /dev/null
+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)
--- /dev/null
+# 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
+
+
+
--- /dev/null
+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
--- /dev/null
+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
+++ /dev/null
-# 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
-
-
-
-#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"