<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why is AES on CAAM slower than OpenSSL w/o CAAM? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294092#M36255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hao Han,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using kernel_3.0.35_4.1.0 with the latest patches and my test board is the Nitrogen6x.&lt;/P&gt;&lt;P&gt;I have got the same results as you for AES. In addition, I tested digests (md5, sha1, sha224 &amp;amp; sha256) and HMAC algorithms. All the results were disappointing, considering execution time as evaluation metric.&amp;nbsp; &lt;/P&gt;&lt;P&gt;First, I have done my tests using my own crypto modules (based on kernel crypto API). Then, I used cryptodev for testing again. For the two cases, I got disappointing results. In addition, I am quite sure that CAAM is working because I was watching /proc/interrupts evolution for caam_jr every time that a crypto operation was executed. If you want, I can send you my test modules and results in order to check together our different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Aymen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 12:27:40 GMT</pubDate>
    <dc:creator>Aymen_IRT</dc:creator>
    <dc:date>2014-07-01T12:27:40Z</dc:date>
    <item>
      <title>Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294089#M36252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The kernel used in my tests is imx_3.0.35_4.1.0 with the latest patches.The test board is Boundary Devices's iMX6Q Sabre Lite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With caam enabled in the &lt;SPAN class="st"&gt;kernel's command line parameters&lt;/SPAN&gt;, I got output on dmesg showing that caam is loaded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;caam caam.0: device ID = 0x0a16010000000000&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;caam caam.0: job rings = 2, qi = 0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, /proc/crypto also confirms that the caam drivers have been enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TEST 1: With caam, I use tcrypt.ko to test AES encryption/decryption&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#insmod tcrypt.ko sec=1 mode=200&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;testing speed of cbc(aes) encryption &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 0 (128 bit key, 16 byte blocks): 170772 operations in 1 seconds &lt;STRONG&gt;(2732352 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 1 (128 bit key, 64 byte blocks): 121409 operations in 1 seconds&lt;STRONG&gt; (7770176 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 2 (128 bit key, 256 byte blocks): 56503 operations in 1 seconds &lt;STRONG&gt;(14464768 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 3 (128 bit key, 1024 byte blocks): 18017 operations in 1 seconds &lt;STRONG&gt;(18449408 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 4 (128 bit key, 8192 byte blocks): 2390 operations in 1 seconds &lt;STRONG&gt;(19578880 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;testing speed of cbc(aes) decryption &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 0 (128 bit key, 16 byte blocks): 169842 operations in 1 seconds &lt;STRONG&gt;(2717472 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 1 (128 bit key, 64 byte blocks): 121802 operations in 1 seconds &lt;STRONG&gt;(7795328 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 2 (128 bit key, 256 byte blocks): 57603 operations in 1 seconds &lt;STRONG&gt;(14746368&amp;nbsp; B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 3 (128 bit key, 1024 byte blocks): 18534 operations in 1 seconds &lt;STRONG&gt;(18978816 B/s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;test 4 (128 bit key, 8192 byte blocks): 2462 operations in 1 seconds &lt;STRONG&gt;&lt;EM&gt;(20168704 B/s)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;TEST 2: Without caam, I use openssl to test AES encryption/decryption&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# openssl speed -evp aes-128-cbc&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Doing aes-128-cbc for 3s on 16 size blocks: 3547600 aes-128-cbc's in 2.99s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Doing aes-128-cbc for 3s on 64 size blocks: 946867 aes-128-cbc's in 3.00s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Doing aes-128-cbc for 3s on 256 size blocks: 240616 aes-128-cbc's in 3.00s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Doing aes-128-cbc for 3s on 1024 size blocks: 60033 aes-128-cbc's in 3.00s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Doing aes-128-cbc for 3s on 8192 size blocks: 7513 aes-128-cbc's in 2.99s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OpenSSL 1.0.1e 11 Feb 2013&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;built on: Thu Aug&amp;nbsp; 8 15:44:23 EDT 2013&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) blowfish(ptr) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;compiler: armv7l-timesys-linux-gnueabi-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/here/worl&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The 'numbers' are in 1000s of bytes per second processed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;type 16 bytes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64 bytes&amp;nbsp;&amp;nbsp;&amp;nbsp; 256 bytes&amp;nbsp;&amp;nbsp; 1024 bytes&amp;nbsp;&amp;nbsp; 8192 bytes&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;aes-128-cbc 18983.81k&amp;nbsp;&amp;nbsp;&amp;nbsp; 20199.83k 20532.57k&amp;nbsp;&amp;nbsp;&amp;nbsp; 20491.26k&amp;nbsp;&amp;nbsp;&amp;nbsp; 20584.11k&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;EM&gt; &lt;/EM&gt;Why is AES on CAAM slower than openssl without CAAM? Is it normal, or I made some mistakes in configuration?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 20:58:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294089#M36252</guid>
      <dc:creator>hhan</dc:creator>
      <dc:date>2014-04-10T20:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294090#M36253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;As for general CAAM considerations :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;Please refer to the following&amp;nbsp; :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;“Q&amp;amp;A: Why is CAAM Driver Not Functioning in Linux for iMX6?”&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;&lt;SPAN&gt;&amp;lt; &lt;/SPAN&gt;&lt;A class="jive-link-wiki-small" data-containerid="2004" data-containertype="14" data-objectid="95700" data-objecttype="102" href="https://community.freescale.com/docs/DOC-95700"&gt;https://community.freescale.com/docs/DOC-95700&lt;/A&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;If You are using the latest (on the Web) BSP release 3.0.35_4.1.0 : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;there are fixes for CAAM driver and black keys test application, the&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;patches are not part of the formal BSP and are online in our git repository:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;&lt;SPAN&gt;&amp;lt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_4.1.0"&gt;http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_4.1.0&lt;/A&gt;&lt;SPAN&gt; &amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;Patches related to CAAM changes are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00290444: Need to update CAAM driver with SM patches from STC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00290448: Double instantiation of RNG in CAAM Driver&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00290449: Cannot build CAAM as a loadable module&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00291081 CAAM: Fix the Copyright issue introduced by commit: 2b94a4b&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 03:41:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294090#M36253</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2014-04-11T03:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294091#M36254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Yuri Muhin wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;As for general CAAM considerations :&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;1.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;Please refer to the following&amp;nbsp; :&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;“Q&amp;amp;A: Why is CAAM Driver Not Functioning in Linux for iMX6?”&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;&lt;SPAN&gt;&amp;lt; &lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="2004" data-containertype="14" data-objectid="95700" data-objecttype="102" href="https://community.nxp.com/docs/DOC-95700" onclick=""&gt;https://community.freescale.com/docs/DOC-95700&lt;/A&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;OL style="list-style-type: decimal;"&gt;
