<?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 a) exactly, the best way is in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132983#M25840</link>
    <description>&lt;P&gt;a) exactly, the best way is avoid lookup operations&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;b) latest IPP implementation of SM4 is using Sbox (is AES-NI are disables), but provide uniform access to SM4 S-box does not dependent from particular input index.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;c) IPP implementation of SM4 does not contains large S-boxes, It uses "standard" SM4 256-byte short S-box&lt;/P&gt;

&lt;P&gt;const __ALIGN64 Ipp8u SMS4_Sbox[16*16] = {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xD6,0x90,0xE9,0xFE,0xCC,0xE1,0x3D,0xB7,0x16,0xB6,0x14,0xC2,0x28,0xFB,0x2C,0x05,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x2B,0x67,0x9A,0x76,0x2A,0xBE,0x04,0xC3,0xAA,0x44,0x13,0x26,0x49,0x86,0x06,0x99,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x9C,0x42,0x50,0xF4,0x91,0xEF,0x98,0x7A,0x33,0x54,0x0B,0x43,0xED,0xCF,0xAC,0x62,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xE4,0xB3,0x1C,0xA9,0xC9,0x08,0xE8,0x95,0x80,0xDF,0x94,0xFA,0x75,0x8F,0x3F,0xA6,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x47,0x07,0xA7,0xFC,0xF3,0x73,0x17,0xBA,0x83,0x59,0x3C,0x19,0xE6,0x85,0x4F,0xA8,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x68,0x6B,0x81,0xB2,0x71,0x64,0xDA,0x8B,0xF8,0xEB,0x0F,0x4B,0x70,0x56,0x9D,0x35,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x1E,0x24,0x0E,0x5E,0x63,0x58,0xD1,0xA2,0x25,0x22,0x7C,0x3B,0x01,0x21,0x78,0x87,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xD4,0x00,0x46,0x57,0x9F,0xD3,0x27,0x52,0x4C,0x36,0x02,0xE7,0xA0,0xC4,0xC8,0x9E,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xEA,0xBF,0x8A,0xD2,0x40,0xC7,0x38,0xB5,0xA3,0xF7,0xF2,0xCE,0xF9,0x61,0x15,0xA1,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xE0,0xAE,0x5D,0xA4,0x9B,0x34,0x1A,0x55,0xAD,0x93,0x32,0x30,0xF5,0x8C,0xB1,0xE3,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x1D,0xF6,0xE2,0x2E,0x82,0x66,0xCA,0x60,0xC0,0x29,0x23,0xAB,0x0D,0x53,0x4E,0x6F,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xD5,0xDB,0x37,0x45,0xDE,0xFD,0x8E,0x2F,0x03,0xFF,0x6A,0x72,0x6D,0x6C,0x5B,0x51,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x8D,0x1B,0xAF,0x92,0xBB,0xDD,0xBC,0x7F,0x11,0xD9,0x5C,0x41,0x1F,0x10,0x5A,0xD8,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x0A,0xC1,0x31,0x88,0xA5,0xCD,0x7B,0xBD,0x2D,0x74,0xD0,0x12,0xB8,0xE5,0xB4,0xB0,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x89,0x69,0x97,0x4A,0x0C,0x96,0x77,0x7E,0x65,0xB9,0xF1,0x09,0xC5,0x6E,0xC6,0x84,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x18,0xF0,0x7D,0xEC,0x3A,0xDC,0x4D,0x20,0x79,0xEE,0x5F,0x3E,0xD7,0xCB,0x39,0x48&lt;BR /&gt;
	};&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2018 10:25:51 GMT</pubDate>
    <dc:creator>Sergey_K_Intel4</dc:creator>
    <dc:date>2018-02-08T10:25:51Z</dc:date>
    <item>
      <title>Efficiency of ippsSMS4EncryptCBC</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132974#M25831</link>
      <description>&lt;P&gt;I was testing IPP SMS4 functions on a&amp;nbsp;Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;STRONG&gt;ippsSMS4EncryptCBC&lt;/STRONG&gt; takes &lt;STRONG&gt;1.3s&lt;/STRONG&gt; to encrypt 100MB data, while&amp;nbsp;&lt;STRONG&gt;ippsSMS4DecryptCBC&lt;/STRONG&gt; taking only&lt;STRONG&gt; 0.25s&lt;/STRONG&gt; to decrypt the cipher.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;SMS4 is a&amp;nbsp;&lt;A href="https://www.baidu.com/link?url=pwQ5XuVbtssmzE_PDTqOwl6UPLNcosfIEraoav32HgWcVxb6tH1ys5GrtR6V8toBWa98xtRlk0HVk8qk1xI4Hi-d2F0XNzprZ16Povru97X__zYIsmMenoXJU8WPHLVn&amp;amp;wd=&amp;amp;eqid=d25017a90001b601000000065a744f41" style="color: rgb(51, 51, 51); font-size: 13px; font-family: arial;" target="_blank"&gt;symmetric encryption&lt;/A&gt;, why encrypting is much slower than decrypting in IPP crypto?&lt;/P&gt;

