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

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

?? bn_exp.c

?? LINUX AU12XX BOOTLADER
?? C
?? 第 1 頁 / 共 2 頁
字號:
	j = 1 << (window - 1);	for (i = 1; i < j; i++) {	    BN_init(&val[i]);	    if (!BN_mod_mul_reciprocal		(&(val[i]), &(val[i - 1]), aa, &recp, ctx))		goto err;	}	ts = i;    }    start = 1;			/* This is used to avoid multiplication etc				 * when there is only the value '1' in the				 * buffer. */    wvalue = 0;			/* The 'value' of the window */    wstart = bits - 1;		/* The top bit of the window */    wend = 0;			/* The bottom bit of the window */    if (!BN_one(r))	goto err;    for (;;) {	if (BN_is_bit_set(p, wstart) == 0) {	    if (!start)		if (!BN_mod_mul_reciprocal(r, r, r, &recp, ctx))		    goto err;	    if (wstart == 0)		break;	    wstart--;	    continue;	}	/* We now have wstart on a 'set' bit, we now need to work out	 * how bit a window to do.  To do this we need to scan	 * forward until the last set bit before the end of the	 * window */	j = wstart;	wvalue = 1;	wend = 0;	for (i = 1; i < window; i++) {	    if (wstart - i < 0)		break;	    if (BN_is_bit_set(p, wstart - i)) {		wvalue <<= (i - wend);		wvalue |= 1;		wend = i;	    }	}	/* wend is the size of the current window */	j = wend + 1;	/* add the 'bytes above' */	if (!start)	    for (i = 0; i < j; i++) {		if (!BN_mod_mul_reciprocal(r, r, r, &recp, ctx))		    goto err;	    }	/* wvalue will be an odd number < 2^window */	if (!BN_mod_mul_reciprocal(r, r, &(val[wvalue >> 1]), &recp, ctx))	    goto err;	/* move the 'window' down further */	wstart -= wend + 1;	wvalue = 0;	start = 0;	if (wstart < 0)	    break;    }    ret = 1;  err:    BN_CTX_end(ctx);    for (i = 0; i < ts; i++)	BN_clear_free(&(val[i]));    BN_RECP_CTX_free(&recp);    return (ret);}int BN_mod_exp_mont(BIGNUM * rr, BIGNUM * a, const BIGNUM * p,		    const BIGNUM * m, BN_CTX * ctx, BN_MONT_CTX * in_mont){    int i, j, bits, ret = 0, wstart, wend, window, wvalue;    int start = 1, ts = 0;    BIGNUM *d, *r;    BIGNUM *aa;    BN_MONT_CTX *mont = NULL;#ifdef ORIGINAL_SSL_CODE    BIGNUM val[TABLE_SIZE];#else    BIGNUM *val =	(BIGNUM *) sps_dve_get_valbuf(sizeof(BIGNUM) * TABLE_SIZE);#endif    bn_check_top(a);    bn_check_top(p);    bn_check_top(m);#ifdef ATALLA    if (!tried_atalla && BN_mod_exp_atalla(rr, a, p, m))	return 1;/* If it fails, try the other methods */#endif    if (!(m->d[0] & 1)) {	BNerr(BN_F_BN_MOD_EXP_MONT, BN_R_CALLED_WITH_EVEN_MODULUS);	return (0);    }    bits = BN_num_bits(p);    if (bits == 0) {	BN_one(rr);	return (1);    }    BN_CTX_start(ctx);    d = BN_CTX_get(ctx);    r = BN_CTX_get(ctx);    if (d == NULL || r == NULL)	goto err;    /* If this is not done, things will break in the montgomery     * part */    if (in_mont != NULL)	mont = in_mont;    else {	if ((mont = BN_MONT_CTX_new()) == NULL)	    goto err;	if (!BN_MONT_CTX_set(mont, m, ctx))	    goto err;    }    BN_init(&val[0]);    ts = 1;    if (BN_ucmp(a, m) >= 0) {	if (!BN_mod(&(val[0]), a, m, ctx))	    goto err;	aa = &(val[0]);    } else	aa = a;    if (!BN_to_montgomery(&(val[0]), aa, mont, ctx))	goto err;		/* 1 */    window = BN_window_bits_for_exponent_size(bits);    if (window > 1) {	if (!BN_mod_mul_montgomery(d, &(val[0]), &(val[0]), mont, ctx))	    goto err;		/* 2 */	j = 1 << (window - 1);	for (i = 1; i < j; i++) {	    BN_init(&(val[i]));	    if (!BN_mod_mul_montgomery		(&(val[i]), &(val[i - 1]), d, mont, ctx))		goto err;	}	ts = i;    }    start = 1;			/* This is used to avoid multiplication etc				 * when there is only the value '1' in the				 * buffer. */    wvalue = 0;			/* The 'value' of the window */    wstart = bits - 1;		/* The top bit of the window */    wend = 0;			/* The bottom bit of the window */    if (!BN_to_montgomery(r, BN_value_one(), mont, ctx))	goto err;    for (;;) {	if (BN_is_bit_set(p, wstart) == 0) {	    if (!start) {		if (!BN_mod_mul_montgomery(r, r, r, mont, ctx))		    goto err;	    }	    if (wstart == 0)		break;	    wstart--;	    continue;	}	/* We now have wstart on a 'set' bit, we now need to work out	 * how bit a window to do.  To do this we need to scan	 * forward until the last set bit before the end of the	 * window */	j = wstart;	wvalue = 1;	wend = 0;	for (i = 1; i < window; i++) {	    if (wstart - i < 0)		break;	    if (BN_is_bit_set(p, wstart - i)) {		wvalue <<= (i - wend);		wvalue |= 1;		wend = i;	    }	}	/* wend is the size of the current window */	j = wend + 1;	/* add the 'bytes above' */	if (!start)	    for (i = 0; i < j; i++) {		if (!BN_mod_mul_montgomery(r, r, r, mont, ctx))		    goto err;	    }	/* wvalue will be an odd number < 2^window */	if (!BN_mod_mul_montgomery(r, r, &(val[wvalue >> 1]), mont, ctx))	    goto err;	/* move the 'window' down further */	wstart -= wend + 1;	wvalue = 0;	start = 0;	if (wstart < 0)	    break;    }    if (!BN_from_montgomery(rr, r, mont, ctx))	goto err;    ret = 1;  err:    if ((in_mont == NULL) && (mont != NULL))	BN_MONT_CTX_free(mont);    BN_CTX_end(ctx);    for (i = 0; i < ts; i++)	BN_clear_free(&(val[i]));    return (ret);}int BN_mod_exp_mont_word(BIGNUM * rr, BN_ULONG a, const BIGNUM * p,			 const BIGNUM * m, BN_CTX * ctx,			 BN_MONT_CTX * in_mont){    BN_MONT_CTX *mont = NULL;    int b, bits, ret = 0;    int r_is_one;    BN_ULONG w, next_w;    BIGNUM *d, *r, *t;    BIGNUM *swap_tmp;#define BN_MOD_MUL_WORD(r, w, m) \		(BN_mul_word(r, (w)) && \		(/* BN_ucmp(r, (m)) < 0 ? 1 :*/  \			(BN_mod(t, r, m, ctx) && (swap_tmp = r, r = t, t = swap_tmp, 1))))    /* BN_MOD_MUL_WORD is only used with 'w' large,     * so the BN_ucmp test is probably more overhead     * than always using BN_mod (which uses BN_copy if     * a similar test returns true). */#define BN_TO_MONTGOMERY_WORD(r, w, mont) \		(BN_set_word(r, (w)) && BN_to_montgomery(r, r, (mont), ctx))    bn_check_top(p);    bn_check_top(m);    if (!(m->d[0] & 1)) {	BNerr(BN_F_BN_MOD_EXP_MONT_WORD, BN_R_CALLED_WITH_EVEN_MODULUS);	return (0);    }    bits = BN_num_bits(p);    if (bits == 0) {	BN_one(rr);	return (1);    }    BN_CTX_start(ctx);    d = BN_CTX_get(ctx);    r = BN_CTX_get(ctx);    t = BN_CTX_get(ctx);    if (d == NULL || r == NULL || t == NULL)	goto err;#ifdef ATALLA    if (!tried_atalla) {	BN_set_word(t, a);	if (BN_mod_exp_atalla(rr, t, p, m)) {	    BN_CTX_end(ctx);	    return 1;	}    }/* If it fails, try the other methods */#endif    if (in_mont != NULL)	mont = in_mont;    else {	if ((mont = BN_MONT_CTX_new()) == NULL)	    goto err;	if (!BN_MONT_CTX_set(mont, m, ctx))	    goto err;    }    r_is_one = 1;		/* except for Montgomery factor */    /* bits-1 >= 0 */    /* The result is accumulated in the product r*w. */    w = a;			/* bit 'bits-1' of 'p' is always set */    for (b = bits - 2; b >= 0; b--) {	/* First, square r*w. */	next_w = w * w;	if ((next_w / w) != w) {	/* overflow */	    if (r_is_one) {		if (!BN_TO_MONTGOMERY_WORD(r, w, mont))		    goto err;		r_is_one = 0;	    } else {		if (!BN_MOD_MUL_WORD(r, w, m))		    goto err;	    }	    next_w = 1;	}	w = next_w;	if (!r_is_one) {	    if (!BN_mod_mul_montgomery(r, r, r, mont, ctx))		goto err;	}	/* Second, multiply r*w by 'a' if exponent bit is set. */	if (BN_is_bit_set(p, b)) {	    next_w = w * a;	    if ((next_w / a) != w) {	/* overflow */		if (r_is_one) {		    if (!BN_TO_MONTGOMERY_WORD(r, w, mont))			goto err;		    r_is_one = 0;		} else {		    if (!BN_MOD_MUL_WORD(r, w, m))			goto err;		}		next_w = a;	    }	    w = next_w;	}    }    /* Finally, set r:=r*w. */    if (w != 1) {	if (r_is_one) {	    if (!BN_TO_MONTGOMERY_WORD(r, w, mont))		goto err;	    r_is_one = 0;	} else {	    if (!BN_MOD_MUL_WORD(r, w, m))		goto err;	}    }    if (r_is_one) {		/* can happen only if a == 1 */	if (!BN_one(rr))	    goto err;    } else {	if (!BN_from_montgomery(rr, r, mont, ctx))	    goto err;    }    ret = 1;  err:    if ((in_mont == NULL) && (mont != NULL))	BN_MONT_CTX_free(mont);    BN_CTX_end(ctx);    return (ret);}/* The old fallback, simple version :-) */int BN_mod_exp_simple(BIGNUM * r, BIGNUM * a, BIGNUM * p, BIGNUM * m,		      BN_CTX * ctx){    int i, j, bits, ret = 0, wstart, wend, window, wvalue, ts = 0;    int start = 1;    BIGNUM *d;#ifdef ORIGINAL_SSL_CODE    BIGNUM val[TABLE_SIZE];#else    BIGNUM *val =	(BIGNUM *) sps_dve_get_valbuf(sizeof(BIGNUM) * TABLE_SIZE);#endif    bits = BN_num_bits(p);    if (bits == 0) {	BN_one(r);	return (1);    }    BN_CTX_start(ctx);    if ((d = BN_CTX_get(ctx)) == NULL)	goto err;    BN_init(&(val[0]));    ts = 1;    if (!BN_mod(&(val[0]), a, m, ctx))	goto err;		/* 1 */    window = BN_window_bits_for_exponent_size(bits);    if (window > 1) {	if (!BN_mod_mul(d, &(val[0]), &(val[0]), m, ctx))	    goto err;		/* 2 */	j = 1 << (window - 1);	for (i = 1; i < j; i++) {	    BN_init(&(val[i]));	    if (!BN_mod_mul(&(val[i]), &(val[i - 1]), d, m, ctx))		goto err;	}	ts = i;    }    start = 1;			/* This is used to avoid multiplication etc				 * when there is only the value '1' in the				 * buffer. */    wvalue = 0;			/* The 'value' of the window */    wstart = bits - 1;		/* The top bit of the window */    wend = 0;			/* The bottom bit of the window */    if (!BN_one(r))	goto err;    for (;;) {	if (BN_is_bit_set(p, wstart) == 0) {	    if (!start)		if (!BN_mod_mul(r, r, r, m, ctx))		    goto err;	    if (wstart == 0)		break;	    wstart--;	    continue;	}	/* We now have wstart on a 'set' bit, we now need to work out	 * how bit a window to do.  To do this we need to scan	 * forward until the last set bit before the end of the	 * window */	j = wstart;	wvalue = 1;	wend = 0;	for (i = 1; i < window; i++) {	    if (wstart - i < 0)		break;	    if (BN_is_bit_set(p, wstart - i)) {		wvalue <<= (i - wend);		wvalue |= 1;		wend = i;	    }	}	/* wend is the size of the current window */	j = wend + 1;	/* add the 'bytes above' */	if (!start)	    for (i = 0; i < j; i++) {		if (!BN_mod_mul(r, r, r, m, ctx))		    goto err;	    }	/* wvalue will be an odd number < 2^window */	if (!BN_mod_mul(r, r, &(val[wvalue >> 1]), m, ctx))	    goto err;	/* move the 'window' down further */	wstart -= wend + 1;	wvalue = 0;	start = 0;	if (wstart < 0)	    break;    }    ret = 1;  err:    BN_CTX_end(ctx);    for (i = 0; i < ts; i++)	BN_clear_free(&(val[i]));    return (ret);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产不卡免费视频| 欧美日韩久久久| 国产精品自在在线| 美女在线视频一区| 午夜私人影院久久久久| 香蕉久久一区二区不卡无毒影院| 亚洲综合色成人| 亚洲国产毛片aaaaa无费看| 一区二区三区中文字幕电影| 亚洲欧洲另类国产综合| 一区精品在线播放| 日韩欧美aaaaaa| 成人精品免费看| 国产高清不卡一区| 国产精品一二三在| 成人成人成人在线视频| 成人在线视频首页| 97se亚洲国产综合在线| 日本韩国精品一区二区在线观看| 色婷婷av一区二区三区gif | 欧美日韩国产不卡| 欧美日韩国产一级| 91精品国产色综合久久不卡电影 | 亚洲激情六月丁香| 亚洲摸摸操操av| 亚洲最大的成人av| 日韩电影免费在线观看网站| 麻豆精品精品国产自在97香蕉| 狠狠色狠狠色综合日日91app| 国产成人夜色高潮福利影视| av一二三不卡影片| 欧美精品乱码久久久久久| 日韩限制级电影在线观看| 91精品国产欧美日韩| 北岛玲一区二区三区四区| 亚洲午夜视频在线观看| 中文字幕在线免费不卡| 亚洲主播在线观看| 日本成人中文字幕在线视频| 国产一区999| 色综合久久综合中文综合网| 宅男噜噜噜66一区二区66| 欧美va日韩va| 亚洲男帅同性gay1069| 日韩电影在线观看网站| 韩国理伦片一区二区三区在线播放| 国产成人aaa| 色悠悠亚洲一区二区| 日韩一级免费观看| 最新国产精品久久精品| 日韩国产精品91| 成人夜色视频网站在线观看| 欧美视频一区二区在线观看| 久久综合av免费| 一区二区三区四区视频精品免费 | 粉嫩aⅴ一区二区三区四区五区| 99免费精品视频| 国内成人精品2018免费看| 成人毛片在线观看| 欧美日韩高清一区| 国产欧美日韩一区二区三区在线观看| 亚洲综合丝袜美腿| 国产一区二区三区日韩| 欧美在线高清视频| 国产亚洲短视频| 亚洲成人动漫在线免费观看| 国产伦精品一区二区三区视频青涩 | 欧美伊人久久久久久久久影院| 久久亚洲综合色一区二区三区| 亚洲黄色尤物视频| 国产精一区二区三区| 欧美日韩国产成人在线91| 欧美激情一区在线| 麻豆成人久久精品二区三区红 | 欧美综合在线视频| 精品一区二区三区免费播放| 日韩美女天天操| 久久久久国产精品人| 日韩精品一区二区三区四区视频| 亚洲精品亚洲人成人网在线播放| 国内精品国产成人| 91精品国产综合久久久久久久 | 久久久久久久久久久久久夜| 天堂va蜜桃一区二区三区漫画版| 99精品视频一区二区三区| 久久综合资源网| 奇米影视一区二区三区小说| 欧美性高清videossexo| 亚洲视频免费观看| 本田岬高潮一区二区三区| 国产日韩欧美精品一区| 国产精品一区二区无线| 欧美一卡在线观看| 日韩中文字幕亚洲一区二区va在线 | 国产91高潮流白浆在线麻豆| 精品第一国产综合精品aⅴ| 午夜一区二区三区在线观看| 欧美午夜免费电影| 亚洲一二三四区不卡| 91麻豆精品国产91久久久更新时间| av中文字幕亚洲| 欧美自拍偷拍一区| 亚洲乱码中文字幕| 99riav一区二区三区| 国产精品欧美一区喷水| 国产成人免费在线观看| 久久免费的精品国产v∧| 国产精一区二区三区| 久久久午夜电影| 国产精品白丝jk黑袜喷水| 国产亚洲一区字幕| 国产成人一区二区精品非洲| 国产精品视频第一区| 白白色亚洲国产精品| 亚洲私人影院在线观看| 一本一本久久a久久精品综合麻豆| 国产精品欧美极品| 色狠狠av一区二区三区| 亚洲一区在线播放| 欧美一区二区三区成人| 日韩国产欧美视频| 精品成人佐山爱一区二区| 国产精选一区二区三区| 国产精品免费视频网站| 91尤物视频在线观看| 亚洲日本中文字幕区| 欧美亚男人的天堂| 日韩成人av影视| 精品国产露脸精彩对白| 福利一区二区在线观看| 亚洲天堂av老司机| 欧美日韩色综合| 久久精品99久久久| 欧美国产精品专区| 色综合久久中文综合久久97| 午夜精品福利久久久| 久久亚洲精品国产精品紫薇| av一区二区三区黑人| 天天综合天天综合色| 2020国产精品久久精品美国| 国产a久久麻豆| 一区二区三区 在线观看视频| 欧美电影一区二区三区| 国产精品一区免费视频| 亚洲人成在线观看一区二区| 欧美高清dvd| 国产精品一二三在| 亚洲一区免费在线观看| www精品美女久久久tv| 91精彩视频在线| 久久国产夜色精品鲁鲁99| 亚洲天堂av老司机| 欧美大尺度电影在线| 99在线热播精品免费| 日韩国产一二三区| 国产精品免费网站在线观看| 91麻豆精品国产91久久久久久久久 | 91精品国产欧美一区二区18| 福利视频网站一区二区三区| 日韩精品成人一区二区三区| 欧美激情一区三区| 欧美一区二区视频在线观看2020| 国产·精品毛片| 男女激情视频一区| 一区二区三区.www| 国产欧美一区二区精品婷婷| 欧美日韩大陆一区二区| zzijzzij亚洲日本少妇熟睡| 久久国产精品99久久久久久老狼| 亚洲免费观看视频| 久久综合九色综合97婷婷| 欧美在线啊v一区| 国产盗摄一区二区三区| 日本中文字幕一区二区视频| 亚洲女性喷水在线观看一区| 久久综合色之久久综合| 欧美色视频一区| 成年人国产精品| 久久99精品久久久久婷婷| 一区二区三区在线视频观看 | 一区二区三区在线高清| 欧美激情一区二区三区蜜桃视频| 日韩视频中午一区| 欧美人牲a欧美精品| 丁香亚洲综合激情啪啪综合| 精品影院一区二区久久久| 亚洲国产精品麻豆| 亚洲免费观看视频| 亚洲国产精品v| 久久久天堂av| 欧美电影精品一区二区| 在线成人高清不卡| 欧美亚洲一区二区在线观看| 99久久国产综合精品色伊| 成人免费视频视频在线观看免费 | 久久99国产精品免费| 丝袜美腿高跟呻吟高潮一区| 亚洲夂夂婷婷色拍ww47| 亚洲免费毛片网站| 亚洲品质自拍视频|