Home
last modified time | relevance | path

Searched refs:elemLen (Results 1 – 25 of 58) sorted by relevance

123

/external/epid-sdk/ext/ipp/sources/ippcp/
Dpcpgfpec_addaffine.c66 int elemLen = GFP_FELEN(pGFE); in gfec_affine_point_add() local
77 const BNU_CHUNK_T* py = pPdata+elemLen; /* y1 */ in gfec_affine_point_add()
78 const BNU_CHUNK_T* pz = pPdata+2*elemLen; /* z1 */ in gfec_affine_point_add()
82 const BNU_CHUNK_T* ay = pAdata+elemLen; /* y2 */ in gfec_affine_point_add()
84 BNU_CHUNK_T inftyP = GFPE_IS_ZERO_CT(px, elemLen) & GFPE_IS_ZERO_CT(py, elemLen); in gfec_affine_point_add()
85 BNU_CHUNK_T inftyA = GFPE_IS_ZERO_CT(ax, elemLen) & GFPE_IS_ZERO_CT(ay, elemLen); in gfec_affine_point_add()
89 BNU_CHUNK_T* S2 = U2 + elemLen; in gfec_affine_point_add()
90 BNU_CHUNK_T* H = S2 + elemLen; in gfec_affine_point_add()
91 BNU_CHUNK_T* R = H + elemLen; in gfec_affine_point_add()
93 BNU_CHUNK_T* pRx = R + elemLen; /* temporary result */ in gfec_affine_point_add()
[all …]
Dpcpgfpec_add.c80 int elemLen = GFP_FELEN(pGFE); in gfec_point_add() local
89 const BNU_CHUNK_T* py1 = pPdata+elemLen; in gfec_point_add()
90 const BNU_CHUNK_T* pz1 = pPdata+2*elemLen; in gfec_point_add()
94 const BNU_CHUNK_T* py2 = pQdata+elemLen; in gfec_point_add()
95 const BNU_CHUNK_T* pz2 = pQdata+2*elemLen; in gfec_point_add()
97 BNU_CHUNK_T inftyP = GFPE_IS_ZERO_CT(pz1, elemLen); in gfec_point_add()
98 BNU_CHUNK_T inftyQ = GFPE_IS_ZERO_CT(pz2, elemLen); in gfec_point_add()
102 BNU_CHUNK_T* U2 = U1 + elemLen; in gfec_point_add()
103 BNU_CHUNK_T* S1 = U2 + elemLen; in gfec_point_add()
104 BNU_CHUNK_T* S2 = S1 + elemLen; in gfec_point_add()
[all …]
Dpcpgfpec.c59 int elemLen = basicDeg*BITS_BNU_CHUNK(basicElmBitSize); in cpGFpECGetSize() local
70 +elemLen*sizeof(BNU_CHUNK_T) /* EC coeff A */ in cpGFpECGetSize()
71 +elemLen*sizeof(BNU_CHUNK_T) /* EC coeff B */ in cpGFpECGetSize()
72 +elemLen*sizeof(BNU_CHUNK_T) /* generator G.x */ in cpGFpECGetSize()
73 +elemLen*sizeof(BNU_CHUNK_T) /* generator G.y */ in cpGFpECGetSize()
74 +elemLen*sizeof(BNU_CHUNK_T) /* generator G.z */ in cpGFpECGetSize()
76 +elemLen*sizeof(BNU_CHUNK_T) /* cofactor */ in cpGFpECGetSize()
78 +2*elemLen*3*sizeof(BNU_CHUNK_T) /* regular and ephemeral public keys */ in cpGFpECGetSize()
81 +elemLen*sizeof(BNU_CHUNK_T)*3*EC_POOL_SIZE; in cpGFpECGetSize()
Dpcpgfp_sqrt.c97 int elemLen = GFP_FELEN(pGFE); in cpGFpSqrt() local
102 if( GFP_IS_ZERO(pA, elemLen) ) in cpGFpSqrt()
103 cpGFpElementPadd(pR, elemLen, 0); in cpGFpSqrt()
117 GFP_ONE(z, elemLen); in cpGFpSqrt()
120 cpSub_BNU(q, GFP_MODULUS(pGFE), z, elemLen); in cpGFpSqrt()
121 s = factor2(q, elemLen); in cpGFpSqrt()
128 cpGFpExp(y, GFP_QNR(pGFE), q,elemLen, pGFE); in cpGFpSqrt()
130 cpSub_BNU(q, q, z, elemLen); in cpGFpSqrt()
131 cpLSR_BNU(q, q, elemLen, 1); in cpGFpSqrt()
132 cpGFpExp(x, pA, q, elemLen, pGFE); in cpGFpSqrt()
[all …]
Dpcpgfp_gfeqnr.c63 int elemLen = GFP_FELEN(pGFE); in cpGFEqnr() local
65 BNU_CHUNK_T* t = e+elemLen; in cpGFEqnr()
66 BNU_CHUNK_T* p1 = t+elemLen; in cpGFEqnr()
69 cpGFpElementCopyPadd(p1, elemLen, GFP_MNT_R(pGFE), elemLen); in cpGFEqnr()
72 cpLSR_BNU(e, GFP_MODULUS(pGFE), elemLen, 1); in cpGFEqnr()
75 cpGFpElementCopy(pQnr, p1, elemLen); in cpGFEqnr()
78 cpGFpExp(t, pQnr, e, elemLen, pGFE); in cpGFEqnr()
80 } while( !GFP_EQ(p1, t, elemLen) ); in cpGFEqnr()
Dpcpgfpecinit.c97 int elemLen = GFP_FELEN(pGFE); variable
110 ECP_POINTLEN(pEC) = elemLen*3;
115 ECP_A(pEC) = (BNU_CHUNK_T*)(ptr); ptr += elemLen*sizeof(BNU_CHUNK_T);
116 ECP_B(pEC) = (BNU_CHUNK_T*)(ptr); ptr += elemLen*sizeof(BNU_CHUNK_T);
120 ECP_COFACTOR(pEC) = (BNU_CHUNK_T*)(ptr); ptr += elemLen*sizeof(BNU_CHUNK_T);
122 ECP_PUBLIC(pEC) = (BNU_CHUNK_T*)(ptr); ptr += 3*elemLen*sizeof(BNU_CHUNK_T);
123 ECP_PUBLIC_E(pEC) = (BNU_CHUNK_T*)(ptr); ptr += 3*elemLen*sizeof(BNU_CHUNK_T);
130 cpGFpElementPadd(ECP_A(pEC), elemLen, 0);
131 cpGFpElementPadd(ECP_B(pEC), elemLen, 0);
132 cpGFpElementPadd(ECP_G(pEC), elemLen*3, 0);
[all …]
Dpcpgfpec_comppont.c63 int elemLen = GFP_FELEN(pGFE); in gfec_ComparePoint() local
72 if( GFP_EQ(ECP_POINT_Z(pP), ECP_POINT_Z(pQ), elemLen) in gfec_ComparePoint()
73 &&GFP_EQ(ECP_POINT_X(pP), ECP_POINT_X(pQ), elemLen) in gfec_ComparePoint()
74 &&GFP_EQ(ECP_POINT_Y(pP), ECP_POINT_Y(pQ), elemLen)) in gfec_ComparePoint()
91 cpGFpElementCopy(pPtmp, ECP_POINT_X(pP), elemLen); in gfec_ComparePoint()
97 cpGFpElementCopy(pQtmp, ECP_POINT_X(pQ), elemLen); in gfec_ComparePoint()
102 isEqu = GFP_EQ(pPtmp, pQtmp, elemLen); in gfec_ComparePoint()
108 cpGFpElementCopy(pPtmp, ECP_POINT_Y(pP), elemLen); in gfec_ComparePoint()
114 cpGFpElementCopy(pQtmp, ECP_POINT_Y(pQ), elemLen); in gfec_ComparePoint()
119 isEqu = GFP_EQ(pPtmp, pQtmp, elemLen); in gfec_ComparePoint()
Dpcpgfpecset.c95 int elemLen = GFP_FELEN(pGFE); variable
101 cpGFpElementPadd(ECP_A(pEC), elemLen, 0);
102 cpGFpElementCopy(ECP_A(pEC), GFPE_DATA(pA), elemLen);
104 if(GFP_IS_ZERO(ECP_A(pEC), elemLen))
107 cpGFpElementSetChunk(ECP_B(pEC), elemLen, 3);
110 if(GFP_IS_ZERO(ECP_B(pEC), elemLen))
114 cpGFpElementPadd(ECP_B(pEC), elemLen, 0);
115 cpGFpElementCopy(ECP_B(pEC), GFPE_DATA(pB), elemLen);
119 ECP_INFINITY(pEC) = GFP_IS_ZERO(ECP_B(pEC), elemLen);
Dpcpgfpecsetpointreg.c107 int elemLen = GFP_FELEN(pGFE); variable
111 IPP_BADARG_RET( BN_SIZE(pX) > elemLen, ippStsOutOfRangeErr);
112 IPP_BADARG_RET( BN_SIZE(pY) > elemLen, ippStsOutOfRangeErr);
113 IPP_BADARG_RET( ECP_POINT_FELEN(pPoint)!=elemLen, ippStsOutOfRangeErr);
120 cpGFpElementCopyPadd(pointX, elemLen, BN_NUMBER(pX), BN_SIZE(pX));
121 cpGFpElementCopyPadd(pointY, elemLen, BN_NUMBER(pY), BN_SIZE(pY));
122 cpGFpElementCopy(pointZ, MOD_MNT_R(pGFE), elemLen);
124 if( cpGFpSet(pointX, pointX, elemLen, pGFE) && cpGFpSet(pointY, pointY, elemLen, pGFE) )
Dpcpgfpec_prod.c82 int elemLen = GFP_FELEN(pGFE); in gfec_point_prod() local
129 negF(pHy, pHdata+elemLen, pGFE); in gfec_point_prod()
130 cpMaskedReplace_ct(pHdata+elemLen, pHy, elemLen, ~cpIsZero_ct(sign)); in gfec_point_prod()
138 negF(pHy, pHdata+elemLen, pGFE); in gfec_point_prod()
139 cpMaskedReplace_ct(pHdata+elemLen, pHy, elemLen, ~cpIsZero_ct(sign)); in gfec_point_prod()
154 negF(pHy, pHdata+elemLen, pGFE); in gfec_point_prod()
155 cpMaskedReplace_ct(pHdata+elemLen, pHy, elemLen, ~cpIsZero_ct(sign)); in gfec_point_prod()
163 negF(pHy, pHdata+elemLen, pGFE); in gfec_point_prod()
164 cpMaskedReplace_ct(pHdata+elemLen, pHy, elemLen, ~cpIsZero_ct(sign)); in gfec_point_prod()
Dpcpgfpec_getpoint.c64 int elemLen = GFP_FELEN(pGFE); in gfec_GetPoint() local
67 if(pX) cpGFpElementPadd(pX, elemLen, 0); in gfec_GetPoint()
68 if(pY) cpGFpElementPadd(pY, elemLen, 0); in gfec_GetPoint()
75 cpGFpElementCopy(pX, ECP_POINT_X(pPoint), elemLen); in gfec_GetPoint()
77 cpGFpElementCopy(pY, ECP_POINT_Y(pPoint), elemLen); in gfec_GetPoint()
95 cpGFpElementCopy(pX, pU, elemLen); in gfec_GetPoint()
100 cpGFpElementCopy(pY, pU, elemLen); in gfec_GetPoint()
Dpcpgfpx_inv.c66 int elemLen = GFP_FELEN(pGFEx); in gfpxPolyDiv() local
82 cpGFpElementPadd(pR, elemLen, 0); in gfpxPolyDiv()
88 cpGFpElementPadd(pQ, elemLen, 0); in gfpxPolyDiv()
89 cpGFpElementCopyPadd(pR, elemLen, pA, (degA+1)*termLen); in gfpxPolyDiv()
102 cpGFpElementCopyPadd(pR, elemLen, pA, (degA+1)*termLen); in gfpxPolyDiv()
103 cpGFpElementPadd(pQ, elemLen, 0); in gfpxPolyDiv()
141 int elemLen = GFP_FELEN(pGFEx); in gfpxGeneratorDiv() local
157 cpGFpElementCopy(pR, GFP_MODULUS(pGFEx), elemLen); in gfpxGeneratorDiv()
158 cpGFpElementPadd(pQ, elemLen, 0); in gfpxGeneratorDiv()
196 int elemLen = GFP_FELEN(pGFEx); in cpGFpxInv() local
[all …]
Dpcpgfpecpoint.c84 int elemLen = GFP_FELEN(GFP_PMA(ECP_GFP(pEC))); variable
86 +elemLen*sizeof(BNU_CHUNK_T) /* X */
87 +elemLen*sizeof(BNU_CHUNK_T) /* Y */
88 +elemLen*sizeof(BNU_CHUNK_T);/* Z */
122 int elemLen = GFP_FELEN(GFP_PMA(ECP_GFP(pEC))); variable
126 ECP_POINT_FELEN(pPoint) = elemLen;
Dpcpgfpec_dblpoint.c76 int elemLen = GFP_FELEN(pGFE); in gfec_point_double() local
87 const BNU_CHUNK_T* pY = pPdata+elemLen; in gfec_point_double()
88 const BNU_CHUNK_T* pZ = pPdata+2*+elemLen; in gfec_point_double()
91 BNU_CHUNK_T* rY = pRdata+elemLen; in gfec_point_double()
92 BNU_CHUNK_T* rZ = pRdata+2*elemLen; in gfec_point_double()
96 BNU_CHUNK_T* M = U+elemLen; in gfec_point_double()
97 BNU_CHUNK_T* S = M+elemLen; in gfec_point_double()
Dpcpgfpxmethod_binom.c60 int elemLen= GFP_FELEN(pGFEx); in cpGFpxMul_pd_binom() local
65 BNU_CHUNK_T* X = R+elemLen; in cpGFpxMul_pd_binom()
66 BNU_CHUNK_T* T0= X+elemLen; in cpGFpxMul_pd_binom()
67 BNU_CHUNK_T* T1= T0+elemLen; in cpGFpxMul_pd_binom()
73 cpGFpElementCopy(T1, pA, elemLen); in cpGFpxMul_pd_binom()
83 cpGFpElementCopy(pR, R, elemLen); in cpGFpxMul_pd_binom()
Dpcpgfpec_mul.c76 int elemLen = GFP_FELEN(pGFE); in gfec_point_mul() local
112 negF(pHy, pHdata+elemLen, pGFE); in gfec_point_mul()
113 cpMaskedReplace_ct(pHdata+elemLen, pHy, elemLen, ~cpIsZero_ct(sign)); in gfec_point_mul()
129 negF(pHy, pHdata+elemLen, pGFE); in gfec_point_mul()
130 cpMaskedReplace_ct(pHdata+elemLen, pHy, elemLen, ~cpIsZero_ct(sign)); in gfec_point_mul()
Dpcpgfpxgetsize.c57 static int cpGFExGetSize(int elemLen, int pelmLen, int numpe) in cpGFExGetSize() argument
63 + elemLen*sizeof(BNU_CHUNK_T) /* modulus */ in cpGFExGetSize()
101 int elemLen = (int)LODWORD(elmLen64);
105 *pSize = cpGFExGetSize(elemLen, elemLen, GFPX_POOL_SIZE)
Dpcpgfpx.c65 int elemLen = extDeg * GFP_FELEN(pGFEp); in InitGFpxCtx() local
83 GFP_FELEN(pGFEx) = elemLen; in InitGFpxCtx()
85 GFP_PELEN(pGFEx) = elemLen; in InitGFpxCtx()
87 …GFP_MODULUS(pGFEx) = (BNU_CHUNK_T*)(ptr); ptr += elemLen * sizeof(BNU_CHUNK_T); /* field polyn… in InitGFpxCtx()
92 cpGFpElementPadd(GFP_MODULUS(pGFEx), elemLen, 0); in InitGFpxCtx()
Dpcpgfpecbindstd384r1.c69 Ipp32u elemLen = GFP_FELEN(pGFE); in cpGFpECBindGxyTbl() local
74 IPP_BADARG_RET(cpCmp_BNU(pPrime, elemLen, GFP_MODULUS(pGFE), elemLen), ippStsBadArgErr); in cpGFpECBindGxyTbl()
86 cmpFlag = cpCmp_BNU(pbp_ec, elemLen*2, pbp_tbl, elemLen*2); in cpGFpECBindGxyTbl()
Dpcpgfpecbindstd192r1.c69 Ipp32u elemLen = GFP_FELEN(pGFE); in cpGFpECBindGxyTbl() local
74 IPP_BADARG_RET(cpCmp_BNU(pPrime, elemLen, GFP_MODULUS(pGFE), elemLen), ippStsBadArgErr); in cpGFpECBindGxyTbl()
86 cmpFlag = cpCmp_BNU(pbp_ec, elemLen*2, pbp_tbl, elemLen*2); in cpGFpECBindGxyTbl()
Dpcpgfpecbindstd256r1.c69 Ipp32u elemLen = GFP_FELEN(pGFE); in cpGFpECBindGxyTbl() local
74 IPP_BADARG_RET(cpCmp_BNU(pPrime, elemLen, GFP_MODULUS(pGFE), elemLen), ippStsBadArgErr); in cpGFpECBindGxyTbl()
86 cmpFlag = cpCmp_BNU(pbp_ec, elemLen*2, pbp_tbl, elemLen*2); in cpGFpECBindGxyTbl()
Dpcpgfpecbindstd224r1.c69 Ipp32u elemLen = GFP_FELEN(pGFE); in cpGFpECBindGxyTbl() local
74 IPP_BADARG_RET(cpCmp_BNU(pPrime, elemLen, GFP_MODULUS(pGFE), elemLen), ippStsBadArgErr); in cpGFpECBindGxyTbl()
86 cmpFlag = cpCmp_BNU(pbp_ec, elemLen*2, pbp_tbl, elemLen*2); in cpGFpECBindGxyTbl()
Dpcpgfpecsetpointoctstring.c84 int elemLen = BITS2WORD8_SIZE(pGFE->modBitLen); variable
85 IPP_BADARG_RET(strLen != elemLen * 2, ippStsSizeErr);
93 ret = ippsGFpSetElementOctString(pStr, elemLen, &ptX, pEC->pGF);
95 pStr += elemLen;
96 ret = ippsGFpSetElementOctString(pStr, elemLen, &ptY, pEC->pGF);
Dpcpgfpecbindstd521r1.c69 Ipp32u elemLen = GFP_FELEN(pGFE); in cpGFpECBindGxyTbl() local
74 IPP_BADARG_RET(cpCmp_BNU(pPrime, elemLen, GFP_MODULUS(pGFE), elemLen), ippStsBadArgErr); in cpGFpECBindGxyTbl()
86 cmpFlag = cpCmp_BNU(pbp_ec, elemLen*2, pbp_tbl, elemLen*2); in cpGFpECBindGxyTbl()
Dpcpgfp.c65 int elemLen = BITS_BNU_CHUNK(feBitSize); in cpGFpGetSize() local
70 + elemLen*sizeof(BNU_CHUNK_T) /* modulus */ in cpGFpGetSize()
71 + elemLen*sizeof(BNU_CHUNK_T) /* mont_R */ in cpGFpGetSize()
72 + elemLen*sizeof(BNU_CHUNK_T) /* mont_R^2 */ in cpGFpGetSize()
73 + elemLen*sizeof(BNU_CHUNK_T) /* half of modulus */ in cpGFpGetSize()
74 + elemLen*sizeof(BNU_CHUNK_T) /* quadratic non-residue */ in cpGFpGetSize()

123