mp_sub_d
mp_sub_d(&k, out[i], &k);
mp_sub_d(&x, 1, &x);
mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b);