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

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

?? mpi.c

?? PeerSec Networks MatrixSSL?is an embedded SSL implementation designed for small footprint applicatio
?? C
?? 第 1 頁 / 共 5 頁
字號:
	buf    = 0;	digidx = X->used - 1;	bitcpy = 0;	bitbuf = 0;	for (;;) {/*		grab next digit as required */		if (--bitcnt == 0) {			/* if digidx == -1 we are out of digits so break */			if (digidx == -1) {				break;			}			/* read next digit and reset bitcnt */			buf    = X->dp[digidx--];			bitcnt = (int)DIGIT_BIT;		}		/* grab the next msb from the exponent */		y     = (mp_digit)(buf >> (DIGIT_BIT - 1)) & 1;		buf <<= (mp_digit)1;/*		if the bit is zero and mode == 0 then we ignore it		These represent the leading zero bits before the first 1 bit		in the exponent.  Technically this opt is not required but it		does lower the # of trivial squaring/reductions used*/		if (mode == 0 && y == 0) {			continue;		}/*		if the bit is zero and mode == 1 then we square */		if (mode == 1 && y == 0) {			if ((err = mp_sqr (pool, &res, &res)) != MP_OKAY) {				goto LBL_RES;			}			if ((err = redux (&res, P, mp)) != MP_OKAY) {				goto LBL_RES;			}			continue;		}/*		else we add it to the window */		bitbuf |= (y << (winsize - ++bitcpy));		mode    = 2;		if (bitcpy == winsize) {/*			ok window is filled so square as required and multiply			square first */			for (x = 0; x < winsize; x++) {				if ((err = mp_sqr(pool, &res, &res)) != MP_OKAY) {					goto LBL_RES;				}				if ((err = redux(&res, P, mp)) != MP_OKAY) {					goto LBL_RES;				}			}			/* then multiply */			if ((err = mp_mul(pool, &res, &M[bitbuf], &res)) != MP_OKAY) {				goto LBL_RES;			}			if ((err = redux(&res, P, mp)) != MP_OKAY) {				goto LBL_RES;			}/*			empty window and reset */			bitcpy = 0;			bitbuf = 0;			mode   = 1;		}	}/*	if bits remain then square/multiply */	if (mode == 2 && bitcpy > 0) {		/* square then multiply if the bit is set */		for (x = 0; x < bitcpy; x++) {			if ((err = mp_sqr(pool, &res, &res)) != MP_OKAY) {				goto LBL_RES;			}			if ((err = redux(&res, P, mp)) != MP_OKAY) {				goto LBL_RES;			}/*			get next bit of the window */			bitbuf <<= 1;			if ((bitbuf & (1 << winsize)) != 0) {/*				then multiply */				if ((err = mp_mul(pool, &res, &M[1], &res)) != MP_OKAY) {					goto LBL_RES;				}				if ((err = redux(&res, P, mp)) != MP_OKAY) {					goto LBL_RES;				}			}		}	}/*	fixup result if Montgomery reduction is used	recall that any value in a Montgomery system is	actually multiplied by R mod n.  So we have	to reduce one more time to cancel out the factor of R.*/	if ((err = redux(&res, P, mp)) != MP_OKAY) {		goto LBL_RES;	}/*	swap res with Y */	mp_exch(&res, Y);	err = MP_OKAY;LBL_RES:mp_clear(&res);LBL_M:	mp_clear(&M[1]);	for (x = 1<<(winsize-1); x < (1 << winsize); x++) {		mp_clear(&M[x]);	}	return err;}/******************************************************************************//*	Grow as required */int32 mp_grow (mp_int * a, int32 size){	int32			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) psRealloc(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;}/******************************************************************************//*	b = |a|	Simple function copies the input and fixes the sign to positive*/int32 mp_abs (mp_int * a, mp_int * b){	int32		res;/*	copy a to b */	if (a != b) {		if ((res = mp_copy (a, b)) != MP_OKAY) {			return res;		}	}/*	Force the sign of b to positive */	b->sign = MP_ZPOS;	return MP_OKAY;}/******************************************************************************//*	Creates "a" then copies b into it */int32 mp_init_copy(psPool_t *pool, mp_int * a, mp_int * b){	int32		res;	if ((res = mp_init(pool, a)) != MP_OKAY) {		return res;	}	return mp_copy (b, a);}/******************************************************************************//* 	Reverse an array, used for radix code */void bn_reverse (unsigned char *s, int32 len){	int32				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;	}}/******************************************************************************//*	Shift right by a certain bit count (store quotient in c, optional 	remainder in d) */int32 mp_div_2d(psPool_t *pool, mp_int * a, int32 b, mp_int * c, mp_int * d){	mp_digit	D, r, rr;	int32			x, res;	mp_int		t;/*	If the shift count is <= 0 then we do no work */	if (b <= 0) {		res = mp_copy (a, c);		if (d != NULL) {			mp_zero (d);		}		return res;	}	if ((res = mp_init(pool, &t)) != MP_OKAY) {		return res;	}/*	Get the remainder */	if (d != NULL) {		if ((res = mp_mod_2d (a, b, &t)) != MP_OKAY) {			mp_clear (&t);			return res;		}	}	/* copy */	if ((res = mp_copy (a, c)) != MP_OKAY) {		mp_clear (&t);		return res;	}/*	Shift by as many digits in the bit count */	if (b >= (int32)DIGIT_BIT) {		mp_rshd (c, b / DIGIT_BIT);	}	/* shift any bit count < DIGIT_BIT */	D = (mp_digit) (b % DIGIT_BIT);	if (D != 0) {		register mp_digit *tmpc, mask, shift;		/* mask */		mask = (((mp_digit)1) << D) - 1;		/* shift for lsb */		shift = DIGIT_BIT - D;		/* alias */		tmpc = c->dp + (c->used - 1);		/* carry */		r = 0;		for (x = c->used - 1; x >= 0; x--) {/*				Get the lower  bits of this word in a temp. */			rr = *tmpc & mask;/*			shift the current word and mix in the carry bits from the previous word */			*tmpc = (*tmpc >> D) | (r << shift);			--tmpc;/*			set the carry to the carry bits of the current word found above */			r = rr;		}	}	mp_clamp (c);	if (d != NULL) {		mp_exch (&t, d);	}	mp_clear (&t);	return MP_OKAY;}/******************************************************************************//*	copy, b = a */int32 mp_copy (mp_int * a, mp_int * b){	int32		res, n;/*	If dst == src do nothing */	if (a == b) {		return MP_OKAY;	}/*	Grow dest */	if (b->alloc < a->used) {		if ((res = mp_grow (b, a->used)) != MP_OKAY) {			return res;		}	}/*	Zero b and copy the parameters over */	{		register mp_digit *tmpa, *tmpb;		/* pointer aliases */		/* source */		tmpa = a->dp;		/* destination */		tmpb = b->dp;		/* copy all the digits */		for (n = 0; n < a->used; n++) {			*tmpb++ = *tmpa++;		}		/* clear high digits */		for (; n < b->used; n++) {			*tmpb++ = 0;		}	}/*	copy used count and sign */	b->used = a->used;	b->sign = a->sign;	return MP_OKAY;}/******************************************************************************//*	Returns the number of bits in an int32 */int32 mp_count_bits (mp_int * a){	int32			r;	mp_digit	q;/* 	Shortcut */	if (a->used == 0) {		return 0;	}/*	Get number of digits and add that. */	r = (a->used - 1) * DIGIT_BIT;/*	Take the last digit and count the bits in it. */	q = a->dp[a->used - 1];	while (q > ((mp_digit) 0)) {		++r;		q >>= ((mp_digit) 1);	}	return r;}/******************************************************************************//*	Shift left a certain amount of digits. */int32 mp_lshd (mp_int * a, int32 b){	int32		x, res;/*	If its less than zero return. */	if (b <= 0) {		return MP_OKAY;	}/*	Grow to fit the new digits. */	if (a->alloc < a->used + b) {		if ((res = mp_grow (a, a->used + b)) != MP_OKAY) {			return res;		}	}	{		register mp_digit *top, *bottom;/*		Increment the used by the shift amount then copy upwards. */		a->used += b;		/* top */		top = a->dp + a->used - 1;		/* base */		bottom = a->dp + a->used - 1 - b;/*		Much like mp_rshd this is implemented using a sliding window		except the window goes the otherway around.  Copying from		the bottom to the top.  see bn_mp_rshd.c for more info. */		for (x = a->used - 1; x >= b; x--) {			*top-- = *bottom--;		}		/* zero the lower digits */		top = a->dp;		for (x = 0; x < b; x++) {			*top++ = 0;		}	}	return MP_OKAY;}/******************************************************************************//*	Set to a digit. */void mp_set (mp_int * a, mp_digit b){	mp_zero (a);	a->dp[0] = b & MP_MASK;	a->used  = (a->dp[0] != 0) ? 1 : 0;}/******************************************************************************//*	Swap the elements of two integers, for cases where you can't simply swap 	the 	mp_int pointers around */void mp_exch (mp_int * a, mp_int * b){	mp_int		t;	t	= *a;	*a	= *b;	*b	= t;}/******************************************************************************//*	High level multiplication (handles sign) */int32 mp_mul(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c){	int32			res, neg;	int32			digs = a->used + b->used + 1;		neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG;/*	Can we use the fast multiplier?		The fast multiplier can be used if the output will have less than 	MP_WARRAY digits and the number of digits won't affect carry propagation*/	if ((digs < MP_WARRAY) && MIN(a->used, b->used) <= 			(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {		res = fast_s_mp_mul_digs(pool, a, b, c, digs);	} else {		res = s_mp_mul(pool, a, b, c);	}	c->sign = (c->used > 0) ? neg : MP_ZPOS;	return res;}/******************************************************************************//* 	c = a mod b, 0 <= c < b */int32 mp_mod(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c){	mp_int		t;	int32			res;	if ((res = mp_init(pool, &t)) != MP_OKAY) {		return res;	}	if ((res = mp_div (pool, a, b, NULL, &t)) != MP_OKAY) {		mp_clear (&t);		return res;	}	if (t.sign != b->sign) {		res = mp_add (b, &t, c);	} else {		res = MP_OKAY;		mp_exch (&t, c);	}	mp_clear (&t);	return res;}/******************************************************************************//*	shifts with subtractions when the result is greater than b.	The method is slightly modified to shift B unconditionally upto just under	the leading bit of b.  This saves alot of multiple precision shifting.*/int32 mp_montgomery_calc_normalization (mp_int * a, mp_int * b){	int32		x, bits, res;/*	How many bits of last digit does b use */	bits = mp_count_bits (b) % DIGIT_BIT;	if (b->used > 1) {		if ((res = mp_2expt(a, (b->used - 1) * DIGIT_BIT + bits - 1)) != MP_OKAY) {			return res;		}	} else {		mp_set(a, 1);		bits = 1;	}/*	Now compute C = A * B mod b */	for (x = bits - 1; x < (int32)DIGIT_BIT; x++) {		if ((res = mp_mul_2(a, a)) != MP_OKAY) {			return res;		}		if (mp_cmp_mag(a, b) != MP_LT) {			if ((res = s_mp_sub(a, b, a)) != MP_OKAY) {				return res;			}		}	}	return MP_OKAY;}/******************************************************************************//*	d = a * b (mod c) */int32 mp_mulmod(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c, mp_int * d){	int32		res;	mp_int		t;	if ((res = mp_init(pool, &t)) != MP_OKAY) {		return res;	}	if ((res = mp_mul (pool, a, b, &t)) != MP_OKAY) {		mp_clear (&t);		return res;	}	res = mp_mod (pool, &t, c, d);	mp_clear (&t);	return res;}/******************************************************************************//*	Computes b = a*a */#ifdef USE_SMALL_WORDint32 mp_sqr (psPool_t *pool, mp_int * a, mp_int * b){	int32		res;/*	Can we use the fast comba multiplier? */	if ((a->used * 2 + 1) < MP_WARRAY && a->used < 			(1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) {		res = fast_s_mp_sqr (pool, a, b);	} else {		res = s_mp_sqr (pool, a, b);	}	b->sign = MP_ZPOS;	return res;}#endif /* USE_SMALL_WORD *//******************************************************************************//* 	Computes xR**-1 == x (mod N) via Montgomery Reduction.	This is an optimized implementation of montgomery_reduce 	which uses the comba method to quickly calculate the columns of the	reduction.	Based on Algorithm 14.32 on pp.601 of HAC.*/int32 fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho){	int32		ix, res, olduse;/*	FUTURE - lower this stack usage, this is around 1K!. */	mp_word		W[MP_WARRAY];/*	Get old used count */	olduse = x->used;/*	Grow a as required */	if (x->alloc < n->used + 1) {		if ((res = mp_grow(x, n->used + 1)) != MP_OKAY) {			return res;		}	}/*	First we have to get the digits of the input into	an array of double precision words W[...] */	{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久久精品齐齐| 欧美日韩中字一区| 美腿丝袜亚洲色图| 亚洲国产sm捆绑调教视频 | 欧美男男青年gay1069videost| 亚洲国产成人tv| 五月天丁香久久| 亚洲综合成人网| 亚洲精品videosex极品| 中文字幕一区二区三区在线观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲电影一级片| 亚洲欧美一区二区久久 | 久久嫩草精品久久久精品一| 日韩三级高清在线| 制服丝袜亚洲精品中文字幕| 欧美日韩高清在线播放| 欧美色倩网站大全免费| 欧美视频一区二区在线观看| 在线亚洲一区观看| 色域天天综合网| 一本一本大道香蕉久在线精品| 成人免费av网站| 99久久精品99国产精品| 91在线免费视频观看| 成人妖精视频yjsp地址| 99久久精品免费精品国产| 99久久综合精品| 色婷婷综合五月| 一本久久a久久精品亚洲| 欧美日韩一二三| 3d动漫精品啪啪| 日韩精品一区在线| 久久综合久色欧美综合狠狠| 久久久久久久网| 亚洲男人天堂一区| 午夜久久久影院| 蜜臀精品久久久久久蜜臀| 狠狠色丁香九九婷婷综合五月 | 成人美女视频在线观看18| 国产传媒一区在线| 成人av午夜电影| 91九色02白丝porn| 欧美一区二区三区在线视频| 欧美va日韩va| 国产精品色呦呦| 一区二区三区在线视频观看| 亚洲影视在线播放| 麻豆精品在线视频| 成人国产一区二区三区精品| 在线观看免费视频综合| 日韩视频在线你懂得| 亚洲图片欧美激情| 亚洲国产成人精品视频| 极品少妇一区二区三区精品视频| www.欧美亚洲| 91麻豆精品国产91久久久 | 欧美国产日产图区| 亚洲精品高清在线| 捆绑调教一区二区三区| 91在线视频观看| 欧美日韩一卡二卡| 中文字幕第一区| 日本最新不卡在线| 成人黄色片在线观看| 制服.丝袜.亚洲.中文.综合| 中文在线免费一区三区高中清不卡| 午夜成人免费电影| 成人精品一区二区三区中文字幕| 欧美中文字幕一区二区三区| 欧美激情一区二区三区全黄| 久久精品国产精品亚洲精品| 欧美片网站yy| 亚洲视频免费在线观看| 国产成人免费在线观看不卡| 日韩精品最新网址| 天堂蜜桃一区二区三区 | 国产精品久久国产精麻豆99网站| 老色鬼精品视频在线观看播放| 欧美日韩电影在线| 亚洲狠狠丁香婷婷综合久久久| 岛国精品在线播放| 久久久一区二区三区捆绑**| 麻豆精品视频在线观看视频| 5月丁香婷婷综合| 亚洲不卡一区二区三区| 在线观看视频91| 自拍偷拍亚洲欧美日韩| aaa亚洲精品一二三区| 欧美激情一二三区| 丁香六月综合激情| 中文成人av在线| 粉嫩一区二区三区在线看| 国产亚洲精品7777| 国产精品自拍毛片| 欧美xxxxxxxxx| 久久电影网站中文字幕| 欧美大片国产精品| 精品系列免费在线观看| 精品国产人成亚洲区| 激情欧美一区二区| 久久久久久久久久看片| 国产美女视频一区| 国产欧美精品在线观看| 国产不卡在线一区| 国产精品福利av| 99在线视频精品| 亚洲女人小视频在线观看| 日本二三区不卡| 性做久久久久久久免费看| 欧美情侣在线播放| 美腿丝袜亚洲色图| 国产香蕉久久精品综合网| 国产电影一区二区三区| 中文字幕视频一区二区三区久| 99久久综合99久久综合网站| 亚洲免费伊人电影| 欧美在线啊v一区| 日日夜夜精品视频天天综合网| 欧美一区欧美二区| 精品一二三四在线| 中文字幕乱码久久午夜不卡| 色婷婷久久久综合中文字幕| 亚洲韩国精品一区| 日韩色视频在线观看| 福利一区在线观看| 亚洲免费高清视频在线| 欧美日韩精品一区视频| 久久国产生活片100| 国产精品人妖ts系列视频| 色视频一区二区| 免费人成在线不卡| 欧美国产日韩精品免费观看| 色视频一区二区| 久久国产尿小便嘘嘘| 国产精品伦理一区二区| 欧美美女黄视频| 国产精品1区2区3区| 亚洲美女免费在线| 欧美一区二区精品久久911| 国产成人精品亚洲午夜麻豆| 亚洲色图在线看| 日韩一区二区免费在线观看| 国产精品白丝av| 亚洲一区影音先锋| 久久久久久久久久电影| 色综合一区二区三区| 捆绑调教美女网站视频一区| 亚洲人快播电影网| 日韩精品自拍偷拍| 色综合久久66| 国产一区二区三区免费| 亚洲午夜久久久久久久久电影网| 精品乱码亚洲一区二区不卡| 色综合久久中文综合久久牛| 激情成人综合网| 亚洲福利一二三区| 国产欧美日韩在线| 欧美精品一卡二卡| 成人午夜电影久久影院| 日韩精品乱码免费| 亚洲日本一区二区| ww亚洲ww在线观看国产| 欧美视频一区二区在线观看| 成人在线综合网站| 麻豆国产一区二区| 一区二区三区加勒比av| 日本一区二区三区在线不卡| 制服丝袜在线91| 欧美性感一区二区三区| 国产.精品.日韩.另类.中文.在线.播放| 亚洲第一主播视频| 亚洲欧美日韩精品久久久久| 久久久久久久久久看片| 欧美一级在线观看| 欧美日韩一区二区三区四区五区| 成人va在线观看| 国产在线播放一区二区三区| 午夜久久久影院| 亚洲综合色在线| 亚洲欧洲美洲综合色网| 一区二区成人在线| 国产三级精品三级在线专区| 日韩一区二区三区视频在线观看| 欧美午夜精品免费| 91免费视频网| 成人99免费视频| 国产精品1024| 国产在线不卡一区| 精品亚洲成a人| 麻豆精品视频在线| 免费人成在线不卡| 日本不卡在线视频| 午夜久久久久久| 一二三四社区欧美黄| 亚洲九九爱视频| 亚洲精品乱码久久久久久黑人| 国产精品久久久久aaaa| 国产精品大尺度| 综合久久久久综合|