Lines Matching refs:err
37 int err;
44 if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) {
45 return err;
49 if ((err = mp_copy(P->x, R->x)) != CRYPT_OK) { goto done; }
50 if ((err = mp_copy(P->y, R->y)) != CRYPT_OK) { goto done; }
51 if ((err = mp_copy(P->z, R->z)) != CRYPT_OK) { goto done; }
55 if ((err = mp_sqr(R->z, t1)) != CRYPT_OK) { goto done; }
56 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
58 if ((err = mp_mul(R->z, R->y, R->z)) != CRYPT_OK) { goto done; }
59 if ((err = mp_montgomery_reduce(R->z, modulus, mp)) != CRYPT_OK) { goto done; }
61 if ((err = mp_add(R->z, R->z, R->z)) != CRYPT_OK) { goto done; }
63 if ((err = mp_sub(R->z, modulus, R->z)) != CRYPT_OK) { goto done; }
67 if ((err = mp_sub(R->x, t1, t2)) != CRYPT_OK) { goto done; }
69 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; }
72 if ((err = mp_add(t1, R->x, t1)) != CRYPT_OK) { goto done; }
74 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; }
77 if ((err = mp_mul(t1, t2, t2)) != CRYPT_OK) { goto done; }
78 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; }
80 if ((err = mp_add(t2, t2, t1)) != CRYPT_OK) { goto done; }
82 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; }
85 if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto done; }
87 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; }
91 if ((err = mp_add(R->y, R->y, R->y)) != CRYPT_OK) { goto done; }
93 if ((err = mp_sub(R->y, modulus, R->y)) != CRYPT_OK) { goto done; }
96 if ((err = mp_sqr(R->y, R->y)) != CRYPT_OK) { goto done; }
97 if ((err = mp_montgomery_reduce(R->y, modulus, mp)) != CRYPT_OK) { goto done; }
99 if ((err = mp_sqr(R->y, t2)) != CRYPT_OK) { goto done; }
100 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; }
103 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; }
105 if ((err = mp_div_2(t2, t2)) != CRYPT_OK) { goto done; }
107 if ((err = mp_mul(R->y, R->x, R->y)) != CRYPT_OK) { goto done; }
108 if ((err = mp_montgomery_reduce(R->y, modulus, mp)) != CRYPT_OK) { goto done; }
111 if ((err = mp_sqr(t1, R->x)) != CRYPT_OK) { goto done; }
112 if ((err = mp_montgomery_reduce(R->x, modulus, mp)) != CRYPT_OK) { goto done; }
114 if ((err = mp_sub(R->x, R->y, R->x)) != CRYPT_OK) { goto done; }
116 if ((err = mp_add(R->x, modulus, R->x)) != CRYPT_OK) { goto done; }
119 if ((err = mp_sub(R->x, R->y, R->x)) != CRYPT_OK) { goto done; }
121 if ((err = mp_add(R->x, modulus, R->x)) != CRYPT_OK) { goto done; }
125 if ((err = mp_sub(R->y, R->x, R->y)) != CRYPT_OK) { goto done; }
127 if ((err = mp_add(R->y, modulus, R->y)) != CRYPT_OK) { goto done; }
130 if ((err = mp_mul(R->y, t1, R->y)) != CRYPT_OK) { goto done; }
131 if ((err = mp_montgomery_reduce(R->y, modulus, mp)) != CRYPT_OK) { goto done; }
133 if ((err = mp_sub(R->y, t2, R->y)) != CRYPT_OK) { goto done; }
135 if ((err = mp_add(R->y, modulus, R->y)) != CRYPT_OK) { goto done; }
138 err = CRYPT_OK;
141 return err;