Developer Reference


Example of Using Montgomery Reduction Scheme Functions

Montgomery Multiplication  
void MontMul_sample(void){</codeblock> int size;   // define and initialize Montgomery Engine over Modulus N Ipp32u bnuN = 19; ippsMontGetSize(IppsBinaryMethod, 1, &amp;size); IppsMontState* pMont = (IppsMontState*)( new Ipp8u [size] ); ippsMontInit(IppsBinaryMethod, 1, pMont); ippsMontSet(&amp;bnuN, 1, pMont);   // define and init Big Number multiplicant A Ipp32u bnuA = 12; IppsBigNumState* bnA = New_BN(1, &amp;bnuA); // encode A into Montfomery form ippsMontForm(bnA, pMont, bnA);   // define and init Big Number multiplicant A Ipp32u bnuB = 15; IppsBigNumState* bnB = New_BN(1, &amp;bnuB);     // compute R = A*B mod N IppsBigNumState* bnR = New_BN(1); ippsMontMul(bnA, bnB, pMont, bnR);   Type_BN("R = A*B mod N:\n", bnR); delete [] (Ipp8u*)pMont; delete [] (Ipp8u*)bnA; delete [] (Ipp8u*)bnB; delete [] (Ipp8u*)bnR; }

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804