/external/epid-sdk/ext/ipp/sources/ippcp/ |
D | pcpbn.h | 76 #define BN_NUMBER(pBN) ((pBN)->number) macro 101 ZEXPAND_COPY_BNU(BN_NUMBER(pDst), BN_ROOM(pDst), BN_NUMBER(pSrc), BN_SIZE(pSrc)); in cpBN_copy() 109 ZEXPAND_BNU(BN_NUMBER(pBN),0, (int)BN_ROOM(pBN)); in cpBN_zero() 116 FIX_BNU(BN_NUMBER(pBN), len); in cpBN_fix() 125 ZEXPAND_BNU(BN_NUMBER(pBN),0, (int)BN_ROOM(pBN)); in cpBN_chunk() 126 BN_NUMBER(pBN)[0] = a; in cpBN_chunk() 136 ZEXPAND_BNU(BN_NUMBER(pBN),0, BN_ROOM(pBN)); in cpBN_power2() 137 SET_BIT(BN_NUMBER(pBN), power); in cpBN_power2() 146 int bitsize = BITSIZE_BNU(BN_NUMBER(pA), BN_SIZE(pA)); in cpBN_bitsize() 157 int result = cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), BN_NUMBER(pB), BN_SIZE(pB)); in cpBN_cmp() [all …]
|
D | pcpbnarithgcd.c | 96 int aIsZero = BN_SIZE(pA)==1 && BN_NUMBER(pA)[0]==0; 97 int bIsZero = BN_SIZE(pB)==1 && BN_NUMBER(pB)[0]==0; 102 COPY_BNU(BN_NUMBER(g), BN_NUMBER(pB), BN_SIZE(pB)); 108 COPY_BNU(BN_NUMBER(g), BN_NUMBER(pA), BN_SIZE(pA)); 119 int cmpRes = cpCmp_BNU(BN_NUMBER(x), BN_SIZE(x), BN_NUMBER(y), BN_SIZE(y)); 123 COPY_BNU(BN_NUMBER(g), BN_NUMBER(x), BN_SIZE(x)); 129 BNU_CHUNK_T gcd = cpGcd_BNU(BN_NUMBER(x)[0], BN_NUMBER(y)[0]); 130 BN_NUMBER(g)[0] = gcd; 140 Ipp32u* xData = (Ipp32u*)BN_NUMBER(x); 141 Ipp32u* yData = (Ipp32u*)BN_NUMBER(y); [all …]
|
D | pcpbnarithminv.c | 93 IPP_BADARG_RET(BN_NEGATIVE(pA) || (BN_SIZE(pA)==1 && BN_NUMBER(pA)[0]==0), ippStsBadArgErr); 94 IPP_BADARG_RET(BN_NEGATIVE(pM) || (BN_SIZE(pM)==1 && BN_NUMBER(pM)[0]==0), ippStsBadModulusErr); 95 …IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), BN_NUMBER(pM), BN_SIZE(pM)) >= 0, ippStsScale… 98 cpSize nsR = cpModInv_BNU(BN_NUMBER(pInv), 99 BN_NUMBER(pA), BN_SIZE(pA), 100 BN_NUMBER(pM), BN_SIZE(pM),
|
D | pcpmontgomery.h | 195 cpSize nsM = cpMontMul_BNU_EX(BN_NUMBER(pRbn), in cpMontMul_BN() 196 BN_NUMBER(pXbn), BN_SIZE(pXbn), in cpMontMul_BN() 197 BN_NUMBER(pYbn), BN_SIZE(pYbn), in cpMontMul_BN() 200 FIX_BNU(BN_NUMBER(pRbn), nsM); in cpMontMul_BN() 209 cpSize nsM = cpMontEnc_BNU_EX(BN_NUMBER(pRbn), in cpMontEnc_BN() 210 BN_NUMBER(pXbn), BN_SIZE(pXbn), in cpMontEnc_BN() 222 cpMontDec_BNU(BN_NUMBER(pRbn), BN_NUMBER(pXbn), BN_SIZE(pXbn), pModEngine); in cpMontDec_BN() 248 BNU_CHUNK_T* pX = BN_NUMBER(pXbn); in cpMontExpBin_BN_sscm() 250 BNU_CHUNK_T* pE = BN_NUMBER(pEbn); in cpMontExpBin_BN_sscm() 252 BNU_CHUNK_T* pY = BN_NUMBER(pYbn); in cpMontExpBin_BN_sscm() [all …]
|
D | pcpgfpecverifydsa.c | 145 …IPP_BADARG_RET((0<=cpCmp_BNU(BN_NUMBER(pMsgDigest), BN_SIZE(pMsgDigest), pOrder, orderLen)), ippSt… 148 if(!cpEqu_BNU_CHUNK(BN_NUMBER(pSignR), BN_SIZE(pSignR), 0) && 149 !cpEqu_BNU_CHUNK(BN_NUMBER(pSignS), BN_SIZE(pSignS), 0) && 150 0>cpCmp_BNU(BN_NUMBER(pSignR), BN_SIZE(pSignR), pOrder, orderLen) && 151 0>cpCmp_BNU(BN_NUMBER(pSignS), BN_SIZE(pSignS), pOrder, orderLen)) { 166 ZEXPAND_COPY_BNU(h1, orderLen, BN_NUMBER(pMsgDigest), BN_SIZE(pMsgDigest)); 169 ZEXPAND_COPY_BNU(h, orderLen, BN_NUMBER(pSignS),BN_SIZE(pSignS)); 173 ZEXPAND_COPY_BNU(h2, orderLen, BN_NUMBER(pSignR),BN_SIZE(pSignR)); 189 cpGFpElementCopyPadd(h2, orderLen, BN_NUMBER(pSignR), BN_SIZE(pSignR));
|
D | pcpeccpverifydsaca.c | 127 …IPP_BADARG_RET(0<=cpCmp_BNU(BN_NUMBER(pMsgDigest), BN_SIZE(pMsgDigest), pOrder, orderLen), ippStsM… 130 if(!cpEqu_BNU_CHUNK(BN_NUMBER(pSignX), BN_SIZE(pSignX), 0) && 131 !cpEqu_BNU_CHUNK(BN_NUMBER(pSignY), BN_SIZE(pSignY), 0) && 132 0>cpCmp_BNU(BN_NUMBER(pSignX), BN_SIZE(pSignX), pOrder, orderLen) && 133 0>cpCmp_BNU(BN_NUMBER(pSignY), BN_SIZE(pSignY), pOrder, orderLen)) { 156 cpGFpElementCopyPadd(h1, orderLen, BN_NUMBER(&Y), BN_SIZE(&Y)); 166 h1,orderLen, BN_NUMBER(pSignX), BN_SIZE(pSignX), 170 h1,orderLen, BN_NUMBER(pMsgDigest), BN_SIZE(pMsgDigest), 186 cpGFpElementCopyPadd(h2, orderLen, BN_NUMBER(pSignX), BN_SIZE(pSignX));
|
D | pcpgfpecverifynr.c | 145 …IPP_BADARG_RET((0<=cpCmp_BNU(BN_NUMBER(pMsgDigest), BN_SIZE(pMsgDigest), pOrder, orderLen)), ippSt… 148 if(!cpEqu_BNU_CHUNK(BN_NUMBER(pSignR), BN_SIZE(pSignR), 0) && 149 !cpEqu_BNU_CHUNK(BN_NUMBER(pSignS), BN_SIZE(pSignS), 0) && 150 0>cpCmp_BNU(BN_NUMBER(pSignR), BN_SIZE(pSignR), pOrder, orderLen) && 151 0>cpCmp_BNU(BN_NUMBER(pSignS), BN_SIZE(pSignS), pOrder, orderLen)) { 164 ZEXPAND_COPY_BNU(h1, orderLen, BN_NUMBER(pSignS),BN_SIZE(pSignS)); 165 ZEXPAND_COPY_BNU(h2, orderLen, BN_NUMBER(pSignR),BN_SIZE(pSignR)); 178 ZEXPAND_COPY_BNU(f, orderLen, BN_NUMBER(pMsgDigest),BN_SIZE(pMsgDigest));
|
D | pcpbnarithmod.c | 93 IPP_BADARG_RET(BN_SIZE(pM)== 1 && BN_NUMBER(pM)[0]==0, ippStsBadModulusErr); 97 if(cpEqu_BNU_CHUNK(BN_NUMBER(pA), BN_SIZE(pA), 0)) { 100 BN_NUMBER(pR)[0] = 0; 104 BNU_CHUNK_T* pDataM = BN_NUMBER(pM); 108 BNU_CHUNK_T* pDataR = BN_NUMBER(pR); 111 COPY_BNU(pBuffA, BN_NUMBER(pA), nsA);
|
D | pcpeccpset.c | 142 BN_SIZE(pPrime), BN_NUMBER(pPrime), 143 BN_SIZE(pA), BN_NUMBER(pA), 144 BN_SIZE(pB), BN_NUMBER(pB), 145 BN_SIZE(pGX), BN_NUMBER(pGX), 146 BN_SIZE(pGY), BN_NUMBER(pGY), 147 BN_SIZE(pOrder), BN_NUMBER(pOrder),
|
D | pcpeccpverifysm2ca.c | 139 BNU_CHUNK_T* pMsgData = BN_NUMBER(pMsgDigest); 146 if(!cpEqu_BNU_CHUNK(BN_NUMBER(pSignR), BN_SIZE(pSignR), 0) && 147 !cpEqu_BNU_CHUNK(BN_NUMBER(pSignS), BN_SIZE(pSignS), 0) && 148 0>cpCmp_BNU(BN_NUMBER(pSignR), BN_SIZE(pSignR), pOrder, orderLen) && 149 0>cpCmp_BNU(BN_NUMBER(pSignS), BN_SIZE(pSignS), pOrder, orderLen)) { 160 cpGFpElementCopyPadd(r, orderLen, BN_NUMBER(pSignR), BN_SIZE(pSignR)); 161 cpGFpElementCopyPadd(s, orderLen, BN_NUMBER(pSignS), BN_SIZE(pSignS));
|
D | pcpgfpinit.c | 108 …IPP_BADARG_RET(BITSIZE_BNU(BN_NUMBER(pPrimeBN),BN_SIZE(pPrimeBN)) != primeBitSize, ippStsBadArgErr… 109 …IPP_BADARG_RET((BN_SIZE(pPrimeBN)==1) && (BN_NUMBER(pPrimeBN)[0]<IPP_MIN_GF_CHAR), ippStsBadArgErr… 110 …IPP_BADARG_RET(0==(BN_NUMBER(pPrimeBN)[0] & 1), ippStsBadArgErr); … 121 …IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pPrimeBN), primeLen, pGFpMethod->modulus, primeLen), ippStsBadA… 129 cpGFpSetGFp(BN_NUMBER(pPrimeBN), primeBitSize, pGFpMethod, pGFp);
|
D | pcpbn_unpack.c | 72 BN_NUMBER(pBN) = (BNU_CHUNK_T*)((Ipp8u*)pBN + IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer))); in cpUnpackBigNumCtx() 74 …CopyBlock((Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer)), BN_NUMBER(pBN), BN_ROOM(… in cpUnpackBigNumCtx()
|
D | pcpbn_pack.c | 70 …BN_NUMBER(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(BN_NUMBER(pBN))-IPP_UINT_PT… in cpPackBigNumCtx() 72 …CopyBlock(BN_NUMBER(pBN), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer)), BN_ROOM(… in cpPackBigNumCtx()
|
D | pcpbnarithdiv.c | 96 IPP_BADARG_RET(BN_SIZE(pB)== 1 && BN_NUMBER(pB)[0]==0, ippStsDivByZeroErr); 104 BNU_CHUNK_T* pDataB = BN_NUMBER(pB); 106 BNU_CHUNK_T* pDataQ = BN_NUMBER(pQ); 108 BNU_CHUNK_T* pDataR = BN_NUMBER(pR); 111 COPY_BNU(pDataA, BN_NUMBER(pA), nsA);
|
D | pcpmontmul.c | 98 …IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), MOD_MODULUS( MNT_ENGINE(pCtx) ), MOD_LEN( MNT… 99 …IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pB), BN_SIZE(pB), MOD_MODULUS( MNT_ENGINE(pCtx) ), MOD_LEN( MNT… 105 BNU_CHUNK_T* pDataR = BN_NUMBER(pR); 110 ZEXPAND_COPY_BNU(pDataA, nsM, BN_NUMBER(pA), BN_SIZE(pA)); 111 ZEXPAND_COPY_BNU(pDataB, nsM, BN_NUMBER(pB), BN_SIZE(pB));
|
D | pcpgfpinitarbitrary.c | 93 …IPP_BADARG_RET(BITSIZE_BNU(BN_NUMBER(pPrime),BN_SIZE(pPrime)) != primeBitSize, ippStsBadArgErr); … 94 …IPP_BADARG_RET((BN_SIZE(pPrime)==1) && (BN_NUMBER(pPrime)[0]<IPP_MIN_GF_CHAR), ippStsBadArgErr); … 95 …IPP_BADARG_RET(0==(BN_NUMBER(pPrime)[0] & 1), ippStsBadArgErr); … 103 cpGFpSetGFp(BN_NUMBER(pPrime), primeBitSize, ippsGFpMethod_pArb(), pGFp);
|
D | pcpmontform.c | 91 …IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), MOD_MODULUS( MNT_ENGINE(pCtx) ), MOD_LEN( MNT… 100 ZEXPAND_COPY_BNU(pDataA, nsM, BN_NUMBER(pA), BN_SIZE(pA)); 102 MOD_METHOD( MNT_ENGINE(pCtx) )->encode(BN_NUMBER(pR), pDataA, MNT_ENGINE(pCtx)); 104 FIX_BNU(BN_NUMBER(pR), nsM);
|
D | pcpgfpecsignnr.c | 154 BNU_CHUNK_T* dataC = BN_NUMBER(pSignR); 155 BNU_CHUNK_T* dataD = BN_NUMBER(pSignS); 159 BNU_CHUNK_T* pPriData = BN_NUMBER(pRegPrivate); 162 BNU_CHUNK_T* pEphData = BN_NUMBER(pEphPrivate); 165 BNU_CHUNK_T* pMsgData = BN_NUMBER(pMsgDigest); 185 BN_NUMBER(pEphPrivate), BN_SIZE(pEphPrivate),
|
D | pcpgfpecsigndsa.c | 155 BNU_CHUNK_T* dataC = BN_NUMBER(pSignR); 156 BNU_CHUNK_T* dataD = BN_NUMBER(pSignS); 160 BNU_CHUNK_T* pPriData = BN_NUMBER(pRegPrivate); 163 BNU_CHUNK_T* pEphData = BN_NUMBER(pEphPrivate); 166 BNU_CHUNK_T* pMsgData = BN_NUMBER(pMsgDigest); 186 BN_NUMBER(pEphPrivate), BN_SIZE(pEphPrivate),
|
D | pcpeccpverifynrca.c | 120 pMsgData = BN_NUMBER(pMsgDigest); 152 0>cpCmp_BNU(BN_NUMBER(pSignX),BN_SIZE(pSignX), pOrder,orderLen) && 153 0>cpCmp_BNU(BN_NUMBER(pSignY),BN_SIZE(pSignY), pOrder,orderLen)) { 162 cpGFpElementCopyPadd(pH1, orderLen, BN_NUMBER(pSignY), BN_SIZE(pSignY)); 163 cpGFpElementCopyPadd(pH2, orderLen, BN_NUMBER(pSignX), BN_SIZE(pSignX));
|
D | pcpeccpsignnrca.c | 139 BNU_CHUNK_T* pPriData = BN_NUMBER(pPrivate); 142 BNU_CHUNK_T* pMsgData = BN_NUMBER(pMsgDigest); 156 BNU_CHUNK_T* dataC = BN_NUMBER(pSignX); 157 BNU_CHUNK_T* dataD = BN_NUMBER(pSignY);
|
D | pcpeccpsigndsaca.c | 139 BNU_CHUNK_T* pPriData = BN_NUMBER(pPrivate); 142 BNU_CHUNK_T* pMsgData = BN_NUMBER(pMsgDigest); 156 BNU_CHUNK_T* dataC = BN_NUMBER(pSignX); 157 BNU_CHUNK_T* dataD = BN_NUMBER(pSignY);
|
D | pcpbnarithmul.c | 89 BNU_CHUNK_T* pDataA = BN_NUMBER(pA); 90 BNU_CHUNK_T* pDataB = BN_NUMBER(pB); 91 BNU_CHUNK_T* pDataR = BN_NUMBER(pR);
|
D | pcpbnarithsub.c | 95 BNU_CHUNK_T* pDataR = BN_NUMBER(pR); 99 BNU_CHUNK_T* pDataA = BN_NUMBER(pA); 100 BNU_CHUNK_T* pDataB = BN_NUMBER(pB);
|
D | pcpbnarithadd.c | 95 BNU_CHUNK_T* pDataR = BN_NUMBER(pR); 99 BNU_CHUNK_T* pDataA = BN_NUMBER(pA); 100 BNU_CHUNK_T* pDataB = BN_NUMBER(pB);
|