&lt;LI&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;If You are using the latest (on the Web) BSP release 3.0.35_4.1.0 : &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;there are fixes for CAAM driver and black keys test application, the&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;patches are not part of the formal BSP and are online in our git repository:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;&lt;SPAN&gt;&amp;lt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_4.1.0" onclick=""&gt;http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_4.1.0&lt;/A&gt;&lt;SPAN&gt; &amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;Patches related to CAAM changes are:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00290444: Need to update CAAM driver with SM patches from STC&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00290448: Double instantiation of RNG in CAAM Driver&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00290449: Cannot build CAAM as a loadable module&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif';"&gt;ENGR00291081 CAAM: Fix the Copyright issue introduced by commit: 2b94a4b&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply.&amp;nbsp; The tests were done with all the patches you mentioned patched, but the performance was very disappointing. Any idea about that? Do you have any other test applications or performance data that I can have a look. Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 14:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294091#M36254</guid>
      <dc:creator>hhan</dc:creator>
      <dc:date>2014-04-11T14:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294092#M36255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hao Han,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using kernel_3.0.35_4.1.0 with the latest patches and my test board is the Nitrogen6x.&lt;/P&gt;&lt;P&gt;I have got the same results as you for AES. In addition, I tested digests (md5, sha1, sha224 &amp;amp; sha256) and HMAC algorithms. All the results were disappointing, considering execution time as evaluation metric.&amp;nbsp; &lt;/P&gt;&lt;P&gt;First, I have done my tests using my own crypto modules (based on kernel crypto API). Then, I used cryptodev for testing again. For the two cases, I got disappointing results. In addition, I am quite sure that CAAM is working because I was watching /proc/interrupts evolution for caam_jr every time that a crypto operation was executed. If you want, I can send you my test modules and results in order to check together our different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Aymen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 12:27:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294092#M36255</guid>
      <dc:creator>Aymen_IRT</dc:creator>
      <dc:date>2014-07-01T12:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294093#M36256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also given a look to CAAM. Find below the results from OpenSSL.&lt;/P&gt;&lt;P&gt;The first block shows the software computed reference for AES encryption:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AES-128-CBC in SW&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;openssl speed -evp aes-128-cbc&lt;/P&gt;&lt;P&gt;Doing aes-128-cbc for 3s on 16 size blocks: 1109305 aes-128-cbc's in 2.99s &lt;BR /&gt;Doing aes-128-cbc for 3s on 64 size blocks: 314532 aes-128-cbc's in 3.00s &lt;BR /&gt;Doing aes-128-cbc for 3s on 256 size blocks: 80732 aes-128-cbc's in 2.97s &lt;BR /&gt;Doing aes-128-cbc for 3s on 1024 size blocks: 20438 aes-128-cbc's in 2.98s &lt;BR /&gt;Doing aes-128-cbc for 3s on 8192 size blocks: 2565 aes-128-cbc's in 3.00s &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is what I get for using CAAM via AF_ALG. It can be seen that the processor load goes down to almost zero, but the overall performance is very poor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AES-128-CBC in HW&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;openssl speed -evp aes-128-cbc -engine af_alg&lt;/P&gt;&lt;P&gt;Doing aes-256-cbc for 3s on 16 size blocks: 2533 aes-256-cbc's in 0.02s &lt;BR /&gt;Doing aes-256-cbc for 3s on 64 size blocks: 2525 aes-256-cbc's in 0.01s &lt;BR /&gt;Doing aes-256-cbc for 3s on 256 size blocks: 2493 aes-256-cbc's in 0.01s &lt;BR /&gt;Doing aes-256-cbc for 3s on 1024 size blocks: 2387 aes-256-cbc's in 0.04s &lt;BR /&gt;Doing aes-256-cbc for 3s on 8192 size blocks: 1795 aes-256-cbc's in 0.00s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone confirm these numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using kernel version 3.0.35 with all CAAM related patches applied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 06:45:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294093#M36256</guid>
      <dc:creator>thomasschuster</dc:creator>
      <dc:date>2014-10-27T06:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294094#M36257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done a second experiment using the ablkcipher API (via tcrypt.ko).&lt;/P&gt;&lt;P&gt;To make this work I followed the procedure described here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://lkml.org/lkml/2014/10/14/363" title="https://lkml.org/lkml/2014/10/14/363"&gt;LKML: Stephan Mueller: [PATCH] kernel crypto API interface specification&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blue plot: reference results from synchronous blkcipher API using the SW AES implementation from the kernel (aes-generic).&lt;/P&gt;&lt;P&gt;Green plot: results for asynchronous ablkcipher API using CAAM (cbc-aes-caam)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="caam_results.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47074iD0446D9DB85F4D9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="caam_results.png" alt="caam_results.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(Numbers refer to 10k times encryption and decryption of data packages.&lt;/P&gt;&lt;P&gt;The size of a single package is given on the x-axis.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I see here confirms the previous observations from OpenSSL + AF_ALG.&lt;/P&gt;&lt;P&gt;For small package sizes the performance seems very poor. At approximately 8k we have break-even.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be really great to learn if this is the expected behaviour of the device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any feedback welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 07:09:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294094#M36257</guid>
      <dc:creator>thomasschuster</dc:creator>
      <dc:date>2014-10-27T07:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294095#M36258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I used the following kernel version 3.0.35_4.1.0, I got the following results with kernel crypto API (asynchronous interface): compared to SW, CAAM &lt;EM&gt;elapsed time&lt;/EM&gt; becomes interesting starting from an input length &amp;gt;= 1MB. That is, for an input length equal to 1KB, 10KB or 100KB, CAAM has poor performance. By elapsed time, I mean the real time recovered with do_gettimeofday(). However, CAAM &lt;EM&gt;CPU time&lt;/EM&gt; is smaller than SW CPU time starting from an input length &amp;gt;=100KB. CPU time is recovered using CPU cycle counters which are enabled by setting kernel CONFIG_HW_PERF_EVENTS. I think that CAAM is intended to be used for secure boot, software update and application layer cryptography. That is, CAAM can be used with applications that take a large input. However, it can not be used for network or transport layer encryption (smaller inputs).&lt;/P&gt;&lt;P&gt;In addition, I did some tests with kernel version 3.10.17, and I noticed that CAAM performance is improved for 1KB and 10KB inputs. However, it is still poor compared to SW. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Aymen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 14:06:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294095#M36258</guid>
      <dc:creator>Aymen_IRT</dc:creator>
      <dc:date>2014-12-05T14:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is AES on CAAM slower than OpenSSL w/o CAAM?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294096#M36259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Aymen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for sharing! That's fully in line with our observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 07:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Why-is-AES-on-CAAM-slower-than-OpenSSL-w-o-CAAM/m-p/294096#M36259</guid>
      <dc:creator>thomasschuster</dc:creator>
      <dc:date>2014-12-08T07:12:24Z</dc:date>
    </item>
  </channel>
</rss>

