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

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

?? mpi.c

?? PeerSec Networks MatrixSSL?is an embedded SSL implementation designed for small footprint applicatio
?? C
?? 第 1 頁 / 共 5 頁
字號:
	digits, etc..	The overall algorithm is as described as 14.20 from HAC but fixed to	treat these cases. */#ifdef MP_DIV_SMALLint32 mp_div(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c, mp_int * d){	mp_int	ta, tb, tq, q;	int32		res, n, n2;/*	is divisor zero ? */	if (mp_iszero (b) == 1) {		return MP_VAL;	}/*	if a < b then q=0, r = a */	if (mp_cmp_mag (a, b) == MP_LT) {		if (d != NULL) {			res = mp_copy (a, d);		} else {			res = MP_OKAY;		}		if (c != NULL) {			mp_zero (c);		}		return res;	}	/*	init our temps */	if ((res = _mp_init_multi(pool, &ta, &tb, &tq, &q, NULL, NULL, NULL, NULL) != MP_OKAY)) {		return res;	}/*	tq = 2^n,  tb == b*2^n */	mp_set(&tq, 1);	n = mp_count_bits(a) - mp_count_bits(b);	if (((res = mp_abs(a, &ta)) != MP_OKAY) ||			((res = mp_abs(b, &tb)) != MP_OKAY) || 			((res = mp_mul_2d(&tb, n, &tb)) != MP_OKAY) ||			((res = mp_mul_2d(&tq, n, &tq)) != MP_OKAY)) {      goto __ERR;	}/* old	if (((res = mp_copy(a, &ta)) != MP_OKAY) ||		((res = mp_copy(b, &tb)) != MP_OKAY) || 		((res = mp_mul_2d(&tb, n, &tb)) != MP_OKAY) ||		((res = mp_mul_2d(&tq, n, &tq)) != MP_OKAY)) {			goto LBL_ERR;	}*/	while (n-- >= 0) {		if (mp_cmp(&tb, &ta) != MP_GT) {			if (((res = mp_sub(&ta, &tb, &ta)) != MP_OKAY) ||				((res = mp_add(&q, &tq, &q)) != MP_OKAY)) {					goto LBL_ERR;			}		}		if (((res = mp_div_2d(pool, &tb, 1, &tb, NULL)) != MP_OKAY) ||			((res = mp_div_2d(pool, &tq, 1, &tq, NULL)) != MP_OKAY)) {			goto LBL_ERR;		}	}/*	now q == quotient and ta == remainder */	n  = a->sign;	n2 = (a->sign == b->sign ? MP_ZPOS : MP_NEG);	if (c != NULL) {		mp_exch(c, &q);		c->sign  = (mp_iszero(c) == MP_YES) ? MP_ZPOS : n2;	}	if (d != NULL) {		mp_exch(d, &ta);		d->sign = (mp_iszero(d) == MP_YES) ? MP_ZPOS : n;	}LBL_ERR:	_mp_clear_multi(&ta, &tb, &tq, &q, NULL, NULL, NULL, NULL);	return res;}#else /* MP_DIV_SMALL */int32 mp_div(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c, mp_int * d){	mp_int		q, x, y, t1, t2;	int32		res, n, t, i, norm, neg;/*	is divisor zero ? */	if (mp_iszero(b) == 1) {		return MP_VAL;	}/*	if a < b then q=0, r = a */	if (mp_cmp_mag(a, b) == MP_LT) {		if (d != NULL) {			res = mp_copy(a, d);		} else {			res = MP_OKAY;		}		if (c != NULL) {		mp_zero(c);		}		return res;	}	if ((res = mp_init_size(pool, &q, a->used + 2)) != MP_OKAY) {		return res;	}	q.used = a->used + 2;	if ((res = mp_init(pool, &t1)) != MP_OKAY) {		goto LBL_Q;	}	if ((res = mp_init(pool, &t2)) != MP_OKAY) {		goto LBL_T1;	}	if ((res = mp_init_copy(pool, &x, a)) != MP_OKAY) {		goto LBL_T2;	}	if ((res = mp_init_copy(pool, &y, b)) != MP_OKAY) {		goto LBL_X;	}/*	fix the sign */	neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG;	x.sign = y.sign = MP_ZPOS;/*	normalize both x and y, ensure that y >= b/2, [b == 2**DIGIT_BIT] */	norm = mp_count_bits(&y) % DIGIT_BIT;	if (norm < (int32)(DIGIT_BIT-1)) {		norm = (DIGIT_BIT-1) - norm;		if ((res = mp_mul_2d(&x, norm, &x)) != MP_OKAY) {			goto LBL_Y;		}		if ((res = mp_mul_2d(&y, norm, &y)) != MP_OKAY) {			goto LBL_Y;		}	} else {		norm = 0;	}/*	note hac does 0 based, so if used==5 then its 0,1,2,3,4, e.g. use 4 */	n = x.used - 1;	t = y.used - 1;/*	while (x >= y*b**n-t) do { q[n-t] += 1; x -= y*b**{n-t} } */	if ((res = mp_lshd(&y, n - t)) != MP_OKAY) { /* y = y*b**{n-t} */		goto LBL_Y;	}	while (mp_cmp(&x, &y) != MP_LT) {		++(q.dp[n - t]);		if ((res = mp_sub(&x, &y, &x)) != MP_OKAY) {		goto LBL_Y;		}	}/*	reset y by shifting it back down */	mp_rshd(&y, n - t);/*	step 3. for i from n down to (t + 1) */	for (i = n; i >= (t + 1); i--) {		if (i > x.used) {			continue;		}/*		step 3.1 if xi == yt then set q{i-t-1} to b-1,		otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */		if (x.dp[i] == y.dp[t]) {			q.dp[i - t - 1] = ((((mp_digit)1) << DIGIT_BIT) - 1);		} else {			mp_word tmp;			tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT);			tmp |= ((mp_word) x.dp[i - 1]);			tmp /= ((mp_word) y.dp[t]);			if (tmp > (mp_word) MP_MASK) {				tmp = MP_MASK;			}			q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK));		}/*		while (q{i-t-1} * (yt * b + y{t-1})) > 				xi * b**2 + xi-1 * b + xi-2 			do q{i-t-1} -= 1;  */		q.dp[i - t - 1] = (q.dp[i - t - 1] + 1) & MP_MASK;		do {			q.dp[i - t - 1] = (q.dp[i - t - 1] - 1) & MP_MASK;/*			find left hand */			mp_zero (&t1);			t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1];			t1.dp[1] = y.dp[t];			t1.used = 2;			if ((res = mp_mul_d (&t1, q.dp[i - t - 1], &t1)) != MP_OKAY) {				goto LBL_Y;			}/*			find right hand */			t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2];			t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1];			t2.dp[2] = x.dp[i];			t2.used = 3;		} while (mp_cmp_mag(&t1, &t2) == MP_GT);/*		step 3.3 x = x - q{i-t-1} * y * b**{i-t-1} */		if ((res = mp_mul_d(&y, q.dp[i - t - 1], &t1)) != MP_OKAY) {			goto LBL_Y;		}		if ((res = mp_lshd(&t1, i - t - 1)) != MP_OKAY) {			goto LBL_Y;		}		if ((res = mp_sub(&x, &t1, &x)) != MP_OKAY) {			goto LBL_Y;		}/*	if x < 0 then { x = x + y*b**{i-t-1}; q{i-t-1} -= 1; } */		if (x.sign == MP_NEG) {			if ((res = mp_copy(&y, &t1)) != MP_OKAY) {				goto LBL_Y;			}		if ((res = mp_lshd (&t1, i - t - 1)) != MP_OKAY) {			goto LBL_Y;		}		if ((res = mp_add (&x, &t1, &x)) != MP_OKAY) {			goto LBL_Y;		}		q.dp[i - t - 1] = (q.dp[i - t - 1] - 1UL) & MP_MASK;		}	}/*	now q is the quotient and x is the remainder 	[which we have to normalize]  *//*	get sign before writing to c */	x.sign = x.used == 0 ? MP_ZPOS : a->sign;	if (c != NULL) {		mp_clamp(&q);		mp_exch(&q, c);		c->sign = neg;	}	if (d != NULL) {		mp_div_2d(pool, &x, norm, &x, NULL);		mp_exch(&x, d);	}	res = MP_OKAY;LBL_Y:mp_clear (&y);LBL_X:mp_clear (&x);LBL_T2:mp_clear (&t2);LBL_T1:mp_clear (&t1);LBL_Q:mp_clear (&q);	return res;}#endif /* MP_DIV_SMALL *//******************************************************************************//*	multiplies |a| * |b| and only computes upto digs digits of result 	HAC pp. 595, Algorithm 14.12  Modified so you can control how many digits	of output are created. */#ifdef USE_SMALL_WORDint32 s_mp_mul_digs(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c, int32 digs){	mp_int		t;	int32			res, pa, pb, ix, iy;	mp_digit	u;	mp_word		r;	mp_digit	tmpx, *tmpt, *tmpy;/*	Can we use the fast multiplier? */	if (((digs) < MP_WARRAY) &&		MIN (a->used, b->used) < 		(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {			return fast_s_mp_mul_digs (pool, a, b, c, digs);		}		if ((res = mp_init_size(pool, &t, digs)) != MP_OKAY) {			return res;		}		t.used = digs;/*		Compute the digits of the product directly */		pa = a->used;		for (ix = 0; ix < pa; ix++) {			/* set the carry to zero */			u = 0;/*			Limit ourselves to making digs digits of output.*/			pb = MIN (b->used, digs - ix);/*			Setup some aliases. Copy of the digit from a used			within the nested loop */			tmpx = a->dp[ix];/*			An alias for the destination shifted ix places */			tmpt = t.dp + ix;/*			An alias for the digits of b */			tmpy = b->dp;/*			Compute the columns of the output and propagate the carry */			for (iy = 0; iy < pb; iy++) {				/* compute the column as a mp_word */				r       = ((mp_word)*tmpt) +					((mp_word)tmpx) * ((mp_word)*tmpy++) +					((mp_word) u);				/* the new column is the lower part of the result */				*tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));				/* get the carry word from the result */				u       = (mp_digit) (r >> ((mp_word) DIGIT_BIT));			}/*			Set carry if it is placed below digs */			if (ix + iy < digs) {				*tmpt = u;			}		}		mp_clamp (&t);		mp_exch (&t, c);		mp_clear (&t);		return MP_OKAY;}#endif /* USE_SMALL_WORD *//******************************************************************************//*	Fast (comba) multiplier	This is the fast column-array [comba] multiplier.  It is designed to	compute the columns of the product first then handle the carries afterwards.	This has the effect of making the nested loops that compute the columns	very simple and schedulable on super-scalar processors.	This has been modified to produce a variable number of digits of output so	if say only a half-product is required you don't have to compute the upper	half (a feature required for fast Barrett reduction).	Based on Algorithm 14.12 on pp.595 of HAC.*/int32 fast_s_mp_mul_digs(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c,						  int32 digs){	int32		olduse, res, pa, ix, iz, neg;	mp_digit	W[MP_WARRAY];	register	mp_word  _W;	neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG;/*	grow the destination as required */	if (c->alloc < digs) {		if ((res = mp_grow(c, digs)) != MP_OKAY) {			return res;		}	}/*	number of output digits to produce */	pa = MIN(digs, a->used + b->used);/*	clear the carry */	_W = 0;	for (ix = 0; ix < pa; ix++) { 		int32		tx, ty;		int32		iy;		mp_digit	*tmpx, *tmpy;/*		get offsets into the two bignums */		ty = MIN(b->used-1, ix);		tx = ix - ty;/*		setup temp aliases */		tmpx = a->dp + tx;		tmpy = b->dp + ty;/*		this is the number of times the loop will iterrate, essentially its		while (tx++ < a->used && ty-- >= 0) { ... } */		iy = MIN(a->used-tx, ty+1);/*		execute loop */		for (iz = 0; iz < iy; ++iz) {			_W += ((mp_word)*tmpx++)*((mp_word)*tmpy--);		}/*		store term */		W[ix] = (mp_digit)(_W & MP_MASK);/*		make next carry */		_W = _W >> ((mp_word)DIGIT_BIT);	}/*	store final carry */	W[ix] = (mp_digit)(_W & MP_MASK);/*	setup dest */	olduse  = c->used;	c->used = pa;	{		register mp_digit *tmpc;		tmpc = c->dp;		for (ix = 0; ix < pa+1; ix++) {/*			now extract the previous digit [below the carry] */			*tmpc++ = W[ix];		}/*		clear unused digits [that existed in the old copy of c] */		for (; ix < olduse; ix++) {			*tmpc++ = 0;		}	}	mp_clamp (c);	c->sign = (c->used > 0) ? neg : MP_ZPOS;	return MP_OKAY;}/******************************************************************************//*	b = a*2 */int32 mp_mul_2 (mp_int * a, mp_int * b){	int32		x, res, oldused;/*	grow to accomodate result */	if (b->alloc < a->used + 1) {		if ((res = mp_grow (b, a->used + 1)) != MP_OKAY) {			return res;		}	}	oldused = b->used;	b->used = a->used;	{		register mp_digit r, rr, *tmpa, *tmpb;		/* alias for source */		tmpa = a->dp;		/* alias for dest */		tmpb = b->dp;		/* carry */		r = 0;		for (x = 0; x < a->used; x++) {/*			get what will be the *next* carry bit from the MSB of the 			current digit  */			rr = *tmpa >> ((mp_digit)(DIGIT_BIT - 1));/*			now shift up this digit, add in the carry [from the previous] */			*tmpb++ = ((*tmpa++ << ((mp_digit)1)) | r) & MP_MASK;/*			copy the carry that would be from the source digit into the next			iteration  */			r = rr;		}/*		new leading digit? */		if (r != 0) {/*			add a MSB which is always 1 at this point */			*tmpb = 1;			++(b->used);		}/*		now zero any excess digits on the destination that we didn't write to */		tmpb = b->dp + b->used;		for (x = b->used; x < oldused; x++) {			*tmpb++ = 0;		}	}	b->sign = a->sign;	return MP_OKAY;}/******************************************************************************//*	multiply by a digit */int32 mp_mul_d(mp_int * a, mp_digit b, mp_int * c){	mp_digit	u, *tmpa, *tmpc;	mp_word		r;	int32			ix, res, olduse;/*	make sure c is big enough to hold a*b */	if (c->alloc < a->used + 1) {		if ((res = mp_grow (c, a->used + 1)) != MP_OKAY) {			return res;		}	}/*	get the original destinations used count */	olduse = c->used;/*	set the sign */	c->sign = a->sign;/*	alias for a->dp [source] */	tmpa = a->dp;/*	alias for c->dp [dest] */	tmpc = c->dp;	/* zero carry */	u = 0;	/* compute columns */	for (ix = 0; ix < a->used; ix++) {/*		compute product and carry sum for this term */		r       = ((mp_word) u) + ((mp_word)*tmpa++) * ((mp_word)b);/*		mask off higher bits to get a single digit */		*tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK));/*		send carry into next iteration */		u       = (mp_digit) (r >> ((mp_word) DIGIT_BIT));	}/*	store final carry [if any] and increment ix offset */	*tmpc++ = u;	++ix;/*	now zero digits above the top */	while (ix++ < olduse) {		*tmpc++ = 0;	}	/* set used count */	c->used = a->used + 1;	mp_clamp(c);	return MP_OKAY;}/******************************************************************************//*	low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */#ifdef USE_SMALL_WORDint32 s_mp_sqr (psPool_t *pool, mp_int * a, mp_int * b){	mp_int		t;	int32			res, ix, iy, pa;	mp_word		r;	mp_digit	u, tmpx, *tmpt;	pa = a->used;	if ((res = mp_init_size(pool, &t, 2*pa + 1)) != MP_OKAY) {		return res;	}	/*	default used is maximum possible size */	t.used = 2*pa + 1;	for (ix = 0; ix < pa; ix++) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
