Lines Matching refs:CRYPT_OK
33 @return CRYPT_OK on success
46 if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != CRYPT_OK) {
51 if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; }
60 if ((err = mp_copy(P->x, x)) != CRYPT_OK) { goto done; }
61 if ((err = mp_copy(P->y, y)) != CRYPT_OK) { goto done; }
62 if ((err = mp_copy(P->z, z)) != CRYPT_OK) { goto done; }
67 if ((err = mp_sqr(Q->z, t1)) != CRYPT_OK) { goto done; }
68 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
70 if ((err = mp_mul(t1, x, x)) != CRYPT_OK) { goto done; }
71 if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; }
73 if ((err = mp_mul(Q->z, t1, t1)) != CRYPT_OK) { goto done; }
74 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
76 if ((err = mp_mul(t1, y, y)) != CRYPT_OK) { goto done; }
77 if ((err = mp_montgomery_reduce(y, modulus, mp)) != CRYPT_OK) { goto done; }
81 if ((err = mp_sqr(z, t1)) != CRYPT_OK) { goto done; }
82 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
84 if ((err = mp_mul(Q->x, t1, t2)) != CRYPT_OK) { goto done; }
85 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; }
87 if ((err = mp_mul(z, t1, t1)) != CRYPT_OK) { goto done; }
88 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
90 if ((err = mp_mul(Q->y, t1, t1)) != CRYPT_OK) { goto done; }
91 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
94 if ((err = mp_sub(y, t1, y)) != CRYPT_OK) { goto done; }
96 if ((err = mp_add(y, modulus, y)) != CRYPT_OK) { goto done; }
99 if ((err = mp_add(t1, t1, t1)) != CRYPT_OK) { goto done; }
101 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; }
104 if ((err = mp_add(t1, y, t1)) != CRYPT_OK) { goto done; }
106 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; }
109 if ((err = mp_sub(x, t2, x)) != CRYPT_OK) { goto done; }
111 if ((err = mp_add(x, modulus, x)) != CRYPT_OK) { goto done; }
114 if ((err = mp_add(t2, t2, t2)) != CRYPT_OK) { goto done; }
116 if ((err = mp_sub(t2, modulus, t2)) != CRYPT_OK) { goto done; }
119 if ((err = mp_add(t2, x, t2)) != CRYPT_OK) { goto done; }
121 if ((err = mp_sub(t2, modulus, t2)) != CRYPT_OK) { goto done; }
127 if ((err = mp_mul(z, Q->z, z)) != CRYPT_OK) { goto done; }
128 if ((err = mp_montgomery_reduce(z, modulus, mp)) != CRYPT_OK) { goto done; }
132 if ((err = mp_mul(z, x, z)) != CRYPT_OK) { goto done; }
133 if ((err = mp_montgomery_reduce(z, modulus, mp)) != CRYPT_OK) { goto done; }
136 if ((err = mp_mul(t1, x, t1)) != CRYPT_OK) { goto done; }
137 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
139 if ((err = mp_sqr(x, x)) != CRYPT_OK) { goto done; }
140 if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; }
142 if ((err = mp_mul(t2, x, t2)) != CRYPT_OK) { goto done; }
143 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; }
145 if ((err = mp_mul(t1, x, t1)) != CRYPT_OK) { goto done; }
146 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; }
149 if ((err = mp_sqr(y, x)) != CRYPT_OK) { goto done; }
150 if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; }
152 if ((err = mp_sub(x, t2, x)) != CRYPT_OK) { goto done; }
154 if ((err = mp_add(x, modulus, x)) != CRYPT_OK) { goto done; }
158 if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; }
160 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; }
163 if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; }
165 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; }
168 if ((err = mp_mul(t2, y, t2)) != CRYPT_OK) { goto done; }
169 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; }
171 if ((err = mp_sub(t2, t1, y)) != CRYPT_OK) { goto done; }
173 if ((err = mp_add(y, modulus, y)) != CRYPT_OK) { goto done; }
177 if ((err = mp_add(y, modulus, y)) != CRYPT_OK) { goto done; }
179 if ((err = mp_div_2(y, y)) != CRYPT_OK) { goto done; }
181 if ((err = mp_copy(x, R->x)) != CRYPT_OK) { goto done; }
182 if ((err = mp_copy(y, R->y)) != CRYPT_OK) { goto done; }
183 if ((err = mp_copy(z, R->z)) != CRYPT_OK) { goto done; }
185 err = CRYPT_OK;