/external/epid-sdk/ext/ipp/sources/ippcp/ |
D | pcpgfp_sqrt.c | 81 static BNU_CHUNK_T* cpGFpExp2(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, int e, gsModEngine* pGFE) in cpGFpExp2() argument 83 cpGFpElementCopy(pR, pA, GFP_FELEN(pGFE)); in cpGFpExp2() 85 GFP_METHOD(pGFE)->sqr(pR, pR, pGFE); in cpGFpExp2() 95 int cpGFpSqrt(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, gsModEngine* pGFE) in cpGFpSqrt() argument 97 int elemLen = GFP_FELEN(pGFE); in cpGFpSqrt() 98 int poolelementLen = GFP_PELEN(pGFE); in cpGFpSqrt() 107 BNU_CHUNK_T* q = cpGFpGetPool(4, pGFE); in cpGFpSqrt() 120 cpSub_BNU(q, GFP_MODULUS(pGFE), z, elemLen); in cpGFpSqrt() 128 cpGFpExp(y, GFP_QNR(pGFE), q,elemLen, pGFE); in cpGFpSqrt() 132 cpGFpExp(x, pA, q, elemLen, pGFE); in cpGFpSqrt() [all …]
|
D | pcpgfpec_dblpoint.c | 75 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_point_double() local 76 int elemLen = GFP_FELEN(pGFE); in gfec_point_double() 78 mod_add add = GFP_METHOD(pGFE)->add; /* gf add */ in gfec_point_double() 79 mod_sub sub = GFP_METHOD(pGFE)->sub; /* gf sub */ in gfec_point_double() 80 mod_div2 div2= GFP_METHOD(pGFE)->div2; /* gf div2 */ in gfec_point_double() 81 mod_mul2 mul2= GFP_METHOD(pGFE)->mul2; /* gf mul2 */ in gfec_point_double() 82 mod_mul3 mul3= GFP_METHOD(pGFE)->mul3; /* gf mul3 */ in gfec_point_double() 83 mod_mul mul = GFP_METHOD(pGFE)->mul; /* gf mul */ in gfec_point_double() 84 mod_sqr sqr = GFP_METHOD(pGFE)->sqr; /* gf sqr */ in gfec_point_double() 99 mul2(S, pY, pGFE); /* S = 2*Y */ in gfec_point_double() [all …]
|
D | pcpgfpecpointstuff.c | 71 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_IsPointOnCurve() local 73 mod_mul mulF = GFP_METHOD(pGFE)->mul; in gfec_IsPointOnCurve() 74 mod_sqr sqrF = GFP_METHOD(pGFE)->sqr; in gfec_IsPointOnCurve() 75 mod_sub subF = GFP_METHOD(pGFE)->sub; in gfec_IsPointOnCurve() 81 BNU_CHUNK_T* pR = cpGFpGetPool(1, pGFE); in gfec_IsPointOnCurve() 82 BNU_CHUNK_T* pT = cpGFpGetPool(1, pGFE); in gfec_IsPointOnCurve() 84 sqrF(pR, pY, pGFE); /* R = Y^2 */ in gfec_IsPointOnCurve() 85 sqrF(pT, pX, pGFE); /* T = X^3 */ in gfec_IsPointOnCurve() 86 mulF(pT, pX, pT, pGFE); in gfec_IsPointOnCurve() 87 subF(pR, pR, pT, pGFE); /* R -= T */ in gfec_IsPointOnCurve() [all …]
|
D | pcpgfpec_add.c | 79 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_point_add() local 80 int elemLen = GFP_FELEN(pGFE); in gfec_point_add() 82 mod_sub sub = GFP_METHOD(pGFE)->sub; /* gf sub */ in gfec_point_add() 83 mod_mul2 mul2= GFP_METHOD(pGFE)->mul2; /* gf mul2 */ in gfec_point_add() 84 mod_mul mul = GFP_METHOD(pGFE)->mul; /* gf mul */ in gfec_point_add() 85 mod_sqr sqr = GFP_METHOD(pGFE)->sqr; /* gf sqr */ in gfec_point_add() 112 mul(S1, py1, pz2, pGFE); // S1 = Y1*Z2 in gfec_point_add() 113 sqr(U1, pz2, pGFE); // U1 = Z2^2 in gfec_point_add() 115 mul(S2, py2, pz1, pGFE); // S2 = Y2*Z1 in gfec_point_add() 116 sqr(U2, pz1, pGFE); // U2 = Z1^2 in gfec_point_add() [all …]
|
D | pcpgfpec_addaffine.c | 65 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_affine_point_add() local 66 int elemLen = GFP_FELEN(pGFE); in gfec_affine_point_add() 68 mod_sub sub = GFP_METHOD(pGFE)->sub; /* gf sub */ in gfec_affine_point_add() 69 mod_mul2 mul2= GFP_METHOD(pGFE)->mul2; /* gf mul2 */ in gfec_affine_point_add() 70 mod_mul mul = GFP_METHOD(pGFE)->mul; /* gf mul */ in gfec_affine_point_add() 71 mod_sqr sqr = GFP_METHOD(pGFE)->sqr; /* gf sqr */ in gfec_affine_point_add() 73 BNU_CHUNK_T* mont1 = GFP_MNT_R(pGFE); in gfec_affine_point_add() 97 sqr(R, pz, pGFE); // R = Z1^2 in gfec_affine_point_add() 98 mul(S2, ay, pz, pGFE); // S2 = Y2*Z1 in gfec_affine_point_add() 99 mul(U2, ax, R, pGFE); // U2 = X2*Z1^2 in gfec_affine_point_add() [all …]
|
D | pcpgfpmethod_256.h | 77 …NU_CHUNK_T* p256_add(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsEngine* pGFE) in p256_add() argument 79 return gf256_add(pR, pA, pB, GFP_MODULUS(pGFE)); in p256_add() 82 …NU_CHUNK_T* p256_sub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsEngine* pGFE) in p256_sub() argument 84 return gf256_sub(pR, pA, pB, GFP_MODULUS(pGFE)); in p256_sub() 87 static BNU_CHUNK_T* p256_neg(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, gsEngine* pGFE) in p256_neg() argument 89 return gf256_neg(pR, pA, GFP_MODULUS(pGFE)); in p256_neg() 92 static BNU_CHUNK_T* p256_div_by_2(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, gsEngine* pGFE) in p256_div_by_2() argument 94 return gf256_div2(pR, pA, GFP_MODULUS(pGFE)); in p256_div_by_2() 97 static BNU_CHUNK_T* p256_mul_by_2(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, gsEngine* pGFE) in p256_mul_by_2() argument 99 return gf256_add(pR, pA, pA, GFP_MODULUS(pGFE)); in p256_mul_by_2() [all …]
|
D | pcpgfp_setgfp.c | 58 static void cpGFESet(gsModEngine* pGFE, const BNU_CHUNK_T* pPrime, int primeBitSize, const gsModMet… in cpGFESet() argument 63 GFP_METHOD(pGFE) = method; in cpGFESet() 66 COPY_BNU(GFP_MODULUS(pGFE), pPrime, primeLen); in cpGFESet() 69 GFP_MNT_FACTOR(pGFE) = gsMontFactor(GFP_MODULUS(pGFE)[0]); in cpGFESet() 72 ZEXPAND_BNU(GFP_MNT_R(pGFE), 0, primeLen); in cpGFESet() 73 GFP_MNT_R(pGFE)[primeLen] = 1; in cpGFESet() local 74 cpMod_BNU(GFP_MNT_R(pGFE), primeLen+1, GFP_MODULUS(pGFE), primeLen); in cpGFESet() 77 ZEXPAND_BNU(GFP_MNT_RR(pGFE), 0, primeLen); in cpGFESet() 78 COPY_BNU(GFP_MNT_RR(pGFE)+primeLen, GFP_MNT_R(pGFE), primeLen); in cpGFESet() 79 cpMod_BNU(GFP_MNT_RR(pGFE), 2*primeLen, GFP_MODULUS(pGFE), primeLen); in cpGFESet() [all …]
|
D | pcpgfp.c | 84 static void cpGFEInit(gsModEngine* pGFE, int modulusBitSize, int peBitSize, int numpe) in cpGFEInit() argument 89 Ipp8u* ptr = (Ipp8u*)pGFE; in cpGFEInit() 95 GFP_PARENT(pGFE) = NULL; in cpGFEInit() 96 GFP_EXTDEGREE(pGFE) = 1; in cpGFEInit() 97 GFP_FEBITLEN(pGFE) = modulusBitSize; in cpGFEInit() 98 GFP_FELEN(pGFE) = modLen; in cpGFEInit() 99 GFP_FELEN32(pGFE) = BITS2WORD32_SIZE(modulusBitSize); in cpGFEInit() 100 GFP_PELEN(pGFE) = pelmLen; in cpGFEInit() 102 GFP_MODULUS(pGFE) = (BNU_CHUNK_T*)(ptr); ptr += modLen*sizeof(BNU_CHUNK_T); in cpGFEInit() 103 GFP_MNT_R(pGFE) = (BNU_CHUNK_T*)(ptr); ptr += modLen*sizeof(BNU_CHUNK_T); in cpGFEInit() [all …]
|
D | pcpgfpmethod_192r1.c | 61 …_CHUNK_T* p192r1_add(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 64 …_CHUNK_T* p192r1_sub(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 67 BNU_CHUNK_T* p192r1_neg(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 70 BNU_CHUNK_T* p192r1_div_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 73 BNU_CHUNK_T* p192r1_mul_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 76 BNU_CHUNK_T* p192r1_mul_by_3 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 80 …_T* p192r1_mul_montl(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 83 …_T* p192r1_mul_montx(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 86 BNU_CHUNK_T* p192r1_sqr_montl(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 89 BNU_CHUNK_T* p192r1_sqr_montx(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); [all …]
|
D | pcpgfpmethod_224r1.c | 68 …CHUNK_T* p224r1_add (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 69 …CHUNK_T* p224r1_sub (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 70 BNU_CHUNK_T* p224r1_neg (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 71 BNU_CHUNK_T* p224r1_div_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 72 BNU_CHUNK_T* p224r1_mul_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 73 BNU_CHUNK_T* p224r1_mul_by_3 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 84 …_T* p224r1_mul_montl(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 85 …_T* p224r1_mul_montx(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 86 BNU_CHUNK_T* p224r1_sqr_montl(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 87 BNU_CHUNK_T* p224r1_sqr_montx(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); [all …]
|
D | pcpgfpmethod_256r1.c | 67 …_CHUNK_T* p256r1_add(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 68 …_CHUNK_T* p256r1_sub(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 69 BNU_CHUNK_T* p256r1_neg(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 70 BNU_CHUNK_T* p256r1_div_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 71 BNU_CHUNK_T* p256r1_mul_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 72 BNU_CHUNK_T* p256r1_mul_by_3 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 83 …_T* p256r1_mul_montl(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 84 …_T* p256r1_mul_montx(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 85 BNU_CHUNK_T* p256r1_sqr_montl(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 86 BNU_CHUNK_T* p256r1_sqr_montx(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); [all …]
|
D | pcpeccpget.c | 104 gsModEngine* pGFE; variable 113 pGFE = GFP_PMA(pGF); 119 IPP_BADARG_RET(BN_ROOM(pPrime)<GFP_FELEN(pGFE), ippStsRangeErr); 127 IPP_BADARG_RET(BN_ROOM(pA)<GFP_FELEN(pGFE), ippStsRangeErr); 128 IPP_BADARG_RET(BN_ROOM(pB)<GFP_FELEN(pGFE), ippStsRangeErr); 138 IPP_BADARG_RET(BN_ROOM(pGX)<GFP_FELEN(pGFE), ippStsRangeErr); 139 IPP_BADARG_RET(BN_ROOM(pGY)<GFP_FELEN(pGFE), ippStsRangeErr); 146 mod_decode decode = GFP_METHOD(pGFE)->decode; /* gf decode method */ 147 BNU_CHUNK_T* tmp = cpGFpGetPool(1, pGFE); 150 ippsSet_BN(ippBigNumPOS, GFP_FELEN32(pGFE), (Ipp32u*)GFP_MODULUS(pGFE), pPrime); [all …]
|
D | pcpgfpecverify.c | 85 gsModEngine* pGFE = GFP_PMA(pGF); variable 86 int elemLen = GFP_FELEN(pGFE); 88 mod_mul mulF = GFP_METHOD(pGFE)->mul; 89 mod_sqr sqrF = GFP_METHOD(pGFE)->sqr; 90 mod_add addF = GFP_METHOD(pGFE)->add; 96 BNU_CHUNK_T* pT = cpGFpGetPool(1, pGFE); 97 BNU_CHUNK_T* pU = cpGFpGetPool(1, pGFE); 103 addF(pT, ECP_A(pEC), ECP_A(pEC), pGFE); /* T = 4*A^3 */ 104 sqrF(pT, pT, pGFE); 105 mulF(pT, ECP_A(pEC), pT, pGFE); [all …]
|
D | pcpgfpmethod_384r1.c | 68 …_CHUNK_T* p384r1_add(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 69 …_CHUNK_T* p384r1_sub(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 70 BNU_CHUNK_T* p384r1_neg(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 71 BNU_CHUNK_T* p384r1_div_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 72 BNU_CHUNK_T* p384r1_mul_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 73 BNU_CHUNK_T* p384r1_mul_by_3 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 91 … p384r1_mul_mont_slm(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 92 BNU_CHUNK_T* p384r1_sqr_mont_slm(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 102 …_T* p384r1_mul_montl(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsEngine* pGFE) in p384r1_mul_montl() argument 104 BNU_CHUNK_T* product = cpGFpGetPool(2, pGFE); in p384r1_mul_montl() [all …]
|
D | pcpgfpmethod_521r1.c | 68 …_CHUNK_T* p521r1_add(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 69 …_CHUNK_T* p521r1_sub(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 70 BNU_CHUNK_T* p521r1_neg(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 71 BNU_CHUNK_T* p521r1_div_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 72 BNU_CHUNK_T* p521r1_mul_by_2 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 73 BNU_CHUNK_T* p521r1_mul_by_3 (BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 92 … p521r1_mul_mont_slm(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, const BNU_CHUNK_T* b, gsEngine* pGFE); 93 BNU_CHUNK_T* p521r1_sqr_mont_slm(BNU_CHUNK_T* res, const BNU_CHUNK_T* a, gsEngine* pGFE); 103 …_T* p521r1_mul_montl(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsEngine* pGFE) in p521r1_mul_montl() argument 105 BNU_CHUNK_T* product = cpGFpGetPool(2, pGFE); in p521r1_mul_montl() [all …]
|
D | pcpgfpec_comppont.c | 62 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_ComparePoint() local 63 int elemLen = GFP_FELEN(pGFE); in gfec_ComparePoint() 78 mod_mul mulF = GFP_METHOD(pGFE)->mul; in gfec_ComparePoint() 79 mod_sqr sqrF = GFP_METHOD(pGFE)->sqr; in gfec_ComparePoint() 83 BNU_CHUNK_T* pPtmp = cpGFpGetPool(1, pGFE); in gfec_ComparePoint() 84 BNU_CHUNK_T* pQtmp = cpGFpGetPool(1, pGFE); in gfec_ComparePoint() 85 BNU_CHUNK_T* pPz = cpGFpGetPool(1, pGFE); in gfec_ComparePoint() 86 BNU_CHUNK_T* pQz = cpGFpGetPool(1, pGFE); in gfec_ComparePoint() 93 sqrF(pQz, ECP_POINT_Z(pQ), pGFE); in gfec_ComparePoint() 94 mulF(pPtmp, ECP_POINT_X(pP), pQz, pGFE); in gfec_ComparePoint() [all …]
|
D | pcpgfpstuff.h | 73 gsModEngine* pGFE; /* arithmethic engine */ member 84 #define GFP_PMA(pCtx) ((pCtx)->pGFE) 155 …CHUNK_T* cpGFpAdd(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsModEngine* pGFE) in cpGFpAdd() argument 157 return GFP_METHOD(pGFE)->add(pR, pA, pB, pGFE); in cpGFpAdd() 160 …CHUNK_T* cpGFpSub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsModEngine* pGFE) in cpGFpSub() argument 162 return GFP_METHOD(pGFE)->sub(pR, pA, pB, pGFE); in cpGFpSub() 165 __INLINE BNU_CHUNK_T* cpGFpNeg(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, gsModEngine* pGFE) in cpGFpNeg() argument 167 return GFP_METHOD(pGFE)->neg(pR, pA, pGFE); in cpGFpNeg() 170 …CHUNK_T* cpGFpMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, gsModEngine* pGFE) in cpGFpMul() argument 172 return GFP_METHOD(pGFE)->mul(pR, pA, pB, pGFE); in cpGFpMul() [all …]
|
D | pcpgfpec_getpoint.c | 63 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_GetPoint() local 64 int elemLen = GFP_FELEN(pGFE); in gfec_GetPoint() 83 mod_mul mulF = GFP_METHOD(pGFE)->mul; in gfec_GetPoint() 84 mod_sqr sqrF = GFP_METHOD(pGFE)->sqr; in gfec_GetPoint() 87 BNU_CHUNK_T* pT = cpGFpGetPool(1, pGFE); in gfec_GetPoint() 88 BNU_CHUNK_T* pZinv = cpGFpGetPool(1, pGFE); in gfec_GetPoint() 89 BNU_CHUNK_T* pU = cpGFpGetPool(1, pGFE); in gfec_GetPoint() 90 cpGFpxInv(pZinv, ECP_POINT_Z(pPoint), pGFE); in gfec_GetPoint() 91 sqrF(pT, pZinv, pGFE); in gfec_GetPoint() 94 mulF(pU, ECP_POINT_X(pPoint), pT, pGFE); in gfec_GetPoint() [all …]
|
D | pcpgfpec_makepoint.c | 60 gsModEngine* pGFE = GFP_PMA(pGF); in gfec_MakePoint() local 61 int elemLen = GFP_FELEN(pGFE); in gfec_MakePoint() 63 mod_mul mulF = GFP_METHOD(pGFE)->mul; in gfec_MakePoint() 64 mod_sqr sqrF = GFP_METHOD(pGFE)->sqr; in gfec_MakePoint() 65 mod_add addF = GFP_METHOD(pGFE)->add; in gfec_MakePoint() 75 sqrF(pY, pX, pGFE); in gfec_MakePoint() 76 mulF(pY, pY, pX, pGFE); in gfec_MakePoint() 78 mulF(pZ, ECP_A(pEC), pX, pGFE); in gfec_MakePoint() 79 addF(pY, pY, pZ, pGFE); in gfec_MakePoint() 81 addF(pY, pY, ECP_B(pEC), pGFE); in gfec_MakePoint() [all …]
|
D | pcpgfpecgetpointreg.c | 91 gsModEngine* pGFE; variable 99 pGFE = GFP_PMA(pGF); 104 IPP_BADARG_RET(BN_ROOM(pX)*BNU_CHUNK_BITS<GFP_FEBITLEN(pGFE), ippStsOutOfRangeErr); 109 IPP_BADARG_RET(BN_ROOM(pY)*BNU_CHUNK_BITS<GFP_FEBITLEN(pGFE), ippStsOutOfRangeErr); 113 int elmLen = GFP_FELEN(pGFE); 114 BNU_CHUNK_T* x = cpGFpGetPool(2, pGFE); 122 GFP_METHOD(pGFE)->decode(x, x, pGFE); 123 ippsSet_BN(ippBigNumPOS, GFP_FELEN32(pGFE), (Ipp32u*)x, pX); 126 GFP_METHOD(pGFE)->decode(y, y, pGFE); 127 ippsSet_BN(ippBigNumPOS, GFP_FELEN32(pGFE), (Ipp32u*)y, pY); [all …]
|
D | pcpgfpecsetpointrand.c | 93 gsModEngine* pGFE; variable 101 pGFE = GFP_PMA(pGF); 103 IPP_BADARG_RET( ECP_POINT_FELEN(pPoint)!=GFP_FELEN(pGFE), ippStsOutOfRangeErr); 110 if( GFP_IS_BASIC(pGFE) ) { 111 BNU_CHUNK_T* pElm = cpGFpGetPool(1, pGFE); 114 internal_err = NULL==cpGFpRand(pElm, pGFE, rndFunc, pRndParam); 117 cpGFpReleasePool(1, pGFE); 122 int cofactorLen = GFP_FELEN(pGFE); 124 … gfec_MulPoint(pPoint, pPoint, ECP_COFACTOR(pEC), GFP_FELEN(pGFE), /*0,*/ pEC, pScratchBuffer); 136 int poolElements = (generatedLen + GFP_PELEN(pGFE) -1) / GFP_PELEN(pGFE); [all …]
|
D | pcpgfp_gfeqnr.c | 59 void cpGFEqnr(gsModEngine* pGFE) in cpGFEqnr() argument 61 BNU_CHUNK_T* pQnr = GFP_QNR(pGFE); in cpGFEqnr() 63 int elemLen = GFP_FELEN(pGFE); in cpGFEqnr() 64 BNU_CHUNK_T* e = cpGFpGetPool(3, pGFE); in cpGFEqnr() 69 cpGFpElementCopyPadd(p1, elemLen, GFP_MNT_R(pGFE), elemLen); in cpGFEqnr() 72 cpLSR_BNU(e, GFP_MODULUS(pGFE), elemLen, 1); in cpGFEqnr() 77 cpGFpAdd(pQnr, pQnr, p1, pGFE); in cpGFEqnr() 78 cpGFpExp(t, pQnr, e, elemLen, pGFE); in cpGFEqnr() 79 cpGFpNeg(t, t, pGFE); in cpGFEqnr() 82 cpGFpReleasePool(3, pGFE); in cpGFEqnr()
|
D | pcpgfpecsetpointhash_rmf.c | 103 gsModEngine* pGFE; variable 118 pGFE = GFP_PMA(pGF); 120 IPP_BADARG_RET( !GFP_IS_BASIC(pGFE), ippStsBadArgErr ); 123 IPP_BADARG_RET( ECP_POINT_FELEN(pPoint)!=GFP_FELEN(pGFE), ippStsOutOfRangeErr); 126 int elemLen = GFP_FELEN(pGFE); 127 BNU_CHUNK_T* pModulus = GFP_MODULUS(pGFE); 138 BNU_CHUNK_T* pPoolElm = cpGFpGetPool(1, pGFE); 153 cpGFpSet(pPoolElm, hashVal, hashValLen, pGFE); 159 cpGFpNeg(pY, pY, pGFE); 163 … gfec_MulPoint(pPoint, pPoint, ECP_COFACTOR(pEC), GFP_FELEN(pGFE), /*0,*/ pEC, pScratchBuffer); [all …]
|
D | pcpgfpecsetpointhash.c | 102 gsModEngine* pGFE; variable 118 pGFE = GFP_PMA(pGF); 120 IPP_BADARG_RET( !GFP_IS_BASIC(pGFE), ippStsBadArgErr ); 123 IPP_BADARG_RET( ECP_POINT_FELEN(pPoint)!=GFP_FELEN(pGFE), ippStsOutOfRangeErr); 126 int elemLen = GFP_FELEN(pGFE); 127 BNU_CHUNK_T* pModulus = GFP_MODULUS(pGFE); 138 BNU_CHUNK_T* pPoolElm = cpGFpGetPool(1, pGFE); 153 cpGFpSet(pPoolElm, hashVal, hashValLen, pGFE); 159 cpGFpNeg(pY, pY, pGFE); 164 int cofactorLen = GFP_FELEN(pGFE); [all …]
|
D | pcpgfpecgetpointoctstring.c | 81 IPP_BADARG_RET(1 < pEC->pGF->pGFE->extdegree, ippStsNotSupportedModeErr); 84 gsModEngine* pGFE = pEC->pGF->pGFE; variable 85 int elemLen = BITS2WORD8_SIZE(pGFE->modBitLen); 87 IPP_BADARG_RET(pPoint->elementSize != pGFE->modLen, ippStsOutOfRangeErr); 93 cpGFpElementConstruct(&ptX, cpGFpGetPool(1, pGFE), pGFE->modLen); 94 cpGFpElementConstruct(&ptY, cpGFpGetPool(1, pGFE), pGFE->modLen); 102 cpGFpReleasePool(2, pGFE); /* release ptX and ptY from the pool */
|