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

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

?? bigdigits.h

?? RSA operation library.
?? H
字號:
/* $Id: bigdigits.h $ */

/******************** SHORT COPYRIGHT NOTICE**************************
This source code is part of the BigDigits multiple-precision
arithmetic library Version 2.1 originally written by David Ireland,
copyright (c) 2001-6 D.I. Management Services Pty Limited, all rights
reserved. It is provided "as is" with no warranties. You may use
this software under the terms of the full copyright notice
"bigdigitsCopyright.txt" that should have been included with this
library or can be obtained from <www.di-mgt.com.au/bigdigits.html>.
This notice must always be retained in any copy.
******************* END OF COPYRIGHT NOTICE***************************/
/*
	Last updated:
	$Date: 2006-08-23 11:13:00 $
	$Revision: 2.1.0 $
	$Author: dai $
*/

/* Interface to BigDigits "mp" functions */


#ifndef BIGDIGITS_H_
#define BIGDIGITS_H_ 1

#include <stddef.h>

/**** USER CONFIGURABLE SECTION ****/

/* Define type and size of DIGIT */

/* [v2.1] Changed to use C99 exact-width types so it will compile with 64-bit compilers.

The following PP instructions assume that all Linux systems have a C99-conforming 
<stdint.h>; that other Unix systems have the uint32_t definitions in <sys/types.h>;
and that MS et al don't have them at all. Adjust if necessary to suit your system. 
You can override by defining HAVE_C99INCLUDES or HAVE_SYS_TYPES.
CAUTION: change this, change bigd.h to match.
*/

#ifndef HAVE_C99INCLUDES
	#if (__STDC_VERSION >= 199901L) || defined(linux) || defined(__linux__)
	#define HAVE_C99INCLUDES
	#endif
#endif
#ifndef HAVE_SYS_TYPES
	#if defined(unix) || defined(__unix__)
	#define HAVE_SYS_TYPES
	#endif
#endif
#ifdef HAVE_C99INCLUDES
	#include <stdint.h>
#elif defined(HAVE_SYS_TYPES)
	#include <sys/types.h>
#else 
	#define uint32_t unsigned long 
	#define uint16_t unsigned short 
#endif

typedef uint32_t DIGIT_T;
typedef uint16_t HALF_DIGIT_T;

/* Sizes to match */
#define MAX_DIGIT 0xffffffffUL
#define MAX_HALF_DIGIT 0xffffUL	/* NB 'L' */
#define BITS_PER_DIGIT 32
#define HIBITMASK 0x80000000UL

/* Macros for format specifiers 
-- change to "u", "x" and "X" if necessary */
#ifdef HAVE_C99INCLUDES
	#include <inttypes.h>
#else 
	#define PRIu32 "lu" 
	#define PRIx32 "lx" 
	#define PRIX32 "lX" 
#endif
/* We define our own */
#define PRIuBIGD PRIu32
#define PRIxBIGD PRIx32
#define PRIXBIGD PRIX32

/**** END OF USER CONFIGURABLE SECTION ****/

#define BITS_PER_HALF_DIGIT (BITS_PER_DIGIT / 2)
#define BYTES_PER_DIGIT (BITS_PER_DIGIT / 8)

/* Removed in version 2 ---->
  [Max number of digits expected in a mp array]
//[#define MAX_DIG_LEN 51]
	This [was] required for temp storage only in:
	mpModulo, mpShortMod, mpModMult, mpGcd,
	mpModInv, mpIsPrime
   Changed to use mpAlloc.
<--- */

/* Useful macros */
#define LOHALF(x) ((DIGIT_T)((x) & MAX_HALF_DIGIT))
#define HIHALF(x) ((DIGIT_T)((x) >> BITS_PER_HALF_DIGIT & MAX_HALF_DIGIT))
#define TOHIGH(x) ((DIGIT_T)((x) << BITS_PER_HALF_DIGIT))

#define ISODD(x) ((x) & 0x1)
#define ISEVEN(x) (!ISODD(x))

#define mpISODD(x, n) (x[0] & 0x1)
#define mpISEVEN(x, n) (!(x[0] & 0x1))

#define mpNEXTBITMASK(mask, n) do{if(mask==1){mask=HIBITMASK;n--;}else{mask>>=1;}}while(0)

