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

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

?? random.c

?? flint庫(kù) RSA算法
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/******************************************************************************//*                                                                            *//* 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 random.c         Revision: 17.04.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.                                                                  *//*                                                                            *//******************************************************************************/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include "flint.h"#include "random.h"#define NO_ASSERTS 1#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#endifstatic void *local_memset (void *ptr, int val, size_t len);static int Rand64Init = 0;/******************************************************************************//*                                                                            *//*  Function:  Initialization of the linear congruential PRNG Rand64          *//*             Do not use Rand64 for any cryptographic purposes!              *//*  Syntax:    int InitRand64_l (char *UsrStr, int LenUsrStr,                 *//*                                                    int AddEntropy);        *//*  Input:     UsrStr (User supplied byte vector for initialization of        *//*                     Rand64)                                                *//*             LenUsrStr (Length of UsrString in byte)                        *//*             AddEntropy (Number of additionally required entropy bytes)     *//*  Output:    -                                                              *//*  Returns:   Number of requested entropy bytes missing                      *//*             0: OK                                                          *//*                                                                            *//******************************************************************************/int __FLINT_APIInitRand64_l (char *UsrStr, int LenUsrStr, int AddEntropy){  int MissingEntropy;  CLINT Seed_l;  /* Get Required Entropy and Seed */  MissingEntropy = GetEntropy_l (Seed_l, NULL, AddEntropy, UsrStr, LenUsrStr);  /* Initialize internal state */  seed64_l (Seed_l);#ifdef FLINT_SECURE  /* Security: Purge random variable Seed_l */  local_memset (Seed_l, 0, sizeof (CLINT));#endif  /* Set Flag: PRNG is initialized */  Rand64Init = 1;  return MissingEntropy;}/************************* RipeMD-160 / SHA-1 based PRNG **********************//******************************************************************************//*                                                                            *//*  Function:  Initialisation of the SHA-1/Ripemd-160 based Pseudorandom-     *//*             numbergenerator (RandRMDSHA1)                                  *//*  Syntax:    int InitRandRMDSHA1_l (STATERMDSHA1 *rstate, char *UsrStr,     *//*                                     int LenUsrStr, int AddEntropy);        *//*  Input:     UsrStr (User supplied byte vector for initialization of        *//*                     RandRMDSHA1)                                           *//*             LenUsrStr (Length of UsrString in byte)                        *//*             AddEntropy (Number of additionally required entropy bytes)     *//*  Output:    rstate (Initialized internal state of PRNG)                    *//*  Returns:   Number of requested entropy bytes missing                      *//*             0: OK                                                          *//*                                                                            *//******************************************************************************/int __FLINT_APIInitRandRMDSHA1_l (STATERMDSHA1 *rstate, char *UsrStr, int LenUsrStr, int AddEntropy){  int MissingEntropy;  /* Get Required Entropy and Seed */  MissingEntropy = GetEntropy_l (NULL, rstate->XRMDSHA1, AddEntropy, UsrStr, LenUsrStr);  /* Switch internal state */  ripemd160_l (rstate->XRMDSHA1, rstate->XRMDSHA1, 20);  /* Initialize RoundRMDSHA1 for picking single bytes out of random stream */  rstate->RoundRMDSHA1 = 1;  /* Set Flag: PRNG is initialized */  rstate->RandRMDSHA1Init = 1;  return MissingEntropy;}/******************************************************************************//*                                                                            *//*  Function:  Switching of RandRMDSHA1 to next state, generating one         *//*             random byte                                                    *//*  Syntax:    UCHAR SwitchRandRMDSHA1_l (STATERMDSHA1 *rstate)               *//*  Input:     rstate (Initialized State)                                     *//*  Output:    rstate (Internal State)                                        *//*  Returns:   One byte random value                                          *//*                                                                            *//******************************************************************************/UCHAR __FLINT_APISwitchRandRMDSHA1_l (STATERMDSHA1 *rstate){  UCHAR rbyte;    /* Generate random value */  sha1_l (rstate->SRMDSHA1, rstate->XRMDSHA1, 20);  rbyte = rstate->SRMDSHA1[(rstate->RoundRMDSHA1)++ & 15]; /* RoundRMDSHA1 mod 16 */  /* Switch internal state */  ripemd160_l (rstate->XRMDSHA1, rstate->XRMDSHA1, 20);#ifdef FLINT_SECURE  /* Security: Purge random variable SRMDSHA1 */  local_memset (rstate->SRMDSHA1, 0, sizeof (rstate->SRMDSHA1));#endif  return rbyte;}/******************************************************************************//*                                                                            *//*  Function:  Generation of pseudorandom number of CLINT-Type                *//*             (Preceding Initialization by InitRandRMDSHA1() required)       *//*  Syntax:    int RandRMDSHA1_l (STATERMDSHA1 *rstate, CLINT r_l, int l);    *//*  Input:     rstate (Initialized state)                                     *//*             l (Number of binary digits of random number to generated)      *//*  Output:    r_l (Pseudorandom number)                                      *//*             rstate (New internal state of PRNG)                            *//*  Returns:   E_CLINT_OK if everything is OK                                 *//*             E_CLINT_RIN if generator is not initialized                    *//*                                                                            *//******************************************************************************/int __FLINT_APIRandRMDSHA1_l (CLINT r_l, STATERMDSHA1 *rstate, int l){  USHORT i, j;  USHORT ls, lr;  if (!rstate->RandRMDSHA1Init)    {      return E_CLINT_RIN;    }  l = MIN ((unsigned int)l, CLINTMAXBIT);  ls = (USHORT) l >> LDBITPERDGT;  lr = (USHORT) l & ((USHORT)BITPERDGT - 1);  for (i = 1; i <= ls; i++)    {      r_l[i] = sRandRMDSHA1_l (rstate);    }  if (lr > 0)    {      r_l[++ls] = sRandRMDSHA1_l (rstate);      j = 1U << (lr - 1);                         /* j <- 2^(lr - 1) */      r_l[ls] = (r_l[ls] | j) & ((j << 1) - 1);   /* Bit lr set to 1, higher bits to 0 */    }  else    {      r_l[ls] |= BASEDIV2;    }  SETDIGITS_L (r_l, ls);  return 0;}/******************************************************************************//*                                                                            *//*  Function:   Purging of internat status of RandRMDSHA1                     *//*  Syntax:     void PurgeRandRMDSHA1_l (STATERMDSHA1 *rstate);               *//*  Input:      rstate (Initialized state)                                    *//*  Output:     rstate (Purged internal state)                                *//*  Returns:    -                                                             *//*                                                                            *//******************************************************************************/void __FLINT_APIPurgeRandRMDSHA1_l (STATERMDSHA1 *rstate){  /* Purge status of RipeMD-160/Sha-1 based PRNG */  memset (rstate->XRMDSHA1, 0, sizeof (rstate->XRMDSHA1));  memset (rstate->SRMDSHA1, 0, sizeof (rstate->SRMDSHA1));  rstate->RoundRMDSHA1 = 0;  /* Reset initialization flag */  rstate->RandRMDSHA1Init = 0;}/************************* AES based PRNG with key update *********************/static const unsigned char RandAESKey[] ={0x0f, 0x1e, 0x2d, 0x3c, 0x4b, 0x5a, 0x69, 0x78, 0x87, 0x96, 0xa5, 0xb4, 0xc3, 0xd2, 0xe1, 0xf0,  0x12, 0x23, 0x34, 0x45, 0x56, 0x78, 0x89, 0x9a, 0xab, 0xbc, 0xcd, 0xde, 0xef, 0xf0, 0x01, 0x12};/******************************************************************************//*                                                                            *//*  Function:  Initialisation of the AES based Pseudorandom-                  *//*             numbergenerator (RandAES)                                      *//*  Syntax:    int InitRandRMDSHA1_l (STATEAES *rstate, char *UsrStr,         *//*                                    int LenUsrStr, int AddEntropy);         *//*  Input:     UsrStr (User supplied byte vector for initialization of        *//*                     RandAES)                                               *//*             LenUsrStr (Length of UsrString in byte)                        *//*             AddEntropy (Number of additionally required entropy bytes)     *//*             update (Frequency AES-key-update by XORing with output value:  *//*                     update = 0: Never update key, fastest                  *//*                     update = 1: Always update key, slowest, most secure    *//*                     update = 1 < n: Update key every n'th call to RandAES  *//*  Output:    rstate (Initialized internal state of PRNG)                    *//*  Returns:   Number of requested entropy bytes missing                      *//*             0: OK                                                          *//*                                                                            *//******************************************************************************/int __FLINT_APIInitRandAES_l (STATEAES *rstate, char *UsrStr, int LenUsrStr, int AddEntropy, int update){  int MissingEntropy, i;  /* Get Required Entropy and Seed */  MissingEntropy = GetEntropy_l (NULL, rstate->XAES, AddEntropy, UsrStr, LenUsrStr);  /* Initialize AES */  for (i = 0; i < 32; i++)    {

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清不卡一区| 91视频精品在这里| 亚洲h在线观看| 国产农村妇女精品| 日韩你懂的在线观看| 欧美日韩成人综合天天影院 | 欧美xxx久久| 欧美日韩欧美一区二区| 91麻豆蜜桃一区二区三区| 黑人精品欧美一区二区蜜桃| 亚洲bt欧美bt精品| 亚洲午夜在线电影| 夜夜嗨av一区二区三区四季av| 国产精品无码永久免费888| 日韩一区二区三区视频在线观看 | 在线电影欧美成精品| 99久久久国产精品| 成人h动漫精品一区二区| 国产91精品欧美| 成人av在线网站| www.亚洲色图| 91久久线看在观草草青青| 99久久久无码国产精品| 色综合一区二区| 欧美中文字幕亚洲一区二区va在线| 99久精品国产| 在线看不卡av| 欧美日韩免费在线视频| 91精品国产色综合久久久蜜香臀| 欧美一级黄色大片| 久久久久久久一区| 亚洲美女淫视频| 日韩中文字幕麻豆| 国产高清一区日本| 91国偷自产一区二区三区观看| 欧美日韩国产精品自在自线| 日韩精品一区二区三区视频在线观看| 久久久亚洲精华液精华液精华液| 国产精品传媒视频| 日韩二区在线观看| 成人国产一区二区三区精品| 91精品久久久久久久99蜜桃| 久久九九99视频| 天天综合日日夜夜精品| 丁香六月综合激情| 欧美伦理影视网| 中文av字幕一区| 国产美女一区二区三区| 91精品国产色综合久久不卡电影 | 国产视频一区在线观看| 亚洲成人激情自拍| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 精品国产精品网麻豆系列| 成人国产电影网| av成人免费在线观看| 久久久99精品免费观看不卡| 视频一区在线播放| 欧美日韩中文另类| 尤物在线观看一区| 99精品国产91久久久久久| 日本一二三四高清不卡| 国产乱子轮精品视频| 日韩免费在线观看| 国产美女一区二区三区| 久久久蜜臀国产一区二区| 国产呦萝稀缺另类资源| 亚洲精品一线二线三线无人区| 午夜精品一区在线观看| 欧美一区二区三区的| 午夜精品福利一区二区蜜股av| 在线看国产日韩| 欧美aaaaaa午夜精品| 日韩欧美亚洲一区二区| 国产一区在线不卡| 亚洲欧洲美洲综合色网| 在线亚洲高清视频| 日韩av一区二区三区四区| 精品播放一区二区| 成人亚洲精品久久久久软件| 综合激情成人伊人| 欧美精品久久久久久久多人混战| 久久精品理论片| 国产精品无遮挡| 91精品在线免费观看| 国产精品中文有码| 亚洲一区二区视频| 久久影音资源网| 欧洲精品视频在线观看| 久草热8精品视频在线观看| 中文字幕一区二区三区乱码在线| 91麻豆精品在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 久久久99精品免费观看不卡| 91福利在线看| 国产精品一区二区久激情瑜伽| 国产精品二区一区二区aⅴ污介绍| 欧美午夜寂寞影院| 成人国产在线观看| 麻豆成人综合网| 亚洲.国产.中文慕字在线| 欧美激情一区二区三区蜜桃视频 | 日韩不卡一区二区三区 | 在线观看亚洲专区| 国产99久久久国产精品潘金网站| 日本在线不卡一区| 一区二区三区欧美在线观看| 欧美国产精品v| ww久久中文字幕| 欧美一区二区精品久久911| 99国内精品久久| 91在线porny国产在线看| 国产ts人妖一区二区| 国产精一区二区三区| 久久国产精品露脸对白| 精东粉嫩av免费一区二区三区| 偷拍与自拍一区| 日韩av电影免费观看高清完整版 | 久久久久久一级片| 欧美丝袜丝交足nylons| 欧美日韩午夜在线| 91精品久久久久久久99蜜桃| 欧美精品v国产精品v日韩精品| 91麻豆精品国产91久久久| 欧美一区二区在线不卡| 精品国产精品网麻豆系列| 久久精品男人的天堂| 中文字幕免费在线观看视频一区| 欧美国产成人精品| 亚洲精品免费在线| 亚洲成人黄色小说| 久88久久88久久久| 99免费精品视频| 色婷婷av久久久久久久| 欧美精品xxxxbbbb| 国产午夜精品一区二区三区嫩草 | 日韩av中文字幕一区二区| 久88久久88久久久| 色婷婷av一区二区三区大白胸| 欧美日韩精品一区二区三区蜜桃| 欧美tk—视频vk| 亚洲欧美中日韩| 美国精品在线观看| 成人免费黄色大片| 欧美一区二区三区的| 亚洲色图欧洲色图| 国产一区在线视频| 在线观看中文字幕不卡| 久久久久久免费毛片精品| 亚洲黄色性网站| 成人精品国产福利| 欧美videos大乳护士334| 亚洲欧洲制服丝袜| 国产99精品在线观看| 欧美美女激情18p| 自拍偷在线精品自拍偷无码专区| 久久99国产精品尤物| 在线看日本不卡| 亚洲精品国产精品乱码不99| 韩国三级电影一区二区| 在线不卡中文字幕| 亚洲最新视频在线播放| 97久久超碰精品国产| 国产欧美日韩在线| 国产盗摄一区二区| 久久美女艺术照精彩视频福利播放 | 日韩高清不卡一区| 欧美日韩一二三区| 亚洲综合激情小说| 欧美性受极品xxxx喷水| 一区二区三区欧美日韩| 日本黄色一区二区| 亚洲精品成人精品456| 91免费视频大全| 亚洲精品v日韩精品| 色激情天天射综合网| 亚洲第一久久影院| 欧美另类videos死尸| 美女视频网站黄色亚洲| 精品国产123| www.成人网.com| 亚洲风情在线资源站| 日韩小视频在线观看专区| 国产一区二区免费看| 国产精品日韩成人| 在线影院国内精品| 日本特黄久久久高潮| 国产人妖乱国产精品人妖| 97se亚洲国产综合自在线不卡 | 成人av网站在线观看| 一区二区三区波多野结衣在线观看| 欧美日韩精品福利| 伊人性伊人情综合网| 99久久伊人精品| 蜜桃视频一区二区三区在线观看| 久久久久久久综合色一本| 一本色道a无线码一区v| 国产美女在线观看一区| 亚洲成年人网站在线观看| 欧美激情一区二区三区不卡| 欧美日韩高清一区二区|