Lines Matching refs:CRYPT_OK
44 @return CRYPT_OK if successful (even if the signature is not valid)
70 if ((err = mp_init_multi(&r, &s, &v, &w, &u1, &u2, &p, &e, &m, NULL)) != CRYPT_OK) {
86 LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) {
91 if ((err = mp_read_radix(p, (char *)key->dp->order, 16)) != CRYPT_OK) { goto error; }
94 if ((err = mp_read_radix(m, (char *)key->dp->prime, 16)) != CRYPT_OK) { goto error; }
103 if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, (int)hashlen)) != CRYPT_OK) { goto error; }
106 if ((err = mp_invmod(s, p, w)) != CRYPT_OK) { goto error; }
109 if ((err = mp_mulmod(e, w, p, u1)) != CRYPT_OK) { goto error; }
112 if ((err = mp_mulmod(r, w, p, u2)) != CRYPT_OK) { goto error; }
115 if ((err = mp_read_radix(mG->x, (char *)key->dp->Gx, 16)) != CRYPT_OK) { goto error; }
116 if ((err = mp_read_radix(mG->y, (char *)key->dp->Gy, 16)) != CRYPT_OK) { goto error; }
117 if ((err = mp_set(mG->z, 1)) != CRYPT_OK) { goto error; }
119 if ((err = mp_copy(key->pubkey.x, mQ->x)) != CRYPT_OK) { goto error; }
120 if ((err = mp_copy(key->pubkey.y, mQ->y)) != CRYPT_OK) { goto error; }
121 if ((err = mp_copy(key->pubkey.z, mQ->z)) != CRYPT_OK) { goto error; }
125 if ((err = ltc_mp.ecc_ptmul(u1, mG, mG, m, 0)) != CRYPT_OK) { goto error; }
126 if ((err = ltc_mp.ecc_ptmul(u2, mQ, mQ, m, 0)) != CRYPT_OK) { goto error; }
129 if ((err = mp_montgomery_setup(m, &mp)) != CRYPT_OK) { goto error; }
132 if ((err = ltc_mp.ecc_ptadd(mQ, mG, mG, m, mp)) != CRYPT_OK) { goto error; }
135 if ((err = ltc_mp.ecc_map(mG, m, mp)) != CRYPT_OK) { goto error; }
138 if ((err = ltc_mp.ecc_mul2add(mG, u1, mQ, u2, mG, m)) != CRYPT_OK) { goto error; }
142 if ((err = mp_mod(mG->x, p, v)) != CRYPT_OK) { goto error; }
150 err = CRYPT_OK;