Lines Matching refs:err
40 int i, j, err;
51 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) {
52 return err;
54 if ((err = mp_init(&mu)) != CRYPT_OK) {
56 return err;
58 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) {
61 return err;
79 if (tG == NULL) { err = CRYPT_MEM; goto done; }
82 if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; }
83 if ((err = mp_mulmod(G->y, mu, modulus, tG->y)) != CRYPT_OK) { goto done; }
84 if ((err = mp_mulmod(G->z, mu, modulus, tG->z)) != CRYPT_OK) { goto done; }
90 if ((err = mp_copy(tG->x, M[0]->x)) != CRYPT_OK) { goto done; }
91 if ((err = mp_copy(tG->y, M[0]->y)) != CRYPT_OK) { goto done; }
92 if ((err = mp_copy(tG->z, M[0]->z)) != CRYPT_OK) { goto done; }
94 if ((err = ltc_mp.ecc_ptdbl(tG, M[1], modulus, mp)) != CRYPT_OK) { goto done; }
122 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; }
123 if ((err = ltc_mp.ecc_ptdbl(M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; }
130 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; }
131 if ((err = ltc_mp.ecc_ptdbl(M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; }
135 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[i^1], modulus, mp)) != CRYPT_OK) { goto done; }
136 if ((err = ltc_mp.ecc_ptdbl(M[i], M[i], modulus, mp)) != CRYPT_OK) { goto done; }
140 if ((err = mp_copy(M[0]->x, R->x)) != CRYPT_OK) { goto done; }
141 if ((err = mp_copy(M[0]->y, R->y)) != CRYPT_OK) { goto done; }
142 if ((err = mp_copy(M[0]->z, R->z)) != CRYPT_OK) { goto done; }
146 err = ltc_ecc_map(R, modulus, mp);
148 err = CRYPT_OK;
159 return err;