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

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

?? mpi.c

?? PeerSec Networks MatrixSSL?is an embedded SSL implementation designed for small footprint applicatio
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*		first calculate the digit at 2*ix		calculate double precision result */		r = ((mp_word) t.dp[2*ix]) +			((mp_word)a->dp[ix])*((mp_word)a->dp[ix]);/*		store lower part in result */		t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK));/*		get the carry */		u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));/*		left hand side of A[ix] * A[iy] */		tmpx = a->dp[ix];/*		alias for where to store the results */		tmpt = t.dp + (2*ix + 1);		for (iy = ix + 1; iy < pa; iy++) {/*			first calculate the product */			r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]);/*			now calculate the double precision result, note we use addition			instead of *2 since it's easier to optimize */			r       = ((mp_word) *tmpt) + r + r + ((mp_word) u);/*			store lower part */			*tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));			/* get carry */			u       = (mp_digit)(r >> ((mp_word) DIGIT_BIT));		}		/* propagate upwards */		while (u != ((mp_digit) 0)) {			r       = ((mp_word) *tmpt) + ((mp_word) u);			*tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK));			u       = (mp_digit)(r >> ((mp_word) DIGIT_BIT));		}	}	mp_clamp (&t);	mp_exch (&t, b);	mp_clear (&t);	return MP_OKAY;}#endif /* USE_SMALL_WORD *//******************************************************************************//*	fast squaring	This is the comba method where the columns of the product are computed	first then the carries are computed.  This has the effect of making a very	simple inner loop that is executed the most	W2 represents the outer products and W the inner.	A further optimizations is made because the inner products are of the 	form "A * B * 2".  The *2 part does not need to be computed until the end	which is good because 64-bit shifts are slow!	Based on Algorithm 14.16 on pp.597 of HAC.	This is the 1.0 version, but no SSE stuff*/int32 fast_s_mp_sqr(psPool_t *pool, mp_int * a, mp_int * b){	int32		olduse, res, pa, ix, iz;	mp_digit	W[MP_WARRAY], *tmpx;	mp_word		W1;/* 	grow the destination as required */	pa = a->used + a->used;	if (b->alloc < pa) {		if ((res = mp_grow(b, pa)) != MP_OKAY) {			return res;		}	}/*	number of output digits to produce */	W1 = 0;	for (ix = 0; ix < pa; ix++) { 		int32		tx, ty, iy;		mp_word		_W;		mp_digit	*tmpy;/*		clear counter */		_W = 0;/*		get offsets into the two bignums */		ty = MIN(a->used-1, ix);		tx = ix - ty;/*		setup temp aliases */		tmpx = a->dp + tx;		tmpy = a->dp + ty;/*		this is the number of times the loop will iterrate, essentially 		while (tx++ < a->used && ty-- >= 0) { ... }*/		iy = MIN(a->used-tx, ty+1);/*		now for squaring tx can never equal ty 		we halve the distance since they approach at a rate of 2x		and we have to round because odd cases need to be executed*/		iy = MIN(iy, (ty-tx+1)>>1);/*		execute loop */		for (iz = 0; iz < iy; iz++) {			 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--);		}/*		double the inner product and add carry */		_W = _W + _W + W1;/*		even columns have the square term in them */		if ((ix&1) == 0) {			_W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]);		}/*		store it */		W[ix] = (mp_digit)(_W & MP_MASK);/*		make next carry */		W1 = _W >> ((mp_word)DIGIT_BIT);	}/*	setup dest */	olduse  = b->used;	b->used = a->used+a->used;	{		mp_digit *tmpb;		tmpb = b->dp;		for (ix = 0; ix < pa; ix++) {			*tmpb++ = W[ix] & MP_MASK;		}/*		clear unused digits [that existed in the old copy of c] */		for (; ix < olduse; ix++) {			*tmpb++ = 0;		}	}	mp_clamp(b);	return MP_OKAY;}/******************************************************************************//*	computes a = 2**b 	Simple algorithm which zeroes the int32, grows it then just sets one bit	as required. */int32 mp_2expt (mp_int * a, int32 b){	int32		res;/*	zero a as per default */	mp_zero (a);/*	grow a to accomodate the single bit */	if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) {		return res;	}/*	set the used count of where the bit will go */	a->used = b / DIGIT_BIT + 1;/*	put the single bit in its place */	a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT);	return MP_OKAY;}/******************************************************************************//*	init an mp_init for a given size */int32 mp_init_size(psPool_t *pool, mp_int * a, int32 size){	int		x;/*	pad size so there are always extra digits */	size += (MP_PREC * 2) - (size % MP_PREC);	/*	alloc mem */	a->dp = OPT_CAST(mp_digit) psMalloc(pool, sizeof (mp_digit) * size);	if (a->dp == NULL) {		return MP_MEM;	}	a->used  = 0;	a->alloc = size;	a->sign  = MP_ZPOS;/*	zero the digits */	for (x = 0; x < size; x++) {		a->dp[x] = 0;	}	return MP_OKAY;}/******************************************************************************//*	low level addition, based on HAC pp.594, Algorithm 14.7 */int32 s_mp_add (mp_int * a, mp_int * b, mp_int * c){	mp_int		*x;	int32			olduse, res, min, max;/*	find sizes, we let |a| <= |b| which means we have to sort them.  "x" will	point to the input with the most digits */	if (a->used > b->used) {		min = b->used;		max = a->used;		x = a;	} else {		min = a->used;		max = b->used;		x = b;	}	/* init result */	if (c->alloc < max + 1) {		if ((res = mp_grow (c, max + 1)) != MP_OKAY) {			return res;		}	}/*	get old used digit count and set new one */	olduse = c->used;	c->used = max + 1;	{		register mp_digit u, *tmpa, *tmpb, *tmpc;		register int32 i;		/* alias for digit pointers */		/* first input */		tmpa = a->dp;		/* second input */		tmpb = b->dp;		/* destination */		tmpc = c->dp;		/* zero the carry */		u = 0;		for (i = 0; i < min; i++) {/*			Compute the sum at one digit, T[i] = A[i] + B[i] + U */			*tmpc = *tmpa++ + *tmpb++ + u;/*			U = carry bit of T[i] */			u = *tmpc >> ((mp_digit)DIGIT_BIT);/*			take away carry bit from T[i] */			*tmpc++ &= MP_MASK;		}/*		now copy higher words if any, that is in A+B if A or B has more digits add		those in  */		if (min != max) {			for (; i < max; i++) {				/* T[i] = X[i] + U */				*tmpc = x->dp[i] + u;				/* U = carry bit of T[i] */				u = *tmpc >> ((mp_digit)DIGIT_BIT);				/* take away carry bit from T[i] */				*tmpc++ &= MP_MASK;			}		}		/* add carry */		*tmpc++ = u;/*		clear digits above oldused */		for (i = c->used; i < olduse; i++) {			*tmpc++ = 0;		}	}	mp_clamp (c);	return MP_OKAY;}/******************************************************************************/#ifdef USE_SMALL_WORD/*	FUTURE - this is never needed, SLOW or not, because RSA exponents are	always odd. */int32 mp_invmod(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c){	mp_int		x, y, u, v, A, B, C, D;	int32			res;/*	b cannot be negative */	if (b->sign == MP_NEG || mp_iszero(b) == 1) {		return MP_VAL;	}/*	if the modulus is odd we can use a faster routine instead */	if (mp_isodd (b) == 1) {		return fast_mp_invmod(pool, a, b, c);	}/*	init temps */	if ((res = _mp_init_multi(pool, &x, &y, &u, &v,			&A, &B, &C, &D)) != MP_OKAY) {		return res;	}	/* x = a, y = b */	if ((res = mp_copy(a, &x)) != MP_OKAY) {		goto LBL_ERR;	}	if ((res = mp_copy(b, &y)) != MP_OKAY) {		goto LBL_ERR;	}/*	2. [modified] if x,y are both even then return an error! */	if (mp_iseven(&x) == 1 && mp_iseven (&y) == 1) {		res = MP_VAL;		goto LBL_ERR;	}/*	3. u=x, v=y, A=1, B=0, C=0,D=1 */	if ((res = mp_copy(&x, &u)) != MP_OKAY) {		goto LBL_ERR;	}	if ((res = mp_copy(&y, &v)) != MP_OKAY) {		goto LBL_ERR;	}	mp_set (&A, 1);	mp_set (&D, 1);top:/*	4.  while u is even do */	while (mp_iseven(&u) == 1) {		/* 4.1 u = u/2 */		if ((res = mp_div_2(&u, &u)) != MP_OKAY) {		goto LBL_ERR;		}		/* 4.2 if A or B is odd then */		if (mp_isodd (&A) == 1 || mp_isodd (&B) == 1) {			/* A = (A+y)/2, B = (B-x)/2 */			if ((res = mp_add(&A, &y, &A)) != MP_OKAY) {				goto LBL_ERR;			}			if ((res = mp_sub(&B, &x, &B)) != MP_OKAY) {				goto LBL_ERR;			}		}		/* A = A/2, B = B/2 */		if ((res = mp_div_2(&A, &A)) != MP_OKAY) {			goto LBL_ERR;		}		if ((res = mp_div_2(&B, &B)) != MP_OKAY) {			goto LBL_ERR;		}	}/*	5.  while v is even do */	while (mp_iseven(&v) == 1) {		/* 5.1 v = v/2 */		if ((res = mp_div_2(&v, &v)) != MP_OKAY) {		goto LBL_ERR;		}		/* 5.2 if C or D is odd then */		if (mp_isodd(&C) == 1 || mp_isodd (&D) == 1) {			/* C = (C+y)/2, D = (D-x)/2 */			if ((res = mp_add(&C, &y, &C)) != MP_OKAY) {				goto LBL_ERR;			}			if ((res = mp_sub(&D, &x, &D)) != MP_OKAY) {				goto LBL_ERR;			}		}		/* C = C/2, D = D/2 */		if ((res = mp_div_2(&C, &C)) != MP_OKAY) {			goto LBL_ERR;		}		if ((res = mp_div_2(&D, &D)) != MP_OKAY) {			goto LBL_ERR;		}	}/*	6.  if u >= v then */	if (mp_cmp(&u, &v) != MP_LT) {		/* u = u - v, A = A - C, B = B - D */		if ((res = mp_sub(&u, &v, &u)) != MP_OKAY) {		goto LBL_ERR;		}		if ((res = mp_sub(&A, &C, &A)) != MP_OKAY) {		goto LBL_ERR;		}		if ((res = mp_sub(&B, &D, &B)) != MP_OKAY) {		goto LBL_ERR;		}	} else {		/* v - v - u, C = C - A, D = D - B */		if ((res = mp_sub(&v, &u, &v)) != MP_OKAY) {		goto LBL_ERR;		}		if ((res = mp_sub(&C, &A, &C)) != MP_OKAY) {		goto LBL_ERR;		}		if ((res = mp_sub(&D, &B, &D)) != MP_OKAY) {		goto LBL_ERR;		}	}/*	if not zero goto step 4 */	if (mp_iszero(&u) == 0)		goto top;/*	now a = C, b = D, gcd == g*v *//*	if v != 1 then there is no inverse */	if (mp_cmp_d(&v, 1) != MP_EQ) {		res = MP_VAL;		goto LBL_ERR;	}/*	if its too low */	while (mp_cmp_d(&C, 0) == MP_LT) {		if ((res = mp_add(&C, b, &C)) != MP_OKAY) {			goto LBL_ERR;		}	}/*	too big */	while (mp_cmp_mag(&C, b) != MP_LT) {		if ((res = mp_sub(&C, b, &C)) != MP_OKAY) {			goto LBL_ERR;		}	}/*	C is now the inverse */	mp_exch(&C, c);	res = MP_OKAY;LBL_ERR:_mp_clear_multi(&x, &y, &u, &v, &A, &B, &C, &D);	return res;}#endif /* USE_SMALL_WORD *//******************************************************************************//* *	Computes the modular inverse via binary extended euclidean algorithm, *	that is c = 1/a mod b  * * Based on slow invmod except this is optimized for the case where b is  * odd as per HAC Note 14.64 on pp. 610 */int32 fast_mp_invmod(psPool_t *pool, mp_int * a, mp_int * b, mp_int * c){	mp_int		x, y, u, v, B, D;	int32			res, neg;/*	2. [modified] b must be odd */	if (mp_iseven (b) == 1) {		return MP_VAL;	}/*	init all our temps */	if ((res = _mp_init_multi(pool, &x, &y, &u, &v, &B, &D, NULL, NULL)) != MP_OKAY) {		return res;	}/*	x == modulus, y == value to invert */	if ((res = mp_copy(b, &x)) != MP_OKAY) {		goto LBL_ERR;	}/*	we need y = |a| */	if ((res = mp_mod(pool, a, b, &y)) != MP_OKAY) {		goto LBL_ERR;	}/*	3. u=x, v=y, A=1, B=0, C=0,D=1 */	if ((res = mp_copy(&x, &u)) != MP_OKAY) {		goto LBL_ERR;	}	if ((res = mp_copy(&y, &v)) != MP_OKAY) {		goto LBL_ERR;	}	mp_set(&D, 1);top:/*	4.  while u is even do*/	while (mp_iseven(&u) == 1) {		/* 4.1 u = u/2 */		if ((res = mp_div_2(&u, &u)) != MP_OKAY) {			goto LBL_ERR;		}		/* 4.2 if B is odd then */		if (mp_isodd(&B) == 1) {			if ((res = mp_sub(&B, &x, &B)) != MP_OKAY) {				goto LBL_ERR;			}		}		/* B = B/2 */		if ((res = mp_div_2(&B, &B)) != MP_OKAY) {			goto LBL_ERR;		}	}/*	5.  while v is even do */	while (mp_iseven(&v) == 1) {		/* 5.1 v = v/2 */		if ((res = mp_div_2(&v, &v)) != MP_OKAY) {			goto LBL_ERR;		}		/* 5.2 if D is odd then */		if (mp_isodd(&D) == 1) {			/* D = (D-x)/2 */			if ((res = mp_sub(&D, &x, &D)) != MP_OKAY) {				goto LBL_ERR;			}		}		/* D = D/2 */		if ((res = mp_div_2(&D, &D)) != MP_OKAY) {			goto LBL_ERR;		}	}/*	6.  if u >= v then */	if (mp_cmp(&u, &v) != MP_LT) {		/* u = u - v, B = B - D */		if ((res = mp_sub(&u, &v, &u)) != MP_OKAY) {			goto LBL_ERR;		}		if ((res = mp_sub(&B, &D, &B)) != MP_OKAY) {			goto LBL_ERR;		}	} else {		/* v - v - u, D = D - B */		if ((res = mp_sub(&v, &u, &v)) != MP_OKAY) {			goto LBL_ERR;		}		if ((res = mp_sub(&D, &B, &D)) != MP_OKAY) {		goto LBL_ERR;		}	}/*	if not zero goto step 4 */	if (mp_iszero(&u) == 0) {		goto top;	}/*	now a = C, b = D, gcd == g*v *//*	if v != 1 then there is no inverse */	if (mp_cmp_d(&v, 1) !=

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线播| 国产精品系列在线播放| 国产精品一区二区久久不卡| 91免费看视频| 久久网站热最新地址| 日日夜夜精品视频天天综合网| 国产91精品一区二区| 91.xcao| 综合电影一区二区三区| 韩国中文字幕2020精品| 欧美一区二区三区在| 亚洲综合清纯丝袜自拍| 成人av网站免费观看| 欧美成人乱码一区二区三区| 五月综合激情婷婷六月色窝| 不卡一区中文字幕| 久久精品视频一区二区三区| 青青草原综合久久大伊人精品 | 久久夜色精品国产欧美乱极品| 亚洲成人午夜电影| 91麻豆精品一区二区三区| 国产精品久久福利| 成人精品gif动图一区| 国产婷婷一区二区| 国产专区综合网| xfplay精品久久| 激情综合色播激情啊| 欧美一区二区久久久| 日韩av成人高清| 91精品国产入口在线| 香港成人在线视频| 欧美精品一二三四| 蜜臀av一级做a爰片久久| 91精品国产91久久综合桃花| 日产国产欧美视频一区精品| 欧美日韩aaaaaa| 奇米色一区二区| 精品久久久久久久久久久久包黑料| 日韩av中文字幕一区二区三区| 欧美一区二区女人| 国产一区二区三区视频在线播放| 精品国免费一区二区三区| 精品在线你懂的| 国产精品美女一区二区| 91原创在线视频| 亚洲高清视频的网址| 欧美人狂配大交3d怪物一区| 蜜臀精品久久久久久蜜臀| 精品国产免费人成在线观看| 国产精品原创巨作av| 国产精品国产三级国产三级人妇| 一本到不卡免费一区二区| 午夜欧美在线一二页| 欧美一级日韩不卡播放免费| 国产成人丝袜美腿| 亚洲精品视频一区| 91精品视频网| 国产成人精品一区二| 一区二区在线观看免费| 91精品国产色综合久久| 成人av免费观看| 亚洲午夜免费视频| www成人在线观看| 日本丶国产丶欧美色综合| 偷偷要91色婷婷| 欧美国产日韩a欧美在线观看| 97se亚洲国产综合在线| 日本强好片久久久久久aaa| 国产精品色一区二区三区| 欧美日韩在线精品一区二区三区激情| 人妖欧美一区二区| 亚洲欧洲av色图| 日韩精品一区二区三区中文精品| 97精品国产97久久久久久久久久久久 | 亚洲午夜影视影院在线观看| 2020国产精品| 色激情天天射综合网| 激情综合一区二区三区| 亚洲福利电影网| 亚洲国产精品成人综合| 欧美一区二区精品久久911| 99久久精品费精品国产一区二区| 美腿丝袜亚洲一区| 亚洲精品免费视频| 久久久久久电影| 欧美一区二区黄| 欧美亚男人的天堂| 成人激情午夜影院| 国产呦精品一区二区三区网站| 午夜精品久久久久久| 国产精品素人视频| 日韩一区二区三| 欧美乱熟臀69xxxxxx| 日本道色综合久久| 99久久国产综合精品女不卡| 国产中文一区二区三区| 日本伊人色综合网| 亚洲mv在线观看| 亚洲制服丝袜av| 亚洲精品综合在线| 国产精品短视频| 国产欧美日韩三级| 亚洲国产精品成人综合色在线婷婷| 精品国产乱码久久久久久图片| 91精品国产综合久久精品| 欧美日韩中字一区| 欧美在线观看一区| 91久久精品网| 欧美亚男人的天堂| 欧美三级韩国三级日本一级| 色狠狠av一区二区三区| 9i看片成人免费高清| 99久久婷婷国产综合精品| jiyouzz国产精品久久| 成人中文字幕在线| 丁香亚洲综合激情啪啪综合| 国产成人精品午夜视频免费| 粉嫩久久99精品久久久久久夜| 国产精品亚洲综合一区在线观看| 国产成人午夜视频| 不卡欧美aaaaa| 91亚洲永久精品| 欧美亚洲综合色| 91精品国产91久久综合桃花| 欧美变态凌虐bdsm| 久久久www免费人成精品| 久久精品人人做人人爽97| 国产日产欧美一区| 国产精品色哟哟网站| 亚洲精品自拍动漫在线| 日日夜夜免费精品| 国产在线视频一区二区| 风间由美一区二区三区在线观看 | jvid福利写真一区二区三区| 91麻豆蜜桃一区二区三区| 欧美中文字幕一区二区三区亚洲| 欧美日韩久久久一区| 777精品伊人久久久久大香线蕉| 欧美一卡二卡在线观看| 国产亚洲成年网址在线观看| 中文字幕在线观看不卡| 亚洲一区二区四区蜜桃| 久久精品国产精品亚洲红杏| 成人性生交大合| 欧美性大战久久| 精品国产乱码久久久久久夜甘婷婷 | 久久精品国产亚洲一区二区三区 | 国产精品三级视频| 亚洲成av人片一区二区| 国产真实乱偷精品视频免| 色综合久久中文字幕| 日韩免费观看2025年上映的电影| 国产欧美日韩综合| 日韩精品一级中文字幕精品视频免费观看 | 免费在线观看不卡| av资源站一区| 日韩精品最新网址| 亚洲欧美日本韩国| 亚洲国产日韩一区二区| 久久精品国产精品亚洲综合| 色哟哟精品一区| 精品国产伦理网| 亚洲一区免费在线观看| 国产福利一区在线观看| 欧美丰满嫩嫩电影| 亚洲欧美日韩国产另类专区| 美国十次了思思久久精品导航| 99国产精品久久久久久久久久久 | 亚洲人午夜精品天堂一二香蕉| 麻豆精品一区二区av白丝在线| 色综合天天综合色综合av| 日韩美女视频在线| 亚洲高清免费观看| 国产成人自拍在线| 日韩视频在线你懂得| 亚洲成人手机在线| 在线免费不卡电影| 中文字幕免费观看一区| 美美哒免费高清在线观看视频一区二区 | 欧美三级日本三级少妇99| 国产精品成人在线观看| 国产精品一卡二| 日韩欧美国产电影| 亚洲成a人在线观看| 在线一区二区三区四区| 亚洲桃色在线一区| 成人aa视频在线观看| 欧美激情一区二区在线| 国产九色精品成人porny| 亚洲精品一区二区三区四区高清| 丝袜美腿亚洲一区| 欧美精品一卡二卡| 天堂蜜桃91精品| 7799精品视频| 日本成人在线电影网| 欧美一级久久久久久久大片| 日本视频中文字幕一区二区三区| 制服丝袜亚洲色图| 久久国产夜色精品鲁鲁99| 91精品国产综合久久福利|