图片区小说区区亚洲影院| 欧美午夜不卡视频| 欧美精品一区二区三区在线 | 美女网站视频久久| 精品视频在线免费观看| 亚洲国产乱码最新视频 | 极品少妇xxxx偷拍精品少妇| 欧美私人免费视频| 亚洲午夜久久久久久久久久久 | 久久 天天综合| 91久久精品一区二区三| 夜夜爽夜夜爽精品视频| 在线观看视频一区二区| 亚洲成人福利片| 91精品国产入口在线| 午夜欧美一区二区三区在线播放| 欧美在线视频全部完| 日日夜夜一区二区| 欧美一区二区三区视频在线| 韩国一区二区三区| 中文字幕不卡的av| 色综合久久88色综合天天| 亚洲国产另类精品专区| 337p亚洲精品色噜噜狠狠| 美女一区二区久久| 国产精品网站一区| 欧美三级日韩三级国产三级| 久久aⅴ国产欧美74aaa| 国产欧美日韩麻豆91| 极品美女销魂一区二区三区| 中文字幕 久热精品 视频在线 | 欧美一级生活片| 国产成人免费视频一区| 国产偷国产偷精品高清尤物| 97久久精品人人爽人人爽蜜臀| 亚洲成人在线观看视频| 26uuu国产在线精品一区二区| 成人午夜在线播放| 亚洲小说欧美激情另类| 久久综合色之久久综合| 色中色一区二区| 久久 天天综合| 亚洲欧美乱综合| 精品国产伦理网| 在线亚洲高清视频| 国产一区二区精品久久99| 1024国产精品| 欧美tickling网站挠脚心| 欧美日韩情趣电影| 成人午夜伦理影院| 久久精品国产在热久久| 一区二区三区电影在线播| 久久品道一品道久久精品| 欧美日韩一级黄| 国产高清亚洲一区| 日本视频中文字幕一区二区三区| 一区精品在线播放| 精品国产污网站| 色播五月激情综合网| 国产美女在线观看一区| 亚洲福利视频一区二区| 18成人在线观看| 久久亚洲私人国产精品va媚药| 在线看一区二区| 不卡av在线免费观看| 久久精品免费看| 亚洲成人一区在线| 亚洲精品免费看| 国产欧美日产一区| 欧美成人精精品一区二区频| 欧美日韩精品一区视频| 成人av午夜电影| 国产91对白在线观看九色| 韩国av一区二区三区在线观看| 日韩在线卡一卡二| 一区二区视频在线看| 国产精品乱码一区二三区小蝌蚪| 欧美tk丨vk视频| 欧美电影免费观看高清完整版在 | 欧美一区二区三区白人| 欧美亚洲国产一区二区三区va | 欧美激情一区二区三区蜜桃视频| 狠狠色综合日日| 日本在线不卡视频一二三区| 亚洲男人天堂一区| 国产精品成人免费在线| 国产日韩欧美精品一区| 国产午夜精品理论片a级大结局| 精品国产乱码久久久久久老虎| 欧美一区二区女人| 欧美自拍偷拍一区| 国产精品色婷婷久久58| 中文字幕 久热精品 视频在线 | 婷婷成人综合网| 美女被吸乳得到大胸91| 国产99久久久久久免费看农村| 不卡一区中文字幕| 欧美日韩亚洲综合| 亚洲精品一区二区精华| 成人欧美一区二区三区小说| 午夜视频一区在线观看| 国内国产精品久久| 96av麻豆蜜桃一区二区| 欧美无砖专区一中文字| 精品日韩在线观看| 亚洲婷婷综合色高清在线| 天天色天天操综合| 国产精品一品视频| 欧美中文字幕一二三区视频| 欧美精品一区二区三区久久久| 中文字幕欧美一| 日本不卡高清视频| 不卡的看片网站| 日韩精品专区在线影院重磅| 国产精品麻豆网站| 麻豆国产一区二区| 99riav久久精品riav| 日韩区在线观看| 亚洲人xxxx| 国内精品视频666| 欧美日韩一区二区欧美激情| 国产欧美精品国产国产专区| 亚洲午夜在线视频| 国产成人精品www牛牛影视| 欧美少妇一区二区| 亚洲国产高清不卡| 免费国产亚洲视频| 91久久一区二区| 国产欧美日韩另类视频免费观看 | 久久精品国产久精国产| 色一情一伦一子一伦一区| 精品国产1区二区| 图片区小说区国产精品视频| 不卡一卡二卡三乱码免费网站| 日韩欧美色综合网站| 亚洲免费电影在线| 国产成人精品在线看| 91精品国产综合久久久蜜臀图片| 亚洲人成7777| 成人av在线一区二区三区| 精品国产91乱码一区二区三区 | 黑人巨大精品欧美黑白配亚洲| 欧美天堂一区二区三区| 日韩美女视频一区二区| 国产成人啪午夜精品网站男同| 欧美一区二区日韩一区二区| 亚洲高清视频的网址| 色综合色狠狠天天综合色| 中文字幕av一区二区三区高| 精品在线亚洲视频| 日韩午夜在线播放| 日韩av网站免费在线| 欧美日本韩国一区二区三区视频| 悠悠色在线精品| 91在线一区二区| 亚洲日本一区二区三区| 成年人午夜久久久| 成人欧美一区二区三区1314| 高清不卡一区二区| 国产色一区二区| 国产电影精品久久禁18| 国产欧美精品区一区二区三区| 国产精品一区二区三区乱码| 国产亚洲精品精华液| 国产传媒日韩欧美成人| 国产拍欧美日韩视频二区| 粉嫩一区二区三区在线看| 国产精品久久影院| 91首页免费视频| 亚洲综合久久av| 欧美日韩高清一区二区不卡| 日韩福利视频网| 欧美精品一区二区三区蜜桃视频| 国产精品一品二品| 日本一区二区三区久久久久久久久不 | 亚洲1区2区3区4区| 51精品视频一区二区三区| 奇米色一区二区| 精品国产乱码久久久久久久久| 国产成人亚洲综合a∨婷婷图片| 中文字幕+乱码+中文字幕一区| 91丨porny丨户外露出| 性久久久久久久久久久久| 欧美一卡二卡三卡| 国产成人自拍高清视频在线免费播放| 国产免费成人在线视频| 91国偷自产一区二区开放时间 | 免费观看在线综合| 久久奇米777| 91麻豆swag| 日韩av一级电影| 欧美国产日韩一二三区| 91精品福利视频| 秋霞电影网一区二区| 国产日韩欧美一区二区三区乱码 | 成人免费av网站| 亚洲国产精品尤物yw在线观看| 日韩视频免费直播| 成人av综合在线| 日本亚洲三级在线|