void fp_add_d(fp_int *a, fp_digit b, fp_int *c)
{
#ifndef WOLFSSL_SMALL_STACK
   fp_int tmp;
   fp_init(&tmp);
   fp_set(&tmp, b);
   fp_add(a, &tmp, c);
#else
   int i;
   fp_word t = b;

   fp_copy(a, c);
   for (i = 0; t != 0 && i < FP_SIZE && i < c->used; i++) {
     t += c->dp[i];
     c->dp[i] = (fp_digit)t;
     t >>= DIGIT_BIT;
   }
   if (i == c->used && i < FP_SIZE && t != 0) {
       c->dp[i] = t;
       c->used++;
   }
#endif
}
void fp_add_d(fp_int *a, fp_digit b, fp_int *c)
{
#ifndef WOLFSSL_SMALL_STACK
   fp_int tmp;
   fp_init(&tmp);
   fp_set(&tmp, b);
   fp_add(a, &tmp, c);
#else
   int i;
   fp_word t = b;

   fp_copy(a, c);
   for (i = 0; t != 0 && i < FP_SIZE && i < c->used; i++) {
     t += c->dp[i];
     c->dp[i] = (fp_digit)t;
     t >>= DIGIT_BIT;
   }
   if (i == c->used && i < FP_SIZE && t != 0) {
       c->dp[i] = t;
       c->used++;
   }
#endif
}