Lines Matching refs:arrayLength

138 	if(add(x, y, result, arrayLength)){ //add prime if carry is still set!  in fieldAdd()
141 add(result, reducer, tempas, arrayLength); in fieldAdd()
142 copy(tempas, result, arrayLength); in fieldAdd()
148 if(sub(x, y, result, arrayLength)){ //add modulus if carry is set in fieldSub()
151 add(result, modulus, tempas, arrayLength); in fieldSub()
152 copy(tempas, result, arrayLength); in fieldSub()
188 copy(B,A,arrayLength); in fieldModP()
248 if(isGreater(A, ecc_prime_m, arrayLength) >= 0){ in fieldModP()
250 copy(tempm, A, arrayLength); in fieldModP()
278 if (length == arrayLength && isGreater(A, ecc_order_m, arrayLength) <= 0) { in fieldModO()
334 uint32_t n = add(x, modulus, result, arrayLength); in fieldAddAndDivide()
338 if (isGreater(result, modulus, arrayLength) == 1) in fieldAddAndDivide()
343 copy(tempas, result, arrayLength); in fieldAddAndDivide()
363 copy(A,u,arrayLength); in fieldInv()
364 copy(modulus,v,arrayLength); in fieldInv()
376 copy(tempm,x1,arrayLength); /* x1=tempm */ in fieldInv()
387 copy(tempm,x2,arrayLength); /* x1=tempm */ in fieldInv()
392 t=sub(u,v,tempm,arrayLength); /* tempm=u-v */ in fieldInv()
394 copy(tempm,u,arrayLength); /* u=u-v */ in fieldInv()
396 copy(tempm,x1,arrayLength); /* x1=x1-x2 */ in fieldInv()
398 sub(v,u,tempm,arrayLength); /* tempm=v-u */ in fieldInv()
399 copy(tempm,v,arrayLength); /* v=v-u */ in fieldInv()
401 copy(tempm,x2,arrayLength); /* x2=x2-x1 */ in fieldInv()
405 copy(x1,B,arrayLength); in fieldInv()
407 copy(x2,B,arrayLength); in fieldInv()
418 copy(px, Dx,arrayLength); in ec_double()
419 copy(py, Dy,arrayLength); in ec_double()
423 fieldMult(px, px, tempD, arrayLength); in ec_double()
429 fieldMult(tempC, tempB, tempD, arrayLength); in ec_double()
433 fieldMult(tempA, tempC, tempD, arrayLength); //tempB = lambda = (3*(qx^2-1))/(2*qy) in ec_double()
436 fieldMult(tempB, tempB, tempD, arrayLength); //tempC = lambda^2 in ec_double()
442 fieldMult(tempB, tempA, tempD, arrayLength); //tempC = lambda * (qx-dx) in ec_double()
454 copy(qx, Sx,arrayLength); in ec_add()
455 copy(qy, Sy,arrayLength); in ec_add()
458 copy(px, Sx,arrayLength); in ec_add()
459 copy(py, Sy,arrayLength); in ec_add()
463 if(isSame(px, qx, arrayLength)){ in ec_add()
464 if(!isSame(py, qy, arrayLength)){ in ec_add()
477 fieldMult(tempA, tempB, tempD, arrayLength); in ec_add()
480 fieldMult(tempC, tempC, tempD, arrayLength); //tempA = lambda^2 in ec_add()
486 fieldMult(tempC, tempB, tempD, arrayLength); in ec_add()
503 copy(tempx, Qx,arrayLength); in ecc_ec_mult()
504 copy(tempy, Qy,arrayLength); in ecc_ec_mult()
507 copy(tempx, Qx,arrayLength); in ecc_ec_mult()
508 copy(tempy, Qy,arrayLength); in ecc_ec_mult()
511 copy(Qx, resultx,arrayLength); in ecc_ec_mult()
512 copy(Qy, resulty,arrayLength); in ecc_ec_mult()
555 fieldMult(r, d, tmp1, arrayLength); in ecc_ecdsa_sign()
566 fieldMult(tmp2, tmp3, tmp1, arrayLength); in ecc_ecdsa_sign()
610 fieldMult(e, w, tmp, arrayLength); in ecc_ecdsa_validate()
614 fieldMult(r, w, tmp, arrayLength); in ecc_ecdsa_validate()
628 return isSame(tmp3_x, r, arrayLength) ? 0 : -1; in ecc_ecdsa_validate()
633 return isGreater(ecc_order_m, priv_key, arrayLength) == 1; in ecc_is_valid_key()