Lines Matching refs:result

43 static uint32_t add( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length){  in add()  argument
50 result[v] = d; in add()
57 static uint32_t sub( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length){ in sub() argument
62 result[v] = d & 0xFFFFFFFF; in sub()
137 static int fieldAdd(const uint32_t *x, const uint32_t *y, const uint32_t *reducer, uint32_t *result in fieldAdd() argument
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()
147 static int fieldSub(const uint32_t *x, const uint32_t *y, const uint32_t *modulus, uint32_t *result in fieldSub() argument
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()
159 static int fieldMult(const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length){ in fieldMult() argument
162 setZero(result, length * 2); in fieldMult()
170 add(&temp[n+k], &result[n+k], &result[n+k], (length * 2) - (n + k)); in fieldMult()
271 static void fieldModO(const uint32_t *A, uint32_t *result, uint8_t length) { in fieldModO() argument
279 if (A != result) in fieldModO()
280 copy(A, result, length); in fieldModO()
296 sub(A, q2_tmp, result, 9); in fieldModO()
298 while (isGreater(result, ecc_order_m, 9) >= 0) in fieldModO()
299 sub(result, ecc_order_m, result, 9); in fieldModO()
333 …ddAndDivide(const uint32_t *x, const uint32_t *modulus, const uint32_t *reducer, uint32_t* result){ in fieldAddAndDivide() argument
334 uint32_t n = add(x, modulus, result, arrayLength); in fieldAddAndDivide()
335 rshift(result); in fieldAddAndDivide()
337 result[7] |= 0x80000000;//add the carry in fieldAddAndDivide()
338 if (isGreater(result, modulus, arrayLength) == 1) in fieldAddAndDivide()
342 add(result, reducer, tempas, 8); in fieldAddAndDivide()
343 copy(tempas, result, arrayLength); in fieldAddAndDivide()
641 uint32_t ecc_add( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length) in ecc_add() argument
643 return add(x, y, result, length); in ecc_add()
645 uint32_t ecc_sub( const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length) in ecc_sub() argument
647 return sub(x, y, result, length); in ecc_sub()
649 int ecc_fieldAdd(const uint32_t *x, const uint32_t *y, const uint32_t *reducer, uint32_t *result) in ecc_fieldAdd() argument
651 return fieldAdd(x, y, reducer, result); in ecc_fieldAdd()
653 int ecc_fieldSub(const uint32_t *x, const uint32_t *y, const uint32_t *modulus, uint32_t *result) in ecc_fieldSub() argument
655 return fieldSub(x, y, modulus, result); in ecc_fieldSub()
657 int ecc_fieldMult(const uint32_t *x, const uint32_t *y, uint32_t *result, uint8_t length) in ecc_fieldMult() argument
659 return fieldMult(x, y, result, length); in ecc_fieldMult()
665 void ecc_fieldModO(const uint32_t *A, uint32_t *result, uint8_t length) in ecc_fieldModO() argument
667 fieldModO(A, result, length); in ecc_fieldModO()