{"id":586,"date":"2013-03-31T19:03:49","date_gmt":"2013-04-01T02:03:49","guid":{"rendered":"https:\/\/inkofpark.wordpress.com\/?p=586"},"modified":"2013-03-31T19:03:49","modified_gmt":"2013-04-01T02:03:49","slug":"revised-raspberry-pi-truecrypt-benchmark","status":"publish","type":"post","link":"https:\/\/www.inkofpark.com\/?p=586","title":{"rendered":"Revised Raspberry Pi TrueCrypt Benchmark"},"content":{"rendered":"<p>Revised March 31, 2013 with updated benchmarking approach that uses actual access to the mounted volume. New results show no appreciable sensitivity to hash, which is as expected. The numbers are for encryption only (write). I have not pursued read.<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"bottom\" width=\"91\"><b>Hash<br \/>\nAlgorithm<\/b><\/td>\n<td valign=\"bottom\" width=\"143\"><b>Encryption<br \/>\nAlgorithm<\/b><\/td>\n<td valign=\"bottom\" width=\"64\"><b>Rate<br \/>\n(MB\/s)<\/b><\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">Twofish<\/td>\n<td valign=\"bottom\" width=\"64\">2.8<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">Twofish<\/td>\n<td valign=\"bottom\" width=\"64\">2.8<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">Twofish<\/td>\n<td valign=\"bottom\" width=\"64\">2.8<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">2.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">2.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">2.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">AES<\/td>\n<td valign=\"bottom\" width=\"64\">2.1<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">AES<\/td>\n<td valign=\"bottom\" width=\"64\">2.1<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">AES<\/td>\n<td valign=\"bottom\" width=\"64\">2.1<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">Twofish-Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">2.0<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">Twofish-Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">2.0<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">Twofish-Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">1.9<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">AES-Twofish<\/td>\n<td valign=\"bottom\" width=\"64\">1.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">AES-Twofish<\/td>\n<td valign=\"bottom\" width=\"64\">1.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">AES-Twofish<\/td>\n<td valign=\"bottom\" width=\"64\">1.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent-AES<\/td>\n<td valign=\"bottom\" width=\"64\">1.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent-AES<\/td>\n<td valign=\"bottom\" width=\"64\">1.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent-AES<\/td>\n<td valign=\"bottom\" width=\"64\">1.6<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">AES-Twofish-Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">1.3<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">Whirlpool<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent-Twofish-AES<\/td>\n<td valign=\"bottom\" width=\"64\">1.3<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent-Twofish-AES<\/td>\n<td valign=\"bottom\" width=\"64\">1.3<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">SHA-512<\/td>\n<td valign=\"bottom\" width=\"143\">AES-Twofish-Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">1.3<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">Serpent-Twofish-AES<\/td>\n<td valign=\"bottom\" width=\"64\">1.3<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" width=\"91\">RIPEMD-160<\/td>\n<td valign=\"bottom\" width=\"143\">AES-Twofish-Serpent<\/td>\n<td valign=\"bottom\" width=\"64\">1.3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Shell Script for Timing<\/h2>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n#!\/bin\/bash\n\n# Create a file of random elements, needs to be at least 300 bytes\n dd if=\/dev\/random of=random bs=512 count=1\n\n# Iterate over the hash hash funnctions\n for HASH in RIPEMD-160 SHA-512 Whirlpool\n do\n # Iterate over the available encryption algorithms\n for ENCALG in AES Serpent Twofish AES-Twofish AES-Twofish-Serpent Serpent-AES Serpent-Twofish-AES Twofish-Serpent\n do\n # Write the algorithms to the log\n echo &amp;quot;Algorithms: $HASH $ENCALG&amp;quot; &amp;gt;&amp;gt; log\n # TrueCrypt will report the performance in the output\n truecrypt -c \/home\/pi\/test.tc --filesystem=fat --size=10485760\n --encryption=$ENCALG -p ppp --random-source=random \n --hash=$HASH --volume-type=normal --non-interactive\n # Mount the partition\n truecrypt --non-interactive -p ppp -m nokernelcrypto test.tc \/home\/pi\/tcvol\n (time\u00a0 .\/timeit) 2&amp;gt;&amp;gt; log\n truecrypt -d \/home\/pi\/tcvol\n # Erase the created file\n rm test.tc\n done\n done\n\n<\/pre>\n<h2>Timed Routine<\/h2>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\ndd if=\/dev\/zero of=tcvol\/test bs=5242880 count=1 &amp;amp;&amp;gt; \/dev\/null\n\nsync\n\n<\/pre>\n<h2>Python Reprocessor<\/h2>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\n\nimport sys\n fid = open( sys.argv&#x5B;1], &#039;r&#039;)\n lines = fid.readlines()\n fid.close()\n\ntsecs = None\n while len( lines) &amp;gt; 0:\n line = lines.pop(0)\n lls = line.strip()\n\nif lls.startswith( &#039;Algo&#039;):\n # If we already have a tsecs, then print\n # the last elements\n toks = lls.split()\n if tsecs == None: # first record\n algo = &amp;quot;,&amp;quot;.join( toks&#x5B;1:3])\n else:\n print algo,&amp;quot;,&amp;quot;,tsecs\n algo = &amp;quot;,&amp;quot;.join( toks&#x5B;1:3])\n elif lls.startswith( &#039;real&#039;):\n toks = lls.split()\n toks = toks&#x5B;-1].split(&#039;m&#039;)\n tsecs = float( toks&#x5B;0])*60 + float( toks&#x5B;1].replace(&#039;s&#039;, &#039;&#039;))\n\nprint algo,&amp;quot;,&amp;quot;,tsecs\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Revised March 31, 2013 with updated benchmarking approach that uses actual access to the mounted volume. New results show no appreciable sensitivity to hash, which is as expected. The numbers are for encryption only (write). I have not pursued read. Hash Algorithm Encryption Algorithm Rate (MB\/s) SHA-512 Twofish 2.8 Whirlpool Twofish 2.8 RIPEMD-160 Twofish 2.8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[26,44,46],"class_list":["post-586","post","type-post","status-publish","format-standard","hentry","category-making","tag-encryption","tag-raspberrypi","tag-software"],"_links":{"self":[{"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=\/wp\/v2\/posts\/586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=586"}],"version-history":[{"count":0,"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=\/wp\/v2\/posts\/586\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inkofpark.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}