&lt;P&gt;The source file is compiled with gcc not icc, does it matter?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 11:46:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132974#M25831</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-02T11:46:39Z</dc:date>
    </item>
    <item>
      <title>hi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132975#M25832</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;CBC decryption has no&amp;nbsp;feedback dependency, while CBC encryption has.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;This feature allows perform decryption of several blocks&amp;nbsp;simultaneously.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;This feature is general for CBC mode.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;If one compare AES-CBC encryption and decryption the general picture will look the same – decryption is several times faster.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;regards, Igor&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 13:22:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132975#M25832</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2018-02-03T13:22:29Z</dc:date>
    </item>
    <item>
      <title>hi zhongqiang,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132976#M25833</link>
      <description>&lt;P&gt;hi &lt;FONT color="#086db6"&gt;zhongqiang,&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#086db6"&gt;which IPP version do you use? (+operating system? arch? (ia32 or Intel64), linking - static or dynamic?) &lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#086db6"&gt;the best reply is to provide an output from ippcpGetLibVersion():&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; const IppLibraryVersion* lib;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lib = ippcpGetLibVersion();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%s %s %d.%d.%d.%d\n", lib-&amp;gt;Name, lib-&amp;gt;Version, lib-&amp;gt;major, lib-&amp;gt;minor, lib-&amp;gt;majorBuild, lib-&amp;gt;build);&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#086db6"&gt;regards, Igor&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 10:29:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132976#M25833</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2018-02-05T10:29:57Z</dc:date>
    </item>
    <item>
      <title>The output is:</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132977#M25834</link>
      <description>&lt;P&gt;Hi, Igor&lt;/P&gt;

&lt;P&gt;The output is:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 1em;"&gt;ippCP AVX (e9) 2018.0.1 (r57267) 2018.0.1.57267&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;My OS is&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Linux algo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The linking arguments are:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;cc -I/opt/intel/ippcp/include -O3&amp;nbsp; &amp;nbsp;-c -o sm4test.o sm4test.c&lt;BR /&gt;
	cc -I/opt/intel/ippcp/include -O3 -g sm4test.o /opt/intel/ippcp/lib/intel64/libippcp.a&amp;nbsp; -o test&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 11:34:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132977#M25834</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-05T11:34:00Z</dc:date>
    </item>
    <item>
      <title>Hi, </title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132978#M25835</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;
	Just check the sm4test.c file in&lt;STRONG&gt; &lt;/STRONG&gt;"&lt;A href="https://community.intel.com/legacyfs/online/drupal_files/managed/e7/65/SM4_CBC.7z"&gt;SM4_CBC.7z"&lt;/A&gt;,&amp;nbsp; it does not include any IPP call.&amp;nbsp; Is there anything missed there?&lt;BR /&gt;
	&lt;BR /&gt;
	Also, could you submit your Could you summit a support ticket to our support site: &lt;A href="https://www.intel.com/supporttickets"&gt;https://www.intel.com/supporttickets&lt;/A&gt;? Our support team can reproduce with your test code for the investigation.&amp;nbsp;&amp;nbsp;Here are some&amp;nbsp;steps:&amp;nbsp; &lt;A href="https://community.intel.com/legacyfs/online/drupal_files/managed/97/ce/SubmittingSupportIssue.pdf"&gt;https://software.intel.com/sites/default/files/managed/97/ce/SubmittingS...&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Chao&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 08:40:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132978#M25835</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2018-02-07T08:40:40Z</dc:date>
    </item>
    <item>
      <title>Hi, Chao Y,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132979#M25836</link>
      <description>&lt;P&gt;Hi, Chao Y,&lt;/P&gt;

