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

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

?? bn_recp.c

?? openssl包含TLS
?? C
字號:
/* crypto/bn/bn_recp.c *//* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. *  * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to.  The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code.  The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). *  * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *    "This product includes cryptographic software written by *     Eric Young (eay@cryptsoft.com)" *    The word 'cryptographic' can be left out if the rouines from the library *    being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from  *    the apps directory (application code) you must include an acknowledgement: *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" *  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed.  i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */#include <stdio.h>#include "cryptlib.h"#include "bn_lcl.h"void BN_RECP_CTX_init(BN_RECP_CTX *recp)	{	BN_init(&(recp->N));	BN_init(&(recp->Nr));	recp->num_bits=0;	recp->flags=0;	}BN_RECP_CTX *BN_RECP_CTX_new(void)	{	BN_RECP_CTX *ret;	if ((ret=(BN_RECP_CTX *)OPENSSL_malloc(sizeof(BN_RECP_CTX))) == NULL)		return(NULL);	BN_RECP_CTX_init(ret);	ret->flags=BN_FLG_MALLOCED;	return(ret);	}void BN_RECP_CTX_free(BN_RECP_CTX *recp)	{	if(recp == NULL)	    return;	BN_free(&(recp->N));	BN_free(&(recp->Nr));	if (recp->flags & BN_FLG_MALLOCED)		OPENSSL_free(recp);	}int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)	{	if (!BN_copy(&(recp->N),d)) return 0;	if (!BN_zero(&(recp->Nr))) return 0;	recp->num_bits=BN_num_bits(d);	recp->shift=0;	return(1);	}int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,	BN_RECP_CTX *recp, BN_CTX *ctx)	{	int ret=0;	BIGNUM *a;	const BIGNUM *ca;	BN_CTX_start(ctx);	if ((a = BN_CTX_get(ctx)) == NULL) goto err;	if (y != NULL)		{		if (x == y)			{ if (!BN_sqr(a,x,ctx)) goto err; }		else			{ if (!BN_mul(a,x,y,ctx)) goto err; }		ca = a;		}	else		ca=x; /* Just do the mod */	ret = BN_div_recp(NULL,r,ca,recp,ctx);err:	BN_CTX_end(ctx);	return(ret);	}int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,	BN_RECP_CTX *recp, BN_CTX *ctx)	{	int i,j,ret=0;	BIGNUM *a,*b,*d,*r;	BN_CTX_start(ctx);	a=BN_CTX_get(ctx);	b=BN_CTX_get(ctx);	if (dv != NULL)		d=dv;	else		d=BN_CTX_get(ctx);	if (rem != NULL)		r=rem;	else		r=BN_CTX_get(ctx);	if (a == NULL || b == NULL || d == NULL || r == NULL) goto err;	if (BN_ucmp(m,&(recp->N)) < 0)		{		if (!BN_zero(d)) return 0;		if (!BN_copy(r,m)) return 0;		BN_CTX_end(ctx);		return(1);		}	/* We want the remainder	 * Given input of ABCDEF / ab	 * we need multiply ABCDEF by 3 digests of the reciprocal of ab	 *	 */	/* i := max(BN_num_bits(m), 2*BN_num_bits(N)) */	i=BN_num_bits(m);	j=recp->num_bits<<1;	if (j>i) i=j;	/* Nr := round(2^i / N) */	if (i != recp->shift)		recp->shift=BN_reciprocal(&(recp->Nr),&(recp->N),			i,ctx); /* BN_reciprocal returns i, or -1 for an error */	if (recp->shift == -1) goto err;	/* d := |round(round(m / 2^BN_num_bits(N)) * recp->Nr / 2^(i - BN_num_bits(N)))|	 *    = |round(round(m / 2^BN_num_bits(N)) * round(2^i / N) / 2^(i - BN_num_bits(N)))|	 *   <= |(m / 2^BN_num_bits(N)) * (2^i / N) * (2^BN_num_bits(N) / 2^i)|	 *    = |m/N|	 */	if (!BN_rshift(a,m,recp->num_bits)) goto err;	if (!BN_mul(b,a,&(recp->Nr),ctx)) goto err;	if (!BN_rshift(d,b,i-recp->num_bits)) goto err;	d->neg=0;	if (!BN_mul(b,&(recp->N),d,ctx)) goto err;	if (!BN_usub(r,m,b)) goto err;	r->neg=0;#if 1	j=0;	while (BN_ucmp(r,&(recp->N)) >= 0)		{		if (j++ > 2)			{			BNerr(BN_F_BN_MOD_MUL_RECIPROCAL,BN_R_BAD_RECIPROCAL);			goto err;			}		if (!BN_usub(r,r,&(recp->N))) goto err;		if (!BN_add_word(d,1)) goto err;		}#endif	r->neg=BN_is_zero(r)?0:m->neg;	d->neg=m->neg^recp->N.neg;	ret=1;err:	BN_CTX_end(ctx);	return(ret);	} /* len is the expected size of the result * We actually calculate with an extra word of precision, so * we can do faster division if the remainder is not required. *//* r := 2^len / m */int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx)	{	int ret= -1;	BIGNUM t;	BN_init(&t);	if (!BN_zero(&t)) goto err;	if (!BN_set_bit(&t,len)) goto err;	if (!BN_div(r,NULL,&t,m,ctx)) goto err;	ret=len;err:	BN_free(&t);	return(ret);	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区视频| 91精品国产综合久久久蜜臀图片| 蜜臀久久久99精品久久久久久| 亚洲一二三四在线观看| 亚洲欧美日韩在线不卡| 亚洲女爱视频在线| 亚洲一区二区在线观看视频| 玉足女爽爽91| 亚洲午夜精品一区二区三区他趣| 亚洲一二三区视频在线观看| 亚洲成a人在线观看| 日韩黄色一级片| 免费成人在线观看视频| 国产一区二区电影| 不卡av在线免费观看| 91蜜桃免费观看视频| 欧美日韩在线亚洲一区蜜芽| 欧美伦理视频网站| 精品国产伦一区二区三区观看体验| 精品久久国产97色综合| 亚洲国产精品黑人久久久| 亚洲男人都懂的| 婷婷六月综合亚洲| 国产精品综合视频| 色综合天天综合网天天狠天天| 欧美日韩情趣电影| 精品国一区二区三区| 中文字幕中文乱码欧美一区二区| 亚洲激情第一区| 蜜桃av噜噜一区二区三区小说| 国产在线一区观看| 色哟哟欧美精品| 日韩一区二区在线观看视频 | 极品少妇一区二区三区精品视频| 国产一区二区中文字幕| 97se狠狠狠综合亚洲狠狠| 欧美日韩国产区一| 国产色婷婷亚洲99精品小说| 国产69精品久久久久777| 日韩电影在线免费看| 九九九精品视频| 在线免费精品视频| 一道本成人在线| 色婷婷综合久久久中文一区二区| 久久综合久久综合久久| 国产美女视频91| 国产精品久久久久婷婷二区次 | 精品国产乱码久久久久久夜甘婷婷| 日本sm残虐另类| 欧美不卡视频一区| 国产高清精品在线| 亚洲女同女同女同女同女同69| 欧美一a一片一级一片| 亚洲第一主播视频| 在线免费不卡电影| 亚洲男人的天堂在线观看| 色哟哟亚洲精品| 午夜精品成人在线视频| 日韩女同互慰一区二区| 大陆成人av片| 亚洲综合色在线| 日韩手机在线导航| www.66久久| 五月婷婷综合网| 久久蜜桃香蕉精品一区二区三区| 99v久久综合狠狠综合久久| 亚洲成人av在线电影| 精品理论电影在线观看| 99精品国产视频| 久久www免费人成看片高清| 中文字幕高清不卡| 欧美日韩精品二区第二页| 久久激情综合网| 一区二区三区在线观看视频| 精品美女一区二区三区| 91日韩一区二区三区| 日本大胆欧美人术艺术动态| 国产精品的网站| 精品免费日韩av| 91麻豆国产福利在线观看| 老司机免费视频一区二区三区| 综合久久久久综合| 久久久综合网站| 欧美精品日韩一本| av成人老司机| 韩国欧美国产一区| 日韩在线a电影| 亚洲欧美二区三区| 欧美国产在线观看| 精品国产免费久久| 欧美日韩中文国产| 一本大道综合伊人精品热热| 国内精品在线播放| 日韩一区精品视频| 亚洲一区二区三区四区五区中文| 久久精品亚洲麻豆av一区二区| 7777精品久久久大香线蕉| 91免费视频大全| 风流少妇一区二区| 狠狠久久亚洲欧美| 老司机精品视频在线| 日韩精品电影在线观看| 亚洲综合在线电影| 亚洲欧美综合在线精品| 国产精品素人视频| 久久女同互慰一区二区三区| 日韩欧美国产午夜精品| 3d成人h动漫网站入口| 欧美三级韩国三级日本一级| 欧美性一区二区| 91电影在线观看| 在线观看成人免费视频| 色哟哟精品一区| 91一区二区在线| 91浏览器在线视频| 99久久精品一区二区| 波多野结衣中文字幕一区二区三区| 国产福利一区在线| 国产美女一区二区| 成人动漫一区二区在线| 成人伦理片在线| 色综合久久久久综合体| 色婷婷久久久亚洲一区二区三区 | 国产亚洲精久久久久久| 久久久亚洲午夜电影| 国产三级欧美三级日产三级99| 国产日韩欧美高清| 中文字幕日本乱码精品影院| 亚洲国产精品av| 樱花草国产18久久久久| 亚洲成人三级小说| 美女视频网站黄色亚洲| 国精品**一区二区三区在线蜜桃| 国产在线精品一区二区夜色| 成人毛片视频在线观看| 在线视频你懂得一区| 制服丝袜中文字幕一区| 精品少妇一区二区三区免费观看| 久久亚洲一级片| 中文字幕一区二区三区精华液 | 日本高清不卡在线观看| 欧美男女性生活在线直播观看| 日韩写真欧美这视频| 国产片一区二区| 亚洲第一福利视频在线| 精品夜夜嗨av一区二区三区| 丰满白嫩尤物一区二区| 欧美日韩一区二区在线观看 | 91精品办公室少妇高潮对白| 欧美区一区二区三区| 久久嫩草精品久久久久| 亚洲制服丝袜在线| 狠狠色狠狠色综合系列| 欧洲色大大久久| 精品裸体舞一区二区三区| 亚洲欧洲美洲综合色网| 美脚の诱脚舐め脚责91| 波多野结衣中文字幕一区二区三区| 欧美美女黄视频| 国产精品丝袜久久久久久app| 亚洲妇女屁股眼交7| 国产成人丝袜美腿| 91.com视频| 1区2区3区精品视频| 美女诱惑一区二区| 在线观看免费亚洲| 欧美韩日一区二区三区四区| 天涯成人国产亚洲精品一区av| 国产sm精品调教视频网站| 欧美日韩午夜精品| 亚洲欧美日韩一区二区| 黑人巨大精品欧美黑白配亚洲| 欧美日韩亚洲丝袜制服| 国产精品视频观看| 九色综合狠狠综合久久| 欧美日韩一区三区| 最新高清无码专区| 国产精品综合二区| 日韩欧美一区在线| 亚洲国产裸拍裸体视频在线观看乱了 | 久久国产精品免费| 欧美三级日韩三级| 一区二区三区在线高清| 99国产欧美久久久精品| 国产午夜精品理论片a级大结局| 日韩成人伦理电影在线观看| 在线观看一区不卡| 亚洲人成亚洲人成在线观看图片| 国产精品一品二品| 久久久精品国产免大香伊| 青青草国产精品亚洲专区无| 欧美午夜精品久久久久久孕妇 | 亚洲免费资源在线播放| 国产盗摄一区二区| 久久久无码精品亚洲日韩按摩| 青青草一区二区三区| 日韩一区二区三区视频在线观看 | 亚洲在线一区二区三区| 91丨九色丨尤物| 亚洲免费资源在线播放|