亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ecc.c

?? C語言
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* grow as required */
int mp_grow (mp_int * a, int size)
{
  int     i;
  mp_digit *tmp;

  /* if the alloc size is smaller alloc more ram */
  if (a->alloc < size) {
    /* ensure there are always at least MP_PREC digits extra on top */
    size += (MP_PREC * 2) - (size % MP_PREC);

    /* reallocate the array a->dp
     *
     * We store the return in a temporary variable
     * in case the operation failed we don't want
     * to overwrite the dp member of a.
     */
    tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size);
    if (tmp == NULL) {
      /* reallocation failed but "a" is still valid [can be freed] */
      return MP_MEM;
    }

    /* reallocation succeeded so set a->dp */
    a->dp = tmp;

    /* zero excess digits */
    i        = a->alloc;
    a->alloc = size;
    for (; i < a->alloc; i++) {
      a->dp[i] = 0;
    }
  }
  return MP_OKAY;
}
#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_grow.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_MP_NEG_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* b = -a */
int mp_neg (mp_int * a, mp_int * b)
{
  int     res;
  if (a != b) {
     if ((res = mp_copy (a, b)) != MP_OKAY) {
        return res;
     }
  }

  if (mp_iszero(b) != MP_YES) {
     b->sign = (a->sign == MP_ZPOS) ? MP_NEG : MP_ZPOS;
  } else {
     b->sign = MP_ZPOS;
  }

  return MP_OKAY;
}
#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_neg.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_MP_DIV_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

static int s_is_power_of_two(mp_digit b, int *p)
{
   int x;

   /* fast return if no power of two */
   if ((b==0) || (b & (b-1))) {
      return 0;
   }

   for (x = 0; x < DIGIT_BIT; x++) {
      if (b == (((mp_digit)1)<<x)) {
         *p = x;
         return 1;
      }
   }
   return 0;
}

/* single digit division (based on routine from MPI) */
int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
{
  mp_int  q;
  mp_word w;
  mp_digit t;
  int     res, ix;

  /* cannot divide by zero */
  if (b == 0) {
     return MP_VAL;
  }

  /* quick outs */
  if (b == 1 || mp_iszero(a) == 1) {
     if (d != NULL) {
        *d = 0;
     }
     if (c != NULL) {
        return mp_copy(a, c);
     }
     return MP_OKAY;
  }

  /* power of two ? */
  if (s_is_power_of_two(b, &ix) == 1) {
     if (d != NULL) {
        *d = a->dp[0] & ((((mp_digit)1)<<ix) - 1);
     }
     if (c != NULL) {
        return mp_div_2d(a, ix, c, NULL);
     }
     return MP_OKAY;
  }

#ifdef BN_MP_DIV_3_C
  /* three? */
  if (b == 3) {
     return mp_div_3(a, c, d);
  }
#endif

  /* no easy answer [c'est la vie].  Just division */
  if ((res = mp_init_size(&q, a->used)) != MP_OKAY) {
     return res;
  }
  
  q.used = a->used;
  q.sign = a->sign;
  w = 0;
  for (ix = a->used - 1; ix >= 0; ix--) {
     w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]);
     
     if (w >= b) {
        t = (mp_digit)(w / b);
        w -= ((mp_word)t) * ((mp_word)b);
      } else {
        t = 0;
      }
      q.dp[ix] = (mp_digit)t;
  }
  
  if (d != NULL) {
     *d = (mp_digit)w;
  }
  
  if (c != NULL) {
     mp_clamp(&q);
     mp_exch(&q, c);
  }
  mp_clear(&q);
  
  return res;
}

#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_div_d.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2007/01/09 04:44:32 $ */



#ifdef BN_MP_RADIX_SMAP_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* chars used in radix conversions */
const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_radix_smap.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_REVERSE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* reverse an array, used for radix code */
void
bn_reverse (unsigned char *s, int len)
{
  int     ix, iy;
  unsigned char t;

  ix = 0;
  iy = len - 1;
  while (ix < iy) {
    t     = s[ix];
    s[ix] = s[iy];
    s[iy] = t;
    ++ix;
    --iy;
  }
}
#endif