#ifdef __cplusplus
extern "C" {
#endif

char *copyright_notice(void);
	/* Forces linker to include copyright notice in executable */

/*	
 * Multiple precision calculations	
 * Using known, equal ndigits
 * except where noted
*/

/*************************/
/* ARITHMETIC OPERATIONS */
/*************************/

DIGIT_T mpAdd(DIGIT_T w[], const DIGIT_T u[], const DIGIT_T v[], size_t ndigits);
	/* Computes w = u + v, returns carry */

DIGIT_T mpSubtract(DIGIT_T w[], const DIGIT_T u[], const DIGIT_T v[], size_t ndigits);
	/* Computes w = u - v, returns borrow */

int mpMultiply(DIGIT_T w[], const DIGIT_T u[], const DIGIT_T v[], size_t ndigits);
	/* Computes product w = u * v 
	   u, v = ndigits long; w = 2 * ndigits long */

int mpDivide(DIGIT_T q[], DIGIT_T r[], const DIGIT_T u[], 
	size_t udigits, DIGIT_T v[], size_t vdigits);
	/* Computes quotient q = u / v and remainder r = u mod v 
	   q, r, u = udigits long; v = vdigits long
	   Warning: Trashes q and r first */

int mpModulo(DIGIT_T r[], const DIGIT_T u[], size_t udigits, DIGIT_T v[], size_t vdigits);
	/* Computes r = u mod v 
	   u = udigits long; r, v = vdigits long */

int mpSquare(DIGIT_T w[], const DIGIT_T x[], size_t ndigits);
	/* Computes square w = x^2
	   x = ndigits long; w = 2 * ndigits long */

int mpSqrt(DIGIT_T s[], const DIGIT_T x[], size_t ndigits);
	/* Computes integer square root s = floor(sqrt(x)) */

/*************************/
/* COMPARISON OPERATIONS */
/*************************/

int mpEqual(const DIGIT_T a[], const DIGIT_T b[], size_t ndigits);
	/* Returns true if a == b, else false */

int mpCompare(const DIGIT_T a[], const DIGIT_T b[], size_t ndigits);
	/* Returns sign of (a - b) */

int mpIsZero(const DIGIT_T a[], size_t ndigits);
	/* Returns true if a == 0, else false */

/****************************/
/* NUMBER THEORY OPERATIONS */
/****************************/

int mpModMult(DIGIT_T a[], const DIGIT_T x[], const DIGIT_T y[], const DIGIT_T m[], size_t ndigits);
	/* Computes a = (x * y) mod m */

int mpModExp(DIGIT_T y[], const DIGIT_T x[], const DIGIT_T n[], const DIGIT_T d[], size_t ndigits);
	/* Computes y = x^n mod d */

int mpModInv(DIGIT_T inv[], const DIGIT_T u[], const DIGIT_T v[], size_t ndigits);
	/*	Computes inv = u^-1 mod v */

int mpGcd(DIGIT_T g[], const DIGIT_T x[], const DIGIT_T y[], size_t ndigits);
	/* Computes g = gcd(x, y) */

/**********************/
/* BITWISE OPERATIONS */
/**********************/

DIGIT_T mpShiftLeft(DIGIT_T a[], const DIGIT_T b[], size_t x, size_t ndigits);
	/* Computes a = b << x */

DIGIT_T mpShiftRight(DIGIT_T a[], const DIGIT_T b[], size_t x, size_t ndigits);
	/* Computes a = b >> x */

void mpXorBits(DIGIT_T a[], const DIGIT_T b[], const DIGIT_T c[], size_t ndigits);
	/* Computes bitwise a = b XOR c */

void mpOrBits(DIGIT_T a[], const DIGIT_T b[], const DIGIT_T c[], size_t ndigits);
	/* Computes bitwise a = b OR c */

void mpAndBits(DIGIT_T a[], const DIGIT_T b[], const DIGIT_T c[], size_t ndigits);
	/* Computes bitwise a = b AND c */

void mpModPowerOf2(DIGIT_T a[], size_t ndigits, size_t L);
	/* Computes a = a mod 2^L */

/*************************/
/* ASSIGNMENT OPERATIONS */
/*************************/

void mpSetZero(DIGIT_T a[], size_t ndigits);
	/* Sets a = 0 */

void mpSetDigit(DIGIT_T a[], DIGIT_T d, size_t ndigits);
	/* Sets a = d where d is a single digit */

void mpSetEqual(DIGIT_T a[], const DIGIT_T b[], size_t ndigits);
	/* Sets a = b */

/**********************/
/* OTHER MP UTILITIES */
/**********************/

size_t mpSizeof(const DIGIT_T a[], size_t ndigits);
	/* Returns size i.e. number of significant non-zero digits in a */

size_t mpBitLength(const DIGIT_T a[], size_t ndigits);
	/* Returns number of significant bits in a */

int mpIsPrime(const DIGIT_T w[], size_t ndigits, size_t t);
	/* Returns true if w > 2 is a probable prime 
	   t tests using FIPS-186-2/Rabin-Miller */

int mpRabinMiller(const DIGIT_T w[], size_t ndigits, size_t t);
	/* Just the FIPS-186-2/Rabin-Miller test 
	   without trial division by small primes */

/**********************************************/
/* FUNCTIONS THAT OPERATE WITH A SINGLE DIGIT */
/**********************************************/

DIGIT_T mpShortAdd(DIGIT_T w[], const DIGIT_T u[], DIGIT_T d, size_t ndigits);
	/* Computes w = u + d, returns carry */

DIGIT_T mpShortSub(DIGIT_T w[], const DIGIT_T u[], DIGIT_T d, size_t ndigits);
	/* Computes w = u - d, returns borrow */

DIGIT_T mpShortMult(DIGIT_T p[], const DIGIT_T x[], DIGIT_T d, size_t ndigits);
	/* Computes product p = x * d */

DIGIT_T mpShortDiv(DIGIT_T q[], const DIGIT_T u[], DIGIT_T d, size_t ndigits);
	/* Computes q = u / d, returns remainder */

DIGIT_T mpShortMod(const DIGIT_T a[], DIGIT_T d, size_t ndigits);
	/* Returns r = a mod d */

int mpShortCmp(const DIGIT_T a[], DIGIT_T d, size_t ndigits);
	/* Returns sign of (a - d) where d is a single digit */

/**************************************/
/* CORE SINGLE PRECISION CALCULATIONS */
/* (double where necessary)      */
/**************************************/

/* NOTE spMultiply and spDivide are used by almost all mp functions. 
   Using the Intel MASM alternatives gives significant speed improvements
   -- to use, define USE_SPASM as a preprocessor directive and compile with
   spASM.c instead of spBigdigits.c.
*/
#ifdef USE_SPASM
	#define spMultiply spasmMultiply
	#define spDivide spasmDivide
	#pragma message("Using MASM")
	#pragma comment(exestr, "MASM Version")
#endif

int spMultiply(DIGIT_T p[2], DIGIT_T x, DIGIT_T y);
	/* Computes p = x * y */

DIGIT_T spDivide(DIGIT_T *q, DIGIT_T *r, const DIGIT_T u[2], DIGIT_T v);
	/* Computes quotient q = u / v, remainder r = u mod v */

/****************************/
/* RANDOM NUMBER FUNCTIONS  */
/* CAUTION: NOT thread-safe */
/****************************/

DIGIT_T spSimpleRand(DIGIT_T lower, DIGIT_T upper);
	/* Returns a simple pseudo-random digit between lower and upper */

/* [Version 2.1: spBetterRand moved to spRandom.h] */

/*******************/
/* PRINT UTILITIES */
/*******************/

void mpPrint(const DIGIT_T *p, size_t len);
	/* Print all digits incl leading zero digits */
void mpPrintNL(const DIGIT_T *p, size_t len);
	/* Print all digits with newlines */
void mpPrintTrim(const DIGIT_T *p, size_t len);
	/* Print but trim leading zero digits */
void mpPrintTrimNL(const DIGIT_T *p, size_t len);
	/* Print, trim leading zeroes, add newlines */

/************************/
/* CONVERSION UTILITIES */
/************************/

size_t mpConvFromOctets(DIGIT_T a[], size_t ndigits, const unsigned char *c, size_t nbytes);
	/* Converts nbytes octets into big digit a of max size ndigits
	   Returns actual number of digits set */
size_t mpConvToOctets(const DIGIT_T a[], size_t ndigits, unsigned char *c, size_t nbytes);
	/* Convert big digit a into string of octets, in big-endian order,
	   padding to nbytes or truncating if necessary.
	   Return number of non-zero octets required. */
size_t mpConvFromDecimal(DIGIT_T a[], size_t ndigits, const char *s);
	/* Convert a string in decimal format to a big digit.
	   Return actual number of (possibly zero) digits set. */
size_t mpConvToDecimal(const DIGIT_T a[], size_t ndigits, char *s, size_t smax);
	/* Convert big digit a into a string in decimal format, 
	   where s has size smax including the terminating zero.
	   Return number of chars required excluding leading zeroes. */
size_t mpConvFromHex(DIGIT_T a[], size_t ndigits, const char *s);
	/* Convert a string in hexadecimal format to a big digit.
	   Return actual number of (possibly zero) digits set. */
size_t mpConvToHex(const DIGIT_T a[], size_t ndigits, char *s, size_t smax);
	/* Convert big digit a into a string in hexadecimal format, 
	   where s has size smax including the terminating zero.
	   Return number of chars required excluding leading zeroes. */

/****************/
/* VERSION INFO */
/****************/
/* [added in ver 2.0.2] */
int mpVersion(void);
	/* Returns version number = major*1000+minor*100+release*10+uses_asm(0|1) */

/*************************************************/
/* MEMORY ALLOCATION FUNCTIONS - USED INTERNALLY */
/*************************************************/

DIGIT_T *mpAlloc(size_t ndigits);
void mpFree(DIGIT_T **p);
void mpFail(char *msg);

#ifdef __cplusplus
}
#endif

