<?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 Quote:Gennady F. (Intel)  in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159959#M26536</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gennady F. (Intel) (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would be also very useful if you will provide 1/ the CPU type you are running this application and 2/ and don't measure the initialization part of this computations like ippsSMS4Init .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;&amp;nbsp;I run my test code on virtual machine of&amp;nbsp;alibaba cloud. The CPU is&amp;nbsp;Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz,&amp;nbsp;kernel for a single CPU.&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; I did not measure the&amp;nbsp;initialization part of this computations like ippsSMS4Init, you can cheak the code above, it has been&amp;nbsp;commented out.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Zhu Xuewu&lt;/P&gt;</description>
    <pubDate>Mon, 19 Nov 2018 10:03:17 GMT</pubDate>
    <dc:creator>zhu__xuewu</dc:creator>
    <dc:date>2018-11-19T10:03:17Z</dc:date>
    <item>
      <title>Performance in IPP Crypto vs. OpenSSL with static library</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159956#M26533</link>
      <description>&lt;P&gt;I`ve&amp;nbsp; compare &amp;nbsp;the SM3/4&amp;nbsp;performance of the ippcp and openssl. Here is the test result :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sm3:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sm4:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;65536&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 &amp;nbsp;&amp;nbsp; &amp;nbsp;65536 &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;ippcp2019_with_dynamic_lib&amp;nbsp;&amp;nbsp; &amp;nbsp;1628664&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;208877&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;3528&amp;nbsp;&amp;nbsp; &amp;nbsp;TPS&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;113385&amp;nbsp;&amp;nbsp; &amp;nbsp;7141&amp;nbsp;&amp;nbsp; &amp;nbsp;111 &amp;nbsp;&amp;nbsp; &amp;nbsp;TPS&lt;BR /&gt;ippcp2019_with_static_lib&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1619249&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;212247&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;3530&amp;nbsp;&amp;nbsp; &amp;nbsp;TPS&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;504006&amp;nbsp;&amp;nbsp; &amp;nbsp;35565&amp;nbsp;&amp;nbsp; 562 &amp;nbsp;&amp;nbsp; &amp;nbsp;TPS&lt;BR /&gt;openssl_1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1084010&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;141426&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;2300&amp;nbsp;&amp;nbsp; &amp;nbsp;TPS&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;371751&amp;nbsp;&amp;nbsp; &amp;nbsp;38036&amp;nbsp;&amp;nbsp; 621&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;TPS&lt;/P&gt;&lt;P&gt;I think the IPP Crypto could do much better than OpenSSL, but I only got this. I hope someone could help me with this. I paste my test code of SM3/4 with&amp;nbsp;IPP Crypto below(l_ippcp_2019.0.117):&lt;/P&gt;&lt;P&gt;gcc -O3 ippcp_SM4_CBC_test.c -o ippcp_SM4_CBC_test -I/opt/intel/compilers_and_libraries_2019.0.117/linux/ipp/include -I/opt/intel/compilers_and_libraries_2019.0.117/linux/ippcp/include /opt/intel/compilers_and_libraries_2019.0.117/linux/ippcp/lib/intel64_lin/libippcp.a&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include "ipp.h"
#include "ippcp.h"
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;string.h&amp;gt;

int SM3_ContextSize = 0;

int main(int argc, char *argv[])
{
	char mess0[65536] = { 0 };
	unsigned char mres[64] = { 0 };
	int byte, i;
	float time_use = 0;
	struct timeval start;
	struct timeval end;
	long my_tps = 0;
	long repeattime = 0;
	if (argc != 3)
	{
		printf("Usage: %s byte(s) repeattime\n", argv[0]);
		printf("byte(s) only can be like :64 1024 65536\n");
		exit(1);
	}

	byte = atoi(argv[1]);
	repeattime = atol(argv[2]);

	ippsSM3GetSize(&amp;amp;SM3_ContextSize);

	gettimeofday(&amp;amp;start, NULL);
	IppsSM3State *sm3_context = (IppsSM3State*)malloc(SM3_ContextSize);
	for (i = 0; i &amp;lt; repeattime; i++)
	{
		

		memset(mess0, 49, byte);

		ippsSM3Init(sm3_context);

		ippsSM3Update((unsigned char*)mess0, byte, sm3_context);

		ippsSM3Final(mres, sm3_context);
		/*int j;
		for (j = 0; j &amp;lt; 32; j++)
		{
			printf("%02x", mres&lt;J&gt;);
		}
		printf("\n");*/
		memset(mres, 0, 64);
	}

	gettimeofday(&amp;amp;end, NULL);
	time_use = (end.tv_sec - start.tv_sec) * 1000000 + (end.tv_usec - start.tv_usec);
	printf("time_use is %f\n", time_use);
	my_tps = repeattime * 1000000L / time_use;
	printf("TPS: %ld\n", my_tps);
	free(sm3_context);
	return 0;
}&lt;/J&gt;&lt;/PRE&gt;

&lt;P&gt;gcc -O3 ippcp_SM3_test.c -o ippcp_SM3_test -I/opt/intel/compilers_and_libraries_2019.0.117/linux/ipp/include -I/opt/intel/compilers_and_libraries_2019.0.117/linux/ippcp/include /opt/intel/compilers_and_libraries_2019.0.117/linux/ippcp/lib/intel64_lin/libippcp.a&lt;/P&gt;

&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include "ipp.h"
#include "ippcp.h"
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;string.h&amp;gt;

int SM4_CBC_ContextSize = 0;
int main(int argc, char* argv[])
{

	IppStatus istate;
	unsigned char pkey[16] = { 
		0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
		0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, 
	};
	unsigned char pIV[16] = { 
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	};
	int keyLen = 16;
	Ipp8u* pKey = pkey;
	int byte, i;
	float time_use = 0;
	struct timeval start;
	struct timeval end;
	char a[65536] = { 0 };
	long repeattime = 0;
	long my_tps = 0;
	if (argc != 3) 
	{
		printf("Usage: %s byte(s) repeattime\n", argv[0]);
		printf("byte(s) only can be like :64 1024 65536\n");
		exit(1);
	}

	byte = atoi(argv[1]);
	repeattime = atol(argv[2]);

	ippsSMS4GetSize(&amp;amp;SM4_CBC_ContextSize);
	memset(a, 49, byte);
	IppsSMS4Spec* sm4_cbc_context = (IppsSMS4Spec*)malloc(SM4_CBC_ContextSize);
	IppsSMS4Spec* sm4_cbc_context2 = (IppsSMS4Spec*)malloc(SM4_CBC_ContextSize);
	gettimeofday(&amp;amp;start, NULL);
	

                istate = ippsSMS4Init(pKey, keyLen, sm4_cbc_context, SM4_CBC_ContextSize);
istate = ippsSMS4Init(pKey, keyLen, sm4_cbc_context2, SM4_CBC_ContextSize);

ippsSMS4SetKey(pKey, 16, sm4_cbc_context);
ippsSMS4SetKey(pKey, 16, sm4_cbc_context2);

	for (i = 0; i &amp;lt; repeattime; i++)
	{
		//encryption
		
		//istate = ippsSMS4Init(pKey, keyLen, sm4_cbc_context, SM4_CBC_ContextSize);

		unsigned char b[65536];
		//ippsSMS4SetKey(pKey, 16, sm4_cbc_context);
		istate = ippsSMS4EncryptCBC((unsigned char*)a, b, byte, sm4_cbc_context, pIV);
		if(ippStsNoErr != istate)
		{
			printf("ippsSMS4EncryptCBC err %d\n", istate);
			break;
		}	
		/*for (j = 0; j &amp;lt; byte; j++) {
			printf("%02x ", b&lt;J&gt;);
		}
		printf("\n");*/
		/*gettimeofday(&amp;amp;end, NULL);
		time_use = (end.tv_sec - start.tv_sec) * 1000000 + (end.tv_usec - start.tv_usec);
		printf("time_use is %f\n", time_use);*/
		//decryption
		unsigned char c[65536];
		
		//istate = ippsSMS4Init(pKey, keyLen, sm4_cbc_context2, SM4_CBC_ContextSize);

		//ippsSMS4SetKey(pKey, 16, sm4_cbc_context2);
		istate = ippsSMS4DecryptCBC(b, c, byte, sm4_cbc_context2, pIV);
                if(ippStsNoErr != istate)
                {
                        printf("ippsSMS4DecryptCBC err %d\n", istate);
                        break;
                }

		/*for (j = 0; j &amp;lt; byte; j++) {
			printf("%c", c&lt;J&gt;);
		}
		printf("\n");*/
	}

	gettimeofday(&amp;amp;end, NULL);
	time_use = (end.tv_sec - start.tv_sec) * 1000000 + (end.tv_usec - start.tv_usec);
	printf("time_use is %f\n", time_use);
	my_tps = repeattime * 1000000L / time_use;
	printf("TPS: %ld\n", my_tps);
	free(sm4_cbc_context);
	free(sm4_cbc_context2);
	return 0;
}
&lt;/J&gt;&lt;/J&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 03:32:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159956#M26533</guid>
      <dc:creator>zhu__xuewu</dc:creator>
      <dc:date>2018-11-18T03:32:22Z</dc:date>
    </item>
    <item>
      <title>Hi, Xuexu, </title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159957#M26534</link>
      <description>&lt;P&gt;Hi, Xuexu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for test code. We need to reproduce your issue here.&amp;nbsp;&lt;BR /&gt;could you submit the test code into our support ticket. Here are some steps you can follow:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://software.intel.com/sites/default/files/managed/d5/ce/SubmittingSupportIssue.pdf" target="_blank"&gt;https://software.intel.com/sites/default/files/managed/d5/ce/SubmittingSupportIssue.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Our support export&amp;nbsp;will check this code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Chao&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 06:03:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159957#M26534</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2018-11-19T06:03:24Z</dc:date>
    </item>
    <item>
      <title>it would be also very useful</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159958#M26535</link>
      <description>&lt;P&gt;it would be also very useful if you will provide 1/ the CPU type you are running this application and 2/ and don't measure the initialization part of this computations like ippsSMS4Init .&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:46:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159958#M26535</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2018-11-19T07:46:19Z</dc:date>
    </item>
    <item>
      <title>Quote:Gennady F. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159959#M26536</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gennady F. (Intel) (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would be also very useful if you will provide 1/ the CPU type you are running this application and 2/ and don't measure the initialization part of this computations like ippsSMS4Init .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;&amp;nbsp;I run my test code on virtual machine of&amp;nbsp;alibaba cloud. The CPU is&amp;nbsp;Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz,&amp;nbsp;kernel for a single CPU.&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; I did not measure the&amp;nbsp;initialization part of this computations like ippsSMS4Init, you can cheak the code above, it has been&amp;nbsp;commented out.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Zhu Xuewu&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 10:03:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159959#M26536</guid>
      <dc:creator>zhu__xuewu</dc:creator>
      <dc:date>2018-11-19T10:03:17Z</dc:date>
    </item>
    <item>
      <title>Quote:Chao Y (Intel) (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159960#M26537</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Chao Y (Intel) (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, Xuexu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for test code. We need to reproduce your issue here.&amp;nbsp;&lt;BR /&gt;could you submit the test code into our support ticket. Here are some steps you can follow:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.intel.com/legacyfs/online/drupal_files/managed/d5/ce/SubmittingSupportIssue.pdf"&gt;https://software.intel.com/sites/default/files/managed/d5/ce/SubmittingS...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Our support export&amp;nbsp;will check this code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;BR /&gt;Chao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&amp;nbsp;Chao,&lt;/P&gt;&lt;P&gt;I have submit the test code and some information about my test environment. &amp;nbsp;I am&amp;nbsp;looking forward to receiving your reply.&lt;/P&gt;&lt;P&gt;Zhu Xuewu&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 10:15:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159960#M26537</guid>
      <dc:creator>zhu__xuewu</dc:creator>
      <dc:date>2018-11-19T10:15:10Z</dc:date>
    </item>
    <item>
      <title>Xuexu, we assigned owner to</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159961#M26538</link>
      <description>&lt;P&gt;Xuexu, we assigned owner to this ticket and we will try to reproduce this case on our side.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 03:37:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159961#M26538</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2018-11-21T03:37:37Z</dc:date>
    </item>
    <item>
      <title>Hi, Xuewu, </title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159962#M26539</link>
      <description>&lt;P&gt;Hi, Xuewu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We further investigate the code performance: &amp;nbsp;&lt;/P&gt;&lt;P&gt;The SM4-CBC-DEC operation in IPP much faster, but the SM4-CBC-ENC is a bit slower. The performance difference is because BC-ENC has dependency in the input data, but&amp;nbsp;CBC-DEC has no. In IPP SM4 BC-ENC part, it chooses some more secure way for implementation, which has the performance cost.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 04:10:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Performance-in-IPP-Crypto-vs-OpenSSL-with-static-library/m-p/1159962#M26539</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2019-01-25T04:10:14Z</dc:date>
    </item>
  </channel>
</rss>