/* $Source: /cvs/libtom/libtommath/bn_reverse.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_MP_READ_UNSIGNED_BIN_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* reads a unsigned char array, assumes the msb is stored first [big endian] */
int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)
{
  int     res;

  /* make sure there are at least two digits */
  if (a->alloc < 2) {
     if ((res = mp_grow(a, 2)) != MP_OKAY) {
        return res;
     }
  }

  /* zero the int */
  mp_zero (a);

  /* read the bytes in */
  while (c-- > 0) {
    if ((res = mp_mul_2d (a, 8, a)) != MP_OKAY) {
      return res;
    }

#ifndef MP_8BIT
      a->dp[0] |= *b++;
      a->used += 1;
#else
      a->dp[0] = (*b & MP_MASK);
      a->dp[1] |= ((*b++ >> 7U) & 1);
      a->used += 2;
#endif
  }
  mp_clamp (a);
  return MP_OKAY;
}
#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_read_unsigned_bin.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_MP_PRIME_IS_PRIME_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* performs a variable number of rounds of Miller-Rabin
 *
 * Probability of error after t rounds is no more than

 *
 * Sets result to 1 if probably prime, 0 otherwise
 */
int mp_prime_is_prime (mp_int * a, int t, int *result)
{
  mp_int  b;
  int     ix, err, res;

  /* default to no */
  *result = MP_NO;

  /* valid value of t? */
  if (t <= 0 || t > PRIME_SIZE) {
    return MP_VAL;
  }

  /* is the input equal to one of the primes in the table? */
  for (ix = 0; ix < PRIME_SIZE; ix++) {
      if (mp_cmp_d(a, ltm_prime_tab[ix]) == MP_EQ) {
         *result = 1;
         return MP_OKAY;
      }
  }

  /* first perform trial division */
  if ((err = mp_prime_is_divisible (a, &res)) != MP_OKAY) {
    return err;
  }

  /* return if it was trivially divisible */
  if (res == MP_YES) {
    return MP_OKAY;
  }

  /* now perform the miller-rabin rounds */
  if ((err = mp_init (&b)) != MP_OKAY) {
    return err;
  }

  for (ix = 0; ix < t; ix++) {
    /* set the prime */
    mp_set (&b, ltm_prime_tab[ix]);

    if ((err = mp_prime_miller_rabin (a, &b, &res)) != MP_OKAY) {
      goto LBL_B;
    }

    if (res == MP_NO) {
      goto LBL_B;
    }
  }

  /* passed the test */
  *result = MP_YES;
LBL_B:mp_clear (&b);
  return err;
}
#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_prime_is_prime.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_MP_SUB_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* single digit subtraction */
int
mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
{
  mp_digit *tmpa, *tmpc, mu;
  int       res, ix, oldused;

  /* grow c as required */
  if (c->alloc < a->used + 1) {
     if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) {
        return res;
     }
  }

  /* if a is negative just do an unsigned
   * addition [with fudged signs]
   */
  if (a->sign == MP_NEG) {
     a->sign = MP_ZPOS;
     res     = mp_add_d(a, b, c);
     a->sign = c->sign = MP_NEG;

     /* clamp */
     mp_clamp(c);

     return res;
  }

  /* setup regs */
  oldused = c->used;
  tmpa    = a->dp;
  tmpc    = c->dp;

  /* if a <= b simply fix the single digit */
  if ((a->used == 1 && a->dp[0] <= b) || a->used == 0) {
     if (a->used == 1) {
        *tmpc++ = b - *tmpa;
     } else {
        *tmpc++ = b;
     }
     ix      = 1;

     /* negative/1digit */
     c->sign = MP_NEG;
     c->used = 1;
  } else {
     /* positive/size */
     c->sign = MP_ZPOS;
     c->used = a->used;

     /* subtract first digit */
     *tmpc    = *tmpa++ - b;
     mu       = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1);
     *tmpc++ &= MP_MASK;

     /* handle rest of the digits */
     for (ix = 1; ix < a->used; ix++) {
        *tmpc    = *tmpa++ - mu;
        mu       = *tmpc >> (sizeof(mp_digit) * CHAR_BIT - 1);
        *tmpc++ &= MP_MASK;
     }
  }

  /* zero excess digits */
  while (ix++ < oldused) {
     *tmpc++ = 0;
  }
  mp_clamp(c);
  return MP_OKAY;
}