#endif	/* BIGDIGITS_H_ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品999在线播放| 久久精品国产精品亚洲精品| 成人教育av在线| 国产亚洲精品7777| 国产999精品久久| 日韩伦理av电影| 91福利在线播放| 天天影视涩香欲综合网| 91精品国产91久久久久久最新毛片| 午夜精品一区二区三区电影天堂| 337p亚洲精品色噜噜| 精品在线一区二区| 国产午夜精品一区二区 | 丝袜亚洲另类丝袜在线| 欧美视频三区在线播放| 日本中文字幕不卡| 久久精品视频免费| 色婷婷av一区二区三区大白胸| 一区二区久久久久| 日韩欧美一区二区不卡| 风间由美性色一区二区三区| 亚洲少妇中出一区| 在线不卡免费av| 成人免费视频视频在线观看免费| 亚洲图片你懂的| 日韩一二在线观看| proumb性欧美在线观看| 亚洲成人自拍偷拍| 久久久久久久久免费| 色综合久久精品| 精久久久久久久久久久| 一区二区三区四区不卡在线| 91精品国产综合久久精品app| 国产成人自拍高清视频在线免费播放| 亚洲天堂a在线| www国产成人免费观看视频 深夜成人网| 成人福利在线看| 免费成人性网站| 亚洲精品一卡二卡| 国产喂奶挤奶一区二区三区| 国产女人水真多18毛片18精品视频| 99re视频精品| 国产精品一区在线观看乱码| 亚洲一区二区不卡免费| 中文字幕第一页久久| 欧美理论电影在线| 91社区在线播放| 国产美女视频91| 日韩电影一区二区三区| 亚洲精品老司机| 国产精品久久久久久久岛一牛影视 | 国产精品夜夜嗨| 午夜婷婷国产麻豆精品| 亚洲欧洲av在线| 久久九九全国免费| 日韩一区二区电影| 欧美日本国产视频| 日本乱人伦aⅴ精品| 成人精品视频一区| 国产成人久久精品77777最新版本| 午夜激情综合网| 一区二区三区波多野结衣在线观看| 国产日韩精品一区二区三区在线| 日韩欧美一区二区在线视频| 欧美日韩国产综合一区二区 | 国产美女一区二区| 九九视频精品免费| 裸体歌舞表演一区二区| 日韩激情av在线| 五月婷婷综合在线| 天天影视涩香欲综合网| 午夜激情久久久| 无码av中文一区二区三区桃花岛| 一区二区三区在线看| 亚洲男同性恋视频| 亚洲图片欧美综合| 午夜视频在线观看一区二区| 亚洲综合免费观看高清完整版| 亚洲激情图片一区| 成人一区二区视频| 国产a区久久久| 成人免费视频视频| 一本久久精品一区二区| 色综合中文综合网| 亚洲精品乱码久久久久| 亚洲午夜电影网| 日韩中文字幕一区二区三区| 午夜在线成人av| 久久99九九99精品| 国产成人免费在线视频| av亚洲精华国产精华精| 色婷婷综合久久久久中文一区二区 | 一区二区三区在线观看网站| 亚洲乱码精品一二三四区日韩在线| 亚洲女人小视频在线观看| 亚洲综合视频在线观看| 亚洲va欧美va国产va天堂影院| 亚洲mv在线观看| 激情另类小说区图片区视频区| 国产毛片精品国产一区二区三区| 国产91丝袜在线18| 91高清视频免费看| 日韩欧美国产精品一区| 欧美国产成人在线| 一二三四区精品视频| 日韩激情av在线| 成人少妇影院yyyy| 欧美日韩精品电影| 国产拍揄自揄精品视频麻豆| 综合色中文字幕| 人人超碰91尤物精品国产| 国产电影精品久久禁18| 91成人免费电影| 精品国产乱码久久久久久夜甘婷婷 | 亚洲天堂2014| 蜜乳av一区二区三区| 成人激情开心网| 欧美日韩aaa| 国产精品乱码久久久久久 | 日本欧美在线看| 成人高清av在线| 日韩欧美亚洲国产另类| 亚洲日穴在线视频| 精品午夜一区二区三区在线观看| 99re亚洲国产精品| 久久久不卡网国产精品一区| 亚洲一线二线三线久久久| 国产精品一二三| 日韩免费成人网| 亚洲成人三级小说| 9久草视频在线视频精品| 精品国产三级电影在线观看| 亚洲欧洲精品一区二区三区不卡| 欧美a一区二区| 欧美亚洲国产一区二区三区| 久久精品亚洲乱码伦伦中文| 亚洲va欧美va天堂v国产综合| 成人av手机在线观看| 精品国产青草久久久久福利| 亚洲电影中文字幕在线观看| fc2成人免费人成在线观看播放| 精品日产卡一卡二卡麻豆| 亚洲综合丝袜美腿| 99久久精品免费| 久久理论电影网| 久久99精品久久久久久| 欧美美女一区二区在线观看| 亚洲欧美电影一区二区| 成人国产在线观看| 国产欧美一区二区精品性色超碰| 奇米色一区二区| 8x8x8国产精品| 亚洲综合在线观看视频| www.66久久| 国产精品久久福利| 国产a视频精品免费观看| 久久九九久久九九| 精品亚洲porn| 久久综合久久综合亚洲| 美女视频黄 久久| 日韩欧美中文字幕公布| 日韩电影在线一区二区| 91精品国产手机| 麻豆成人在线观看| 日韩欧美色综合网站| 久久精品久久99精品久久| 91精品久久久久久久99蜜桃 | 久久99精品久久久久婷婷| 日韩欧美高清dvd碟片| 免费观看在线色综合| 日韩欧美黄色影院| 久久国产麻豆精品| 精品国产乱码久久久久久久久| 精品综合免费视频观看| 久久久99精品免费观看不卡| 高清久久久久久| 中文字幕综合网| 在线免费观看一区| 视频一区视频二区中文| 4hu四虎永久在线影院成人| 另类中文字幕网| 国产无一区二区| 色综合久久天天综合网| 亚洲国产成人高清精品| 欧美一区二区视频网站| 国产乱子伦视频一区二区三区 | 91国偷自产一区二区三区成为亚洲经典| 亚洲欧美日韩中文播放| 欧美在线观看18| 老司机精品视频一区二区三区| 久久美女艺术照精彩视频福利播放| 成人免费观看视频| 亚洲人成影院在线观看| 欧美日韩国产区一| 国产综合色视频| 最新日韩av在线| 91精品国产欧美一区二区成人| 国产呦精品一区二区三区网站| 国产精品家庭影院| 精品视频1区2区|