&lt;P&gt;My support ticket is &lt;SPAN style="color: rgb(37, 37, 37); font-family: intel-clear, tahoma, Helvetica, helvetica, Arial, sans-serif; font-size: 16px; text-align: right;"&gt;03236416&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;"&lt;/SPAN&gt;&lt;A href="https://community.intel.com/legacyfs/online/drupal_files/managed/e7/65/SM4_CBC.7z"&gt;SM4_CBC.7z"&lt;/A&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;is the code I downloaded from the Internet and did some slight modifications. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;The sample code (my code and ipp code) has been uploaded to the support site.&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp;Many thanks.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 10:05:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132979#M25836</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-07T10:05:22Z</dc:date>
    </item>
    <item>
      <title>Quote:Igor Astakhov (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132980#M25837</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Igor Astakhov (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;CBC decryption has no&amp;nbsp;feedback dependency, while CBC encryption has.&lt;/P&gt;

&lt;P&gt;This feature allows perform decryption of several blocks&amp;nbsp;simultaneously.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This feature is general for CBC mode.&lt;/P&gt;

&lt;P&gt;If one compare AES-CBC encryption and decryption the general picture will look the same – decryption is several times faster&lt;/P&gt;

&lt;P&gt;regards, Igor&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you for your reply.&lt;/P&gt;

&lt;P&gt;I downloaded the SM4 source code from the internet and did some modifications.&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;The code takes 0.88s to encrypt 100MB data in Intel Xeon E3-1230.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I would like to utilize IPP Crypto to optimize the SM4, but found that IPP is a lot slower. I was wondering if there is a high-throughput (&amp;gt; 400MBps in E3-1230) SM4 encryption in IPP crypto?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 10:45:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132980#M25837</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-07T10:45:14Z</dc:date>
    </item>
    <item>
      <title>hi Zhongqiang,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132981#M25838</link>
      <description>&lt;P&gt;hi Zhongqiang,&lt;/P&gt;

&lt;P&gt;the best performance is not the&amp;nbsp;only criterion for crypto functionality. The main criterion in addition to performance is that all IPP crypto functions are safe and mitigated from all known attacks (in ~2005 was published cache-timing attack with cache-line-size granularity, in 2017 - with 16-bit granularity (MemJam)). You implementation is well known - with pre-calculated big tables - it is not safe against the 1st kind and all further attacks.&lt;/P&gt;

&lt;P&gt;reading from&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;uint32_t Sbox_final0_rest[256]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;uint32_t Sbox_final1_rest[256]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;uint32_t Sbox_final2_rest[256]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;uint32_t Sbox_final3_rest[256]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-US" style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11pt; mso-ansi-language: EN-US; mso-fareast-language: EN-US;"&gt;directly depends on the round key and is not regular through your tables - therefore the round key can be easily restored by cache-timing attack and you know - secret and round key are &lt;/SPAN&gt;mutually reversible. Please take a look at the attached doc.&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="margin: 0cm 0cm 0pt;"&gt;regards, Igor&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 11:51:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132981#M25838</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2018-02-07T11:51:10Z</dc:date>
    </item>
    <item>
      <title>Hi, Igor</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132982#M25839</link>
      <description>&lt;P&gt;Hi, Igor&lt;/P&gt;

&lt;P&gt;Did you mean the non-linear substitution should not be implemented as a fixed lookup table for security reasons?&lt;/P&gt;

&lt;P&gt;However, I found that SMS4_Sbox (&lt;SPAN style="font-size: 13.008px;"&gt;the original Sbox table, in type uint32_t [256])&amp;nbsp;&lt;/SPAN&gt;is defined in the IPP crypto&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;according to the disassembly information of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;ippsSMS4EncryptCBC.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Sbox_final_res is almost equivalent to SMS4_Sbox which also depends on the round key for reading, so&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;IPP crypto functions are note safe either?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 02:41:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132982#M25839</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-08T02:41:00Z</dc:date>
    </item>
    <item>
      <title>a) exactly, the best way is</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132983#M25840</link>
      <description>&lt;P&gt;a) exactly, the best way is avoid lookup operations&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;b) latest IPP implementation of SM4 is using Sbox (is AES-NI are disables), but provide uniform access to SM4 S-box does not dependent from particular input index.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;c) IPP implementation of SM4 does not contains large S-boxes, It uses "standard" SM4 256-byte short S-box&lt;/P&gt;