#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_sub_d.c,v $ */
/* $Revision: 1.6 $ */
/* $Date: 2006/12/28 01:25:13 $ */



#ifdef BN_MP_DIV_2_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

/* b = a/2 */
int mp_div_2(mp_int * a, mp_int * b)
{
  int     x, res, oldused;

  /* copy */
  if (b->alloc < a->used) {
    if ((res = mp_grow (b, a->used)) != MP_OKAY) {
      return res;
    }
  }

  oldused = b->used;
  b->used = a->used;
  {
    register mp_digit r, rr, *tmpa, *tmpb;

    /* source alias */
    tmpa = a->dp + b->used - 1;

    /* dest alias */
    tmpb = b->dp +

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产aⅴ入口 | 国产婷婷色一区二区三区在线| 欧美色老头old∨ideo| 99久久久精品免费观看国产蜜| 国产美女精品在线| 国产酒店精品激情| 国产精品中文字幕日韩精品| 九九视频精品免费| 国产一区二区福利视频| 国产自产v一区二区三区c| 久久精品国产亚洲a| 美女视频网站久久| 国内精品久久久久影院薰衣草| 韩国一区二区在线观看| 国内精品伊人久久久久av影院| 国产在线播放一区三区四| 国产一区二区福利| aaa欧美色吧激情视频| 成人一区二区三区视频| 99视频有精品| 欧美国产精品一区| 日本一区二区三区在线不卡 | 亚洲高清免费一级二级三级| 亚洲精品欧美综合四区| 亚洲大尺度视频在线观看| 亚洲成人自拍一区| 六月婷婷色综合| 国产成人自拍网| 91美女在线视频| 91精品国产色综合久久不卡电影| 欧美电视剧免费全集观看| 久久免费美女视频| 一区二区三区欧美久久| 免费在线一区观看| 成人午夜免费视频| 欧美日韩亚洲另类| 久久这里只有精品视频网| 亚洲欧洲日产国码二区| 香蕉成人啪国产精品视频综合网| 久久99久久99精品免视看婷婷 | 日韩精品在线网站| 国产精品私人自拍| 亚洲第一电影网| 国产精品综合网| 日本韩国一区二区| 日韩精品专区在线影院重磅| 中文字幕乱码久久午夜不卡 | 婷婷六月综合网| 国产经典欧美精品| 欧美丝袜自拍制服另类| 久久五月婷婷丁香社区| 亚洲午夜一区二区| 处破女av一区二区| 欧美一区二区视频在线观看2020| 国产视频911| 午夜电影久久久| 国产99久久精品| 欧美一区二区免费观在线| 中文字幕一区在线观看| 麻豆精品一区二区av白丝在线| 91麻豆文化传媒在线观看| 精品久久久久久久久久久久包黑料 | 日韩国产高清在线| 91色乱码一区二区三区| 久久亚洲精华国产精华液| 亚洲一区在线视频观看| 风流少妇一区二区| 欧美一级免费观看| 一区二区欧美视频| 岛国精品一区二区| 久久综合久久鬼色| 日本不卡免费在线视频| 色偷偷88欧美精品久久久| 久久久亚洲精华液精华液精华液| 天堂资源在线中文精品| 99精品视频一区| 国产午夜精品一区二区三区视频| 婷婷亚洲久悠悠色悠在线播放| 一本一道久久a久久精品综合蜜臀| 2020国产精品久久精品美国| 日本中文一区二区三区| 欧美四级电影网| 一区二区三区免费在线观看| 成人黄动漫网站免费app| 久久老女人爱爱| 久久er精品视频| 日韩一区二区在线观看| 亚洲丰满少妇videoshd| 91免费小视频| 自拍偷在线精品自拍偷无码专区 | 成人av在线播放网站| 精品福利在线导航| 日韩avvvv在线播放| 欧美丰满少妇xxxxx高潮对白 | 国产一区二区在线看| 日韩一区二区三免费高清| 午夜精品久久久久久久久| 欧美日韩一区二区三区四区 | 三级在线观看一区二区| 欧美午夜片在线观看| 一区二区三区小说| 欧洲精品一区二区| 亚洲超碰精品一区二区| 欧美性猛片aaaaaaa做受| 伊人一区二区三区| 欧美三级视频在线播放| 亚洲与欧洲av电影| 欧美日韩视频在线一区二区| 亚洲午夜精品17c| 欧美人伦禁忌dvd放荡欲情| 亚洲成人在线免费| 欧美一区欧美二区| 久久国产乱子精品免费女| 精品美女在线播放| 国产精品自拍av| 欧美激情一区三区| 99精品欧美一区二区三区小说| 亚洲欧美日韩国产成人精品影院 | 色综合天天综合在线视频| 亚洲视频狠狠干| 欧美性videosxxxxx| 婷婷成人综合网| 日韩欧美国产系列| 从欧美一区二区三区| 亚洲精品国产a| 7777精品伊人久久久大香线蕉的| 日本亚洲三级在线| 久久青草欧美一区二区三区| 处破女av一区二区| 亚洲国产一区二区a毛片| 7777精品伊人久久久大香线蕉经典版下载 | 97精品视频在线观看自产线路二| 国产精品久久三| av在线免费不卡| 亚洲一区在线观看免费观看电影高清| 欧美亚洲综合久久| 麻豆精品在线观看| 国产精品色婷婷| 色狠狠综合天天综合综合| 日韩高清一区在线| 久久综合av免费| 色婷婷激情综合| 秋霞国产午夜精品免费视频| 久久欧美一区二区| 一本大道av伊人久久综合| 午夜精彩视频在线观看不卡| 精品久久久网站| 色婷婷综合久色| 精品一区二区三区在线观看| 成人免费视频在线观看| 欧美精品乱码久久久久久| 国产精品18久久久久| 亚洲一区二区高清| 久久综合中文字幕| 欧美三级日韩在线| 国产成人在线观看| 午夜精品久久久久久久久久久 | 国产不卡视频一区二区三区| 在线观看91精品国产入口| 蜜臀久久99精品久久久画质超高清 | 成人一区二区三区| 天堂久久一区二区三区| 中文字幕不卡在线播放| 欧美麻豆精品久久久久久| 福利一区福利二区| 蜜臀99久久精品久久久久久软件| 国产精品传媒视频| 欧美一级二级在线观看| 一本色道久久综合精品竹菊| 国产麻豆视频精品| 日韩电影在线观看一区| 亚洲欧美视频在线观看| 久久精品在线免费观看| 欧美日韩一级大片网址| www.av精品| 国产夫妻精品视频| 日本不卡一区二区| 亚洲精品菠萝久久久久久久| 国产性色一区二区| 欧美一级免费观看| 欧美色综合影院| 91网站最新地址| 国产成人在线免费| 激情综合色播激情啊| 日韩专区在线视频| 亚洲综合色网站| 亚洲日本韩国一区| 国产亚洲欧美激情| 精品欧美久久久| 中文字幕亚洲视频| 久久久蜜臀国产一区二区| 日韩一区二区在线看| 欧美老女人在线| 欧美自拍丝袜亚洲| 色香蕉成人二区免费| 91在线观看高清| 91在线视频免费91| 波多野结衣亚洲| 成人精品免费视频| 国产91露脸合集magnet|