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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? flint.c

?? flint庫 RSA算法
?? C
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************//*                                                                            *//* Functions for arithmetic and number theory with large integers in C        *//* Software supplement to the book "Cryptography in C and C++"                *//* by Michael Welschenbach                                                    *//*                                                                            *//* Module flint.c          Revision: 19.05.2005                               *//*                                                                            *//*  Copyright (C) 1998-2005 by Michael Welschenbach                           *//*  Copyright (C) 2001-2005 by Springer-Verlag Berlin, Heidelberg             *//*  Copyright (C) 2001-2005 by Apress L.P., Berkeley, CA                      *//*  Copyright (C) 2002-2005 by Wydawnictwa MIKOM, Poland                      *//*  Copyright (C) 2002-2005 by PHEI, P.R.China                                *//*  Copyright (C) 2002-2005 by InfoBook, Korea                                *//*  Copyright (C) 2002-2005 by Triumph Publishing, Russia                     *//*                                                                            *//*  All Rights Reserved                                                       *//*                                                                            *//*  The software may be used for noncommercial purposes and may be altered,   *//*  as long as the following conditions are accepted without any              *//*  qualification:                                                            *//*                                                                            *//*  (1) All changes to the sources must be identified in such a way that the  *//*      changed software cannot be misinterpreted as the original software.   *//*                                                                            *//*  (2) The statements of copyright may not be removed or altered.            *//*                                                                            *//*  (3) The following DISCLAIMER is accepted:                                 *//*                                                                            *//*  DISCLAIMER:                                                               *//*                                                                            *//*  There is no warranty for the software contained in this distribution, to  *//*  the extent permitted by applicable law. The copyright holders provide the *//*  software `as is' without warranty of any kind, either expressed or        *//*  implied, including, but not limited to, the implied warranty of fitness   *//*  for a particular purpose. The entire risk as to the quality and           *//*  performance of the program is with you.                                   *//*                                                                            *//*  In no event unless required by applicable law or agreed to in writing     *//*  will the copyright holders, or any of the individual authors named in     *//*  the source files, be liable to you for damages, including any general,    *//*  special, incidental or consequential damages arising out of any use of    *//*  the software or out of inability to use the software (including but not   *//*  limited to any financial losses, loss of data or data being rendered      *//*  inaccurate or losses sustained by you or by third parties as a result of  *//*  a failure of the software to operate with any other programs), even if    *//*  such holder or other party has been advised of the possibility of such    *//*  damages.                                                                  *//*                                                                            *//******************************************************************************//*                                                                            *//*  Requirements:                                                             *//*                                                                            *//*  sizeof (ULONG)  == 4                                                      *//*  sizeof (USHORT) == 2                                                      *//*                                                                            *//******************************************************************************/#ifndef FLINT_ANSI#define FLINT_ANSI#endif#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include "flint.h"#define NO_ASSERTS 1#define FLINTCVMAJ  3#define FLINTCVMIN  0#if ((FLINTCVMIN != FLINT_VERMIN) || (FLINTCVMAJ != FLINT_VERMAJ))#error Error: Incomaptible versions of FLINT.C and FLINT.H#endif#ifdef FLINT_DEBUG#undef NO_ASSERTS#define ASSERT_LOG_AND_QUIT#include "_assert.h"#include "_alloc.h"#ifdef COVERAGE#include "utclog.h"#endif#endif#ifdef NO_ASSERTS#define Assert(a) (void)0#endif/* Mute wrap up error messages of PC-lint *//*lint -esym(14,add,sub,mul,umul,sqr)   *//*lint -esym(15,add,sub,mul,umul,sqr)   *//*lint -esym(515,add,sub,mul,umul,sqr)  *//*lint -esym(516,add,sub,mul,umul,sqr)  *//*lint -esym(532,add,sub,mul,umul,sqr)  *//*lint -esym(533,add,sub,mul,umul,sqr)  *//*lint -esym(1066,add,sub,mul,umul,sqr) *//*lint -esym(534,add_l,sub_l,mul_l,sqr_l,div_l,mmul_l,msub_l,dec_l,madd_l) *//*lint -esym(534,msqr_l,mexp_l,mexp5_l,mexpk_l,mod_l,mod2_l,mexp2_l) *//***********  Prototypes of local functions ***********************************//* Private register functions */static voiddestroy_reg_l (void);static intallocate_reg_l (void);/* Integer square roots from ULONG values */static ULONGul_iroot (unsigned long n);/*  Test and set bit w/o checking for overrun */static int setbit (CLINT a_l, unsigned int pos);#ifdef FLINT_SECURE#define PURGEVARS_L(X) purgevars_l X/* Function to purge variables */static void purgevars_l (int noofvars, ...);#ifdef FLINT_DEBUG#define ISPURGED_L(X) Assert(ispurged_l X)/* Function to check, whether variables have been purged */static int ispurged_l (int noofvars, ...);#else#define ISPURGED_L(X) (void)0#endif /* FLINT_DEBUG */#else#define PURGEVARS_L(X) (void)0#define ISPURGED_L(X) (void)0#endif /* FLINT_SECURE *//******************************************************************************//* CLINT-Constant Values */clint __FLINT_API_DATAnul_l[] = {0, 0, 0, 0, 0};clint __FLINT_API_DATAone_l[] = {1, 1, 0, 0, 0};clint __FLINT_API_DATAtwo_l[] = {1, 2, 0, 0, 0};#ifdef FLINT_INITRAND#include "random.h"STATEPRNG xs;#endif/******************************************************************************//*                                                                            *//*  Function:   Initialization of FLINT/C-Library                             *//*              If the FLINT/C functions are provided as DLL                  *//*              the function initializing the DLL, e. g. DllMain(),           *//*              should call this function.                                    *//*                                                                            *//*  Syntax:     FLINTInit_l() (void);                                         *//*  Input:      -                                                             *//*  Output:     -                                                             *//*  Returns:    E_CLINT_OK if everything is O.K.                              *//*              -1 else                                                       *//*                                                                            *//******************************************************************************/int __FLINT_APIFLINTInit_l (void){  int error;  initrand64_lt();#ifdef FLINT_INITRAND  /* Initialization of all PRNGs in global state buffer xs */  /* N. B.: For cryptographic purposes use individual state buffers */  /* that are initialized and purged separetely */  InitRand_l (&xs, "", 0, 200, 0); #endif  error = create_reg_l();  if (!error)    return E_CLINT_OK;  else    return -1;}/******************************************************************************//*                                                                            *//*  Function:   Exit the FLINT/C-Library                                      *//*  Syntax:     FLINTExit_l (void);                                           *//*  Input:      -                                                             *//*  Output:     -                                                             *//*  Returns:    E_CLINT_OK if everything is O.K.                              *//*              -1 else                                                       *//*                                                                            *//******************************************************************************/int __FLINT_APIFLINTExit_l (void){  free_reg_l();  return E_CLINT_OK;}/******************************************************************************//*                                                                            *//*  Function:   Copy CLINT to CLINT                                           *//*  Syntax:     void cpy_l (CLINT dest_l, CLINT src_l);                       *//*  Input:      CLINT src_l                                                   *//*  Output:     CLINT dest_l                                                  *//*  Returns:    -                                                             *//*                                                                            *//******************************************************************************/void __FLINT_APIcpy_l (CLINT dest_l, CLINT src_l){  clint *lastsrc_l = MSDPTR_L (src_l);  *dest_l = *src_l;  while ((*lastsrc_l == 0) && (*dest_l > 0))    {      --lastsrc_l;      --*dest_l;    }  while (src_l < lastsrc_l)    {      *++dest_l = *++src_l;    }}/******************************************************************************//*                                                                            *//*  Function:  Swap two CLINT operands                                        *//*  Syntax:    void fswap_l (CLINT a_l, CLINT b_l);                           *//*  Input:     CLINT a_l, b_l                                                 *//*  Output:    Swapped CLINT operands b_l, a_l                                *//*  Returns:   -                                                              *//*                                                                            *//******************************************************************************/void __FLINT_APIfswap_l (CLINT a_l, CLINT b_l){  CLINT tmp_l;  cpy_l (tmp_l, a_l);  cpy_l (a_l, b_l);  cpy_l (b_l, tmp_l);  /* Purging of variables */  PURGEVARS_L ((1, sizeof (tmp_l), tmp_l));}/******************************************************************************//*                                                                            *//*  Function:  Test whether two CLINT operands are equal                      *//*  Syntax:    int equ_l (CLINT a_l, CLINT b_l);                              *//*  Input:     CLINT a_l, b_l                                                 *//*  Output:    -                                                              *//*  Returns:   1 : a_l and b_l have equal values                              *//*             0 : otherwise                                                  *//*                                                                            *//******************************************************************************/int __FLINT_APIequ_l (CLINT a_l, CLINT b_l){  clint *msdptra_l, *msdptrb_l;  int la = (int)DIGITS_L (a_l);  int lb = (int)DIGITS_L (b_l);  if (la == 0 && lb == 0)    {      return 1;    }  while (a_l[la] == 0 && la > 0)    {      --la;    }  while (b_l[lb] == 0 && lb > 0)    {      --lb;    }  if (la == 0 && lb == 0)    {      return 1;    }  if (la != lb)    {      return 0;    }  msdptra_l = a_l + la;  msdptrb_l = b_l + lb;  while ((*msdptra_l == *msdptrb_l) && (msdptra_l > a_l))    {      msdptra_l--;      msdptrb_l--;    }  /* Purging of variables */  PURGEVARS_L ((2, sizeof (la), &la,                   sizeof (lb), &lb));  ISPURGED_L ((2, sizeof (la), &la,                  sizeof (lb), &lb));  return (msdptra_l > a_l ? 0 : 1);}/******************************************************************************//*                                                                            *//*  Function:  Test whether two CLINT operands are equal modulo m             *//*  Syntax:    int mequ_l (CLINT a_l, CLINT b_l, CLINT m_l);                  *//*  Input:     CLINT a_l, b_l (values to compare), CLINT m_l (Modulus)        *//*  Output:    -                                                              *//*  Returns:   1          : a_l = b_l mod m_l                                 *//*             0          : a_l != b_l mod m_l                                *//*             E_CLINT_DBZ: division by 0                                     *//*                                                                            *//******************************************************************************/int __FLINT_APImequ_l (CLINT a_l, CLINT b_l, CLINT m_l){  CLINT r_l;  int res;  if (EQZ_L (m_l))    {      return E_CLINT_DBZ;          /* Division by Zero? */    }  msub_l (a_l, b_l, r_l, m_l);  res = (0 == DIGITS_L (r_l))?1:0;  /* Purging of variables */  PURGEVARS_L ((1, sizeof (r_l), r_l));  ISPURGED_L ((1, sizeof (r_l), r_l));  return res;}/******************************************************************************//*                                                                            *//*  Function:  Comparison of two CLINT operands                               *//*  Syntax:    int cmp_l (CLINT a_l, CLINT b_l);                              *//*  Input:     CLINT a_l, b_l (values to compare)                             *//*  Output:    -                                                              *//*  Returns:   -1: a_l < b_l,                                                 *//*              0: a_l == b_l,                                                *//*              1: a_l > b_l                                                  *//*                                                                            *//******************************************************************************/int __FLINT_APIcmp_l (CLINT a_l, CLINT b_l){  clint *msdptra_l, *msdptrb_l;  int la = (int)DIGITS_L (a_l);  int lb = (int)DIGITS_L (b_l);  if (la == 0 && lb == 0)    {      return 0;    }  while (a_l[la] == 0 && la > 0)    {      --la;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频一区二区| 久久综合色天天久久综合图片| 久久99久久久久| 午夜成人免费电影| 亚洲va韩国va欧美va精品| 一区二区三区不卡视频在线观看| 国产精品麻豆欧美日韩ww| 国产午夜精品理论片a级大结局| 久久久久久麻豆| 日韩精品中文字幕在线不卡尤物| 欧美成人精精品一区二区频| 欧美精品一区在线观看| 精品国产91乱码一区二区三区| 欧美成人官网二区| 国产日韩精品一区二区浪潮av| xnxx国产精品| 国产日韩欧美激情| 亚洲三级电影网站| 亚洲一区二区欧美日韩| 亚洲高清视频的网址| 日本91福利区| 精久久久久久久久久久| 国产乱码精品一区二区三区av| 国产黄人亚洲片| 51精品久久久久久久蜜臀| 日韩欧美一二三区| 久久婷婷国产综合精品青草| 国产亚洲欧美日韩俺去了| 国产精品你懂的在线| 亚洲伦理在线精品| 五月天久久比比资源色| 麻豆久久久久久久| 国产成人精品影院| 99精品视频在线观看免费| 色琪琪一区二区三区亚洲区| 欧美精品 日韩| 久久久久国产精品麻豆ai换脸 | 国产精品一区二区三区四区| 国产精品77777竹菊影视小说| 99免费精品在线| 欧美日韩美女一区二区| 精品国产一区二区三区不卡| 国产精品嫩草久久久久| 亚洲国产精品一区二区久久| 久久丁香综合五月国产三级网站| 成人免费高清视频在线观看| 欧美影片第一页| 精品国产不卡一区二区三区| 亚洲免费三区一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 一区二区三区在线高清| 免费日韩伦理电影| 91亚洲精品久久久蜜桃网站 | 91精品免费观看| 欧美激情在线一区二区三区| 亚洲国产美国国产综合一区二区| 久久99国产精品久久99| 欧美中文字幕一区二区三区亚洲 | 亚洲一区二区五区| 狠狠色狠狠色综合系列| 91久久奴性调教| 久久毛片高清国产| 亚洲与欧洲av电影| 粉嫩绯色av一区二区在线观看| 亚洲理论在线观看| 久久国产综合精品| 欧美亚日韩国产aⅴ精品中极品| 久久嫩草精品久久久精品一| 亚洲va天堂va国产va久| fc2成人免费人成在线观看播放| 日韩欧美精品在线| 亚洲一级电影视频| 成人免费视频视频在线观看免费 | 亚洲成人手机在线| 成人爽a毛片一区二区免费| 91精品国产一区二区三区蜜臀 | 五月天国产精品| 成人18精品视频| 久久女同精品一区二区| 人人精品人人爱| 欧美乱妇一区二区三区不卡视频| 中文字幕欧美区| 国产最新精品免费| 制服丝袜亚洲播放| 亚洲综合丁香婷婷六月香| 国产aⅴ综合色| 精品久久久久久综合日本欧美| 亚洲妇女屁股眼交7| 色综合视频在线观看| 国产免费久久精品| 国产精品99久久不卡二区| 日韩精品一区在线观看| 日韩精品一区第一页| 色猫猫国产区一区二在线视频| 中文字幕av资源一区| 国产乱码精品1区2区3区| 欧美zozozo| 麻豆久久一区二区| 欧美一区日韩一区| 日韩精品成人一区二区三区| 欧美丝袜丝交足nylons| 亚洲国产日韩一区二区| 日本高清不卡一区| 亚洲免费在线播放| 欧美优质美女网站| 一区二区三区日韩在线观看| 色综合天天综合| 亚洲色图19p| 色偷偷久久人人79超碰人人澡| 亚洲日本韩国一区| 色香蕉成人二区免费| 一区二区三区中文在线| 99re这里只有精品6| 亚洲欧洲综合另类在线| 在线精品国精品国产尤物884a| 一区二区三区免费在线观看| 91福利国产精品| 亚洲高清在线精品| 91精品国产美女浴室洗澡无遮挡| 日本系列欧美系列| 日韩视频免费观看高清完整版| 久久精品久久精品| 国产亚洲欧美日韩在线一区| 成人网在线播放| 亚洲私人黄色宅男| 在线一区二区三区做爰视频网站| 亚洲午夜av在线| 这里只有精品免费| 国内精品写真在线观看| 国产亚洲精久久久久久| 91免费观看在线| 亚洲成人激情社区| 精品盗摄一区二区三区| 国产成人a级片| 亚洲免费在线视频| 国产在线不卡一区| 丁香婷婷综合网| 在线观看日韩精品| 亚洲免费av高清| 91精品国产手机| 国产成人在线看| 一区二区国产盗摄色噜噜| 4438亚洲最大| 2欧美一区二区三区在线观看视频| 久久91精品久久久久久秒播| 国产视频视频一区| 91久久精品日日躁夜夜躁欧美| 天天av天天翘天天综合网 | 国产精品久久久久久久久晋中 | 成人av综合在线| 欧美高清hd18日本| 蜜臀久久99精品久久久久宅男| 26uuu精品一区二区在线观看| caoporn国产一区二区| 午夜精品视频在线观看| 精品久久一区二区| 色拍拍在线精品视频8848| 日本视频一区二区| 国产精品女同一区二区三区| 欧美日韩一区二区三区高清 | 从欧美一区二区三区| 亚洲成人一区二区| 中文子幕无线码一区tr| 在线不卡a资源高清| 成人免费视频网站在线观看| 日日摸夜夜添夜夜添国产精品 | 久久久噜噜噜久久中文字幕色伊伊| 91首页免费视频| 精品中文字幕一区二区小辣椒 | av一区二区三区黑人| 蜜桃av一区二区三区| 亚洲欧美日韩系列| 2023国产精品视频| 精品1区2区3区| gogogo免费视频观看亚洲一| 精品一区二区免费| 亚洲国产精品综合小说图片区| 国产三级一区二区| 亚洲综合久久av| 国产色一区二区| 精品久久久久久亚洲综合网| 欧美亚洲综合在线| 成人免费av网站| 国产在线播精品第三| 日本欧美在线观看| 亚洲综合av网| 亚洲精品国产一区二区精华液| 国产人成亚洲第一网站在线播放 | 精品久久一区二区三区| 欧美日韩高清一区二区三区| 91在线精品一区二区三区| 国产激情视频一区二区三区欧美 | 国产精品一卡二卡在线观看| 日韩影院在线观看| 亚洲成人资源网| 一区二区在线观看不卡| 日韩理论片一区二区| 国产精品色婷婷| 欧美激情一区二区三区四区| 亚洲精品一区二区三区四区高清|