<?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: How to declare ippsDESEncryptCBC initial vector parameter in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-declare-ippsDESEncryptCBC-initial-vector-parameter/m-p/864818#M8221</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;according our expert you may find similar sample in IPP documentation, see"Example 2-2 AES Encryption and Decryption"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir&lt;BR /&gt;</description>
    <pubDate>Fri, 16 Jan 2009 11:56:05 GMT</pubDate>
    <dc:creator>Vladimir_Dudnik</dc:creator>
    <dc:date>2009-01-16T11:56:05Z</dc:date>
    <item>
      <title>How to declare ippsDESEncryptCBC initial vector parameter</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-declare-ippsDESEncryptCBC-initial-vector-parameter/m-p/864817#M8220</link>
      <description>Hi there, &lt;BR /&gt;&lt;BR /&gt;I'm tring to write a simple code about the DES encypt in CBC mode.&lt;BR /&gt;I was only found the ippsDESEncyptECB sample code below.&lt;BR /&gt;It's works fine, and in this mode we don't need the initial vector parameter.&lt;BR /&gt;I don't know how to declare the parameter of initial vector, can anyone show me a example about the ippsDESEncryptCBC function?&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include "include/ipp.h"&lt;BR /&gt;&lt;BR /&gt;int main() {&lt;BR /&gt; int ctxSize, i;&lt;BR /&gt; ippsDESGetSize(&amp;amp;ctxSize);&lt;BR /&gt; printf("ctxSize=%d\n", ctxSize);&lt;BR /&gt; const int desBlkSize = 8;&lt;BR /&gt; IppsDESSpec* pCtx = (IppsDESSpec*) malloc(ctxSize);&lt;BR /&gt; Ipp8u key[] = {0x01,0x2,0x3,0x4,0x5,0x6,0x7,0x8};&lt;BR /&gt; ippsDESInit(key, pCtx);&lt;BR /&gt; Ipp8u ptext[] = {"quick brown fox jupm over lazy dog"};&lt;BR /&gt; printf("original string:%s\n", ptext);&lt;BR /&gt; printf("size of ptext=%d, ~desBlkSize=%d, size=%d\n", sizeof(ptext), ~(desBlkSize-1), ((sizeof(ptext)+desBlkSize-1) &amp;amp;~(desBlkSize-1)));&lt;BR /&gt; Ipp8u ctext[(sizeof(ptext)+desBlkSize-1) &amp;amp;~(desBlkSize-1)];&lt;BR /&gt; ippsDESEncryptECB(ptext, ctext, sizeof(ctext),&lt;BR /&gt; pCtx,&lt;BR /&gt; IppsCPPaddingNONE);&lt;BR /&gt; for(i=0;i&lt;SIZEOF&gt;&lt;/SIZEOF&gt; printf("%x", ctext&lt;I&gt;);&lt;BR /&gt; printf("\n");&lt;BR /&gt; Ipp8u rtext[sizeof(ctext)];&lt;BR /&gt; ippsDESDecryptECB(ctext, rtext, sizeof(ctext),&lt;BR /&gt; pCtx,&lt;BR /&gt; IppsCPPaddingNONE);&lt;BR /&gt; for(i=0;i&lt;SIZEOF&gt;&lt;/SIZEOF&gt; printf("%c", rtext&lt;I&gt;);&lt;BR /&gt;&lt;BR /&gt; printf("\n");&lt;BR /&gt;&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;best regards.&lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 16 Jan 2009 07:24:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-declare-ippsDESEncryptCBC-initial-vector-parameter/m-p/864817#M8220</guid>
      <dc:creator>peifang_hungcipheriu</dc:creator>
      <dc:date>2009-01-16T07:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to declare ippsDESEncryptCBC initial vector parameter</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-declare-ippsDESEncryptCBC-initial-vector-parameter/m-p/864818#M8221</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;according our expert you may find similar sample in IPP documentation, see"Example 2-2 AES Encryption and Decryption"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Jan 2009 11:56:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-declare-ippsDESEncryptCBC-initial-vector-parameter/m-p/864818#M8221</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2009-01-16T11:56:05Z</dc:date>
    </item>
  </channel>
</rss>

