<?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: cryptography manual: Type_BN - wrong results in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/cryptography-manual-Type-BN-wrong-results/m-p/889833#M11294</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Hi &lt;BR /&gt;One simple possible improvement is:&lt;BR /&gt;&lt;BR /&gt;void Type_BN(const char* pMsg, const IppsBigNumState* pBN){&lt;BR /&gt;using namespace std;&lt;BR /&gt; int size;&lt;BR /&gt; ippsGetSize_BN(pBN, &amp;amp;size);&lt;BR /&gt; Ipp8u* bnValue = new Ipp8u [size*4];&lt;BR /&gt; ippsGetOctString_BN(bnValue, size*4, pBN);&lt;BR /&gt; if(pMsg)&lt;BR /&gt; cout &amp;lt;&lt;PMSG&gt;&lt;/PMSG&gt; cout.fill('0'); //*********************************&lt;BR /&gt; for(int n=0; n&lt;SIZE&gt;&lt;/SIZE&gt; cout.width(2); //*********************************&lt;BR /&gt; cout&amp;lt;&lt;HEX&gt;&amp;lt;&amp;lt;(int)bnValue&lt;N&gt;;&lt;BR /&gt; }&lt;BR /&gt; cout.fill(' '); //********************************&lt;BR /&gt; cout &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; delete [] bnValue;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// Output of previous main():&lt;BR /&gt;//A: 0000000100000000&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A Chrzeszczyk&lt;BR /&gt;&lt;/N&gt;&lt;/HEX&gt;</description>
    <pubDate>Thu, 20 Aug 2009 06:45:13 GMT</pubDate>
    <dc:creator>achrzesz2</dc:creator>
    <dc:date>2009-08-20T06:45:13Z</dc:date>
    <item>
      <title>cryptography manual: Type_BN - wrong results</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/cryptography-manual-Type-BN-wrong-results/m-p/889832#M11293</link>
      <description>#include "ippcp.h"&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;void Type_BN(const char* pMsg, const IppsBigNumState* pBN){&lt;BR /&gt;using namespace std;&lt;BR /&gt; int size;&lt;BR /&gt; ippsGetSize_BN(pBN, &amp;amp;size);&lt;BR /&gt; Ipp8u* bnValue = new Ipp8u [size*4];&lt;BR /&gt; ippsGetOctString_BN(bnValue, size*4, pBN);&lt;BR /&gt; if(pMsg)&lt;BR /&gt; cout &amp;lt;&lt;PMSG&gt;&lt;/PMSG&gt; for(int n=0; n&lt;SIZE&gt;&lt;/SIZE&gt; cout&amp;lt;&lt;HEX&gt;&amp;lt;&amp;lt;(int)bnValue&lt;N&gt;;&lt;BR /&gt; cout &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; delete [] bnValue;&lt;BR /&gt;}&lt;BR /&gt;int main(){&lt;BR /&gt;using namespace std ;&lt;BR /&gt;Ipp32u A[] = {0x0,0x1};&lt;BR /&gt;int sizeWords=(sizeof A)/4;&lt;BR /&gt;int ctxSize;&lt;BR /&gt;ippsBigNumGetSize(sizeWords, &amp;amp;ctxSize);&lt;BR /&gt;IppsBigNumState* BNA = (IppsBigNumState*) (new Ipp8u [ctxSize] );&lt;BR /&gt;ippsBigNumInit(sizeWords, BNA);&lt;BR /&gt;ippsSet_BN(IppsBigNumPOS, sizeWords, A, BNA);&lt;BR /&gt;Type_BN("A: ",BNA); // &lt;BR /&gt;delete [] (Ipp8u*) BNA;&lt;BR /&gt;return 0;}&lt;BR /&gt;//Output:&lt;BR /&gt;//A: 00010000&lt;BR /&gt;&lt;BR /&gt;//should be A: 100000000&lt;BR /&gt;&lt;BR /&gt;A. Chrzeszczyk&lt;/N&gt;&lt;/HEX&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Thu, 20 Aug 2009 06:10:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/cryptography-manual-Type-BN-wrong-results/m-p/889832#M11293</guid>
      <dc:creator>achrzesz2</dc:creator>
      <dc:date>2009-08-20T06:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: cryptography manual: Type_BN - wrong results</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/cryptography-manual-Type-BN-wrong-results/m-p/889833#M11294</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Hi &lt;BR /&gt;One simple possible improvement is:&lt;BR /&gt;&lt;BR /&gt;void Type_BN(const char* pMsg, const IppsBigNumState* pBN){&lt;BR /&gt;using namespace std;&lt;BR /&gt; int size;&lt;BR /&gt; ippsGetSize_BN(pBN, &amp;amp;size);&lt;BR /&gt; Ipp8u* bnValue = new Ipp8u [size*4];&lt;BR /&gt; ippsGetOctString_BN(bnValue, size*4, pBN);&lt;BR /&gt; if(pMsg)&lt;BR /&gt; cout &amp;lt;&lt;PMSG&gt;&lt;/PMSG&gt; cout.fill('0'); //*********************************&lt;BR /&gt; for(int n=0; n&lt;SIZE&gt;&lt;/SIZE&gt; cout.width(2); //*********************************&lt;BR /&gt; cout&amp;lt;&lt;HEX&gt;&amp;lt;&amp;lt;(int)bnValue&lt;N&gt;;&lt;BR /&gt; }&lt;BR /&gt; cout.fill(' '); //********************************&lt;BR /&gt; cout &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; delete [] bnValue;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// Output of previous main():&lt;BR /&gt;//A: 0000000100000000&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A Chrzeszczyk&lt;BR /&gt;&lt;/N&gt;&lt;/HEX&gt;</description>
      <pubDate>Thu, 20 Aug 2009 06:45:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/cryptography-manual-Type-BN-wrong-results/m-p/889833#M11294</guid>
      <dc:creator>achrzesz2</dc:creator>
      <dc:date>2009-08-20T06:45:13Z</dc:date>
    </item>
  </channel>
</rss>