&lt;P&gt;const __ALIGN64 Ipp8u SMS4_Sbox[16*16] = {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xD6,0x90,0xE9,0xFE,0xCC,0xE1,0x3D,0xB7,0x16,0xB6,0x14,0xC2,0x28,0xFB,0x2C,0x05,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x2B,0x67,0x9A,0x76,0x2A,0xBE,0x04,0xC3,0xAA,0x44,0x13,0x26,0x49,0x86,0x06,0x99,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x9C,0x42,0x50,0xF4,0x91,0xEF,0x98,0x7A,0x33,0x54,0x0B,0x43,0xED,0xCF,0xAC,0x62,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xE4,0xB3,0x1C,0xA9,0xC9,0x08,0xE8,0x95,0x80,0xDF,0x94,0xFA,0x75,0x8F,0x3F,0xA6,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x47,0x07,0xA7,0xFC,0xF3,0x73,0x17,0xBA,0x83,0x59,0x3C,0x19,0xE6,0x85,0x4F,0xA8,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x68,0x6B,0x81,0xB2,0x71,0x64,0xDA,0x8B,0xF8,0xEB,0x0F,0x4B,0x70,0x56,0x9D,0x35,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x1E,0x24,0x0E,0x5E,0x63,0x58,0xD1,0xA2,0x25,0x22,0x7C,0x3B,0x01,0x21,0x78,0x87,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xD4,0x00,0x46,0x57,0x9F,0xD3,0x27,0x52,0x4C,0x36,0x02,0xE7,0xA0,0xC4,0xC8,0x9E,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xEA,0xBF,0x8A,0xD2,0x40,0xC7,0x38,0xB5,0xA3,0xF7,0xF2,0xCE,0xF9,0x61,0x15,0xA1,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xE0,0xAE,0x5D,0xA4,0x9B,0x34,0x1A,0x55,0xAD,0x93,0x32,0x30,0xF5,0x8C,0xB1,0xE3,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x1D,0xF6,0xE2,0x2E,0x82,0x66,0xCA,0x60,0xC0,0x29,0x23,0xAB,0x0D,0x53,0x4E,0x6F,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0xD5,0xDB,0x37,0x45,0xDE,0xFD,0x8E,0x2F,0x03,0xFF,0x6A,0x72,0x6D,0x6C,0x5B,0x51,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x8D,0x1B,0xAF,0x92,0xBB,0xDD,0xBC,0x7F,0x11,0xD9,0x5C,0x41,0x1F,0x10,0x5A,0xD8,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x0A,0xC1,0x31,0x88,0xA5,0xCD,0x7B,0xBD,0x2D,0x74,0xD0,0x12,0xB8,0xE5,0xB4,0xB0,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x89,0x69,0x97,0x4A,0x0C,0x96,0x77,0x7E,0x65,0xB9,0xF1,0x09,0xC5,0x6E,0xC6,0x84,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;0x18,0xF0,0x7D,0xEC,0x3A,0xDC,0x4D,0x20,0x79,0xEE,0x5F,0x3E,0xD7,0xCB,0x39,0x48&lt;BR /&gt;
	};&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 10:25:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132983#M25840</guid>
      <dc:creator>Sergey_K_Intel4</dc:creator>
      <dc:date>2018-02-08T10:25:51Z</dc:date>
    </item>
    <item>
      <title>Hi Kirillov,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132984#M25841</link>
      <description>Hi Kirillov,

Thanks for the explanation.

The precalculated Sbox_final_res table is indeed a lot larger (16x) than the standard Sbox and it does not support 'uniform access'.

