/external/epid-sdk/ext/ipp/sources/ippcp/ |
D | pcpbn.h | 79 #define BN_SIZE(pBN) ((pBN)->size) macro 100 BN_SIZE(pDst) = BN_SIZE(pSrc); in cpBN_copy() 101 ZEXPAND_COPY_BNU(BN_NUMBER(pDst), BN_ROOM(pDst), BN_NUMBER(pSrc), BN_SIZE(pSrc)); in cpBN_copy() 108 BN_SIZE(pBN) = 1; in cpBN_zero() 115 cpSize len = BN_SIZE(pBN); in cpBN_fix() 117 BN_SIZE(pBN) = len; in cpBN_fix() 124 BN_SIZE(pBN) = 1; in cpBN_chunk() 135 BN_SIZE(pBN) = size; 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 | 89 IPP_BADARG_RET(BN_ROOM(pGCD) < IPP_MIN(BN_SIZE(pA), BN_SIZE(pB)), ippStsOutOfRangeErr); 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)); 103 BN_SIZE(g) = BN_SIZE(pB); 108 COPY_BNU(BN_NUMBER(g), BN_NUMBER(pA), BN_SIZE(pA)); 109 BN_SIZE(g) = 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)); 125 BN_SIZE(g) = BN_SIZE(x); [all …]
|
D | pcpbnarithminv.c | 92 IPP_BADARG_RET(BN_ROOM(pInv) < BN_SIZE(pM), ippStsOutOfRangeErr); 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… 99 BN_NUMBER(pA), BN_SIZE(pA), 100 BN_NUMBER(pM), BN_SIZE(pM), 104 BN_SIZE(pInv) = nsR;
|
D | pcpbnarithmod.c | 93 IPP_BADARG_RET(BN_SIZE(pM)== 1 && BN_NUMBER(pM)[0]==0, ippStsBadModulusErr); 95 IPP_BADARG_RET(BN_ROOM(pR)<BN_SIZE(pM), ippStsOutOfRangeErr); 97 if(cpEqu_BNU_CHUNK(BN_NUMBER(pA), BN_SIZE(pA), 0)) { 99 BN_SIZE(pR) = 1; 105 cpSize nsM = BN_SIZE(pM); 107 cpSize nsA = BN_SIZE(pA); 115 BN_SIZE(pR) = nsR; 122 BN_SIZE(pR) = nsM;
|
D | pcpbnarithdiv.c | 96 IPP_BADARG_RET(BN_SIZE(pB)== 1 && BN_NUMBER(pB)[0]==0, ippStsDivByZeroErr); 98 IPP_BADARG_RET(BN_ROOM(pR)<BN_SIZE(pB), ippStsOutOfRangeErr); 99 IPP_BADARG_RET((int)BN_ROOM(pQ)<(int)(BN_SIZE(pA)-BN_SIZE(pB)), ippStsOutOfRangeErr); 103 cpSize nsA = BN_SIZE(pA); 105 cpSize nsB = BN_SIZE(pB); 116 BN_SIZE(pQ) = nsQ; 120 BN_SIZE(pR) = nsR;
|
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 | pcpmontgomery.h | 196 BN_NUMBER(pXbn), BN_SIZE(pXbn), in cpMontMul_BN() 197 BN_NUMBER(pYbn), BN_SIZE(pYbn), in cpMontMul_BN() 201 BN_SIZE(pRbn) = nsM; in cpMontMul_BN() 210 BN_NUMBER(pXbn), BN_SIZE(pXbn), in cpMontEnc_BN() 213 BN_SIZE(pRbn) = nsM; in cpMontEnc_BN() 222 cpMontDec_BNU(BN_NUMBER(pRbn), BN_NUMBER(pXbn), BN_SIZE(pXbn), pModEngine); in cpMontDec_BN() 224 BN_SIZE(pRbn) = nsM; in cpMontDec_BN() 249 cpSize nsX = BN_SIZE(pXbn); in cpMontExpBin_BN_sscm() 251 cpSize nsE = BN_SIZE(pEbn); in cpMontExpBin_BN_sscm() 255 BN_SIZE(pYbn) = nsY; in cpMontExpBin_BN_sscm() [all …]
|
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 | 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 | 140 int msgLen = BN_SIZE(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 | 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… 110 ZEXPAND_COPY_BNU(pDataA, nsM, BN_NUMBER(pA), BN_SIZE(pA)); 111 ZEXPAND_COPY_BNU(pDataB, nsM, BN_NUMBER(pB), BN_SIZE(pB)); 118 BN_SIZE(pR) = nsM;
|
D | pcpbnarithmac.c | 92 cpSize nsA = BN_SIZE(pA); 93 cpSize nsB = BN_SIZE(pB); 108 cpSize nsR = BN_SIZE(pR); 129 BN_SIZE(pR) = room; 146 BN_SIZE(pR) = room;
|
D | pcpgfpecsignnr.c | 160 int priLen = BN_SIZE(pRegPrivate); 163 int ephLen = BN_SIZE(pEphPrivate); 166 int msgLen = BN_SIZE(pMsgDigest); 185 BN_NUMBER(pEphPrivate), BN_SIZE(pEphPrivate), 216 BN_SIZE(pSignR) = ns; 221 BN_SIZE(pSignS) = ns;
|
D | pcpgfpecsigndsa.c | 161 int priLen = BN_SIZE(pRegPrivate); 164 int ephLen = BN_SIZE(pEphPrivate); 167 int msgLen = BN_SIZE(pMsgDigest); 186 BN_NUMBER(pEphPrivate), BN_SIZE(pEphPrivate), 236 BN_SIZE(pSignR) = ns; 241 BN_SIZE(pSignS) = ns;
|
D | pcpgfpecsetpointreg.c | 111 IPP_BADARG_RET( BN_SIZE(pX) > elemLen, ippStsOutOfRangeErr); 112 IPP_BADARG_RET( BN_SIZE(pY) > elemLen, ippStsOutOfRangeErr); 120 cpGFpElementCopyPadd(pointX, elemLen, BN_NUMBER(pX), BN_SIZE(pX)); 121 cpGFpElementCopyPadd(pointY, elemLen, BN_NUMBER(pY), BN_SIZE(pY));
|
D | pcpeccpverifynrca.c | 121 msgLen = BN_SIZE(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 | pcpbnarithmul.c | 93 cpSize nsA = BN_SIZE(pA); 94 cpSize nsB = BN_SIZE(pB); 102 BN_SIZE(pR) = 1; 136 BN_SIZE(pR) = nsR;
|
D | pcpbnarithsub.c | 89 cpSize nsA = BN_SIZE(pA); 90 cpSize nsB = BN_SIZE(pB); 127 BN_SIZE(pR) = 1; 145 BN_SIZE(pR) = nsA;
|
D | pcpbnarithadd.c | 89 cpSize nsA = BN_SIZE(pA); 90 cpSize nsB = BN_SIZE(pB); 127 BN_SIZE(pR) = 1; 145 BN_SIZE(pR) = nsA;
|
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)); 105 BN_SIZE(pR) = nsM;
|
D | pcpeccpsignnrca.c | 140 int priLen = BN_SIZE(pPrivate); 143 int msgLen = BN_SIZE(pMsgDigest); 191 BN_SIZE(pSignX) = ns; 197 BN_SIZE(pSignY) = ns;
|
D | pcpeccpsigndsaca.c | 140 int priLen = BN_SIZE(pPrivate); 143 int msgLen = BN_SIZE(pMsgDigest); 207 BN_SIZE(pSignX) = ns; 212 BN_SIZE(pSignY) = ns;
|
D | pcpgfpmulexp.c | 134 … cpGFpxExp(GFPE_DATA(pR), GFPE_DATA(ppElmA[0]), BN_NUMBER(ppE[0]), BN_SIZE(ppE[0]), pGFE, 0); 136 cpGFpxExp(pTmpR, GFPE_DATA(ppElmA[n]), BN_NUMBER(ppE[n]), BN_SIZE(ppE[n]), pGFE, 0); 150 nsEdataLen[n] = BN_SIZE(ppE[n]);
|
D | pcpgfpecdhc.c | 134 cpGFpElementCopyPadd(F, nsR, BN_NUMBER(pPrivateA), BN_SIZE(pPrivateA)); 136 cpMontEnc_BNU_EX(F, BN_NUMBER(pPrivateA), BN_SIZE(pPrivateA), montR); 155 BN_SIZE(pShare) = nsShare;
|