Lines Matching refs:err
43 int err;
60 if ((err = prng_is_valid(wprng)) != CRYPT_OK) {
61 return err;
66 if ((err = mp_init_multi(&r, &s, &p, &e, NULL)) != CRYPT_OK) {
67 return err;
69 if ((err = mp_read_radix(p, (char *)key->dp->order, 16)) != CRYPT_OK) { goto errnokey; }
70 if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, (int)inlen)) != CRYPT_OK) { goto errnokey; }
74 if ((err = ecc_make_key_ex(prng, wprng, &pubkey, key->dp)) != CRYPT_OK) {
79 if ((err = mp_mod(pubkey.pubkey.x, p, r)) != CRYPT_OK) { goto error; }
85 if ((err = mp_invmod(pubkey.k, p, pubkey.k)) != CRYPT_OK) { goto error; } /* k = 1/k */
86 if ((err = mp_mulmod(key->k, r, p, s)) != CRYPT_OK) { goto error; } /* s = xr */
87 if ((err = mp_add(e, s, s)) != CRYPT_OK) { goto error; } /* s = e + xr */
88 if ((err = mp_mod(s, p, s)) != CRYPT_OK) { goto error; } /* s = e + xr */
89 if ((err = mp_mulmod(s, pubkey.k, p, s)) != CRYPT_OK) { goto error; } /* s = (e + xr)/k */
98 err = der_encode_sequence_multi(out, outlen,
107 return err;