The goal is to achieve 400MBps in &amp;nbsp;E3-1230 (my code still needs 3x improvements), does IPP crypto have any solution?</description>
      <pubDate>Fri, 09 Feb 2018 03:57:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132984#M25841</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-09T03:57:42Z</dc:date>
    </item>
    <item>
      <title>Not sure it's possible. Let</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132985#M25842</link>
      <description>&lt;P&gt;Not sure it's possible. Let convert your requirement (400MB/s, 3.3GHz) into another units. It corresponds to 3.3e^9/400*1e^6 = 8 cycles/byte. It's your goal.&lt;/P&gt;

&lt;P&gt;Imagine you have AES128-CBC cipher instead of SM4-CBC. What performance do you expect from AES128-CBC encryption based on&amp;nbsp; AES-NI implementation? Suppose it will about 3-4 cycles/byte. (Recall, that CBC encryption allows block-by-block processing only).&lt;/P&gt;

&lt;P&gt;Both AES and SM4 have 16-byte block. But AES128 takes 11 rounds per block encryption whereas SM4 takes 32. From my point of view this means that SM4-CBC encryption could not show performance better than 3*(32/11)=9 cycles/byte. This estimation based on assumption that both AES and SM4 have similar efficient implementation (== directly mapped into AES-NI). But unfortunately it is not true. AES-NI have been designed for AES implementation specifically, not for SM4. In spite of AES-NI applicable for SM4 performance improvement (recall IPP SM4-CBC decryption shows 0.25s per 100MB) it can't change the situation dramatically.&lt;/P&gt;

&lt;P&gt;That is why I think that SM4-CBC encryption at 400MB/s on 3.3GHz CPU is not real&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 06:15:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132985#M25842</guid>
      <dc:creator>Sergey_K_Intel4</dc:creator>
      <dc:date>2018-02-09T06:15:19Z</dc:date>
    </item>
    <item>
      <title>Quote:Sergey Kirillov (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132986#M25843</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Sergey Kirillov (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Not sure it's possible. Let convert your requirement (400MB/s, 3.3GHz) into another units. It corresponds to 3.3e^9/400*1e^6 = 8 cycles/byte. It's your goal.&lt;/P&gt;

&lt;P&gt;Imagine you have AES128-CBC cipher instead of SM4-CBC. What performance do you expect from AES128-CBC encryption based on&amp;nbsp; AES-NI implementation? Suppose it will about 3-4 cycles/byte. (Recall, that CBC encryption allows block-by-block processing only).&lt;/P&gt;

&lt;P&gt;Both AES and SM4 have 16-byte block. But AES128 takes 11 rounds per block encryption whereas SM4 takes 32. From my point of view this means that SM4-CBC encryption could not show performance better than 3*(32/11)=9 cycles/byte. This estimation based on assumption that both AES and SM4 have similar efficient implementation (== directly mapped into AES-NI). But unfortunately it is not true. AES-NI have been designed for AES implementation specifically, not for SM4. In spite of AES-NI applicable for SM4 performance improvement (recall IPP SM4-CBC decryption shows 0.25s per 100MB) it can't change the situation dramatically.&lt;/P&gt;

&lt;P&gt;That is why I think that SM4-CBC encryption at 400MB/s on 3.3GHz CPU is not real&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;You may be right.&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;My idea is to shorten the critical dependency path of SM4 CBC but got no progress.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Anyway, thank you all for your patience and help. I've learned something from this post.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;I'll cancel the support request and get in touch with you guys if I have any further question :)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 10:08:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132986#M25843</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-02-09T10:08:53Z</dc:date>
    </item>
    <item>
      <title>ippsSMS4EncryptCBC takes 1.3s</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132987#M25844</link>
      <description>ippsSMS4EncryptCBC takes 1.3s to encrypt 100MB data, while ippsSMS4DecryptCBC taking only 0.25s to decrypt the cipher
this is tested by all cores or single core?</description>
      <pubDate>Sun, 18 Nov 2018 04:32:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Efficiency-of-ippsSMS4EncryptCBC/m-p/1132987#M25844</guid>
      <dc:creator>Lee__Mike</dc:creator>
      <dc:date>2018-11-18T04:32:31Z</dc:date>
    </item>
  </channel>
</rss>

