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

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

?? modarith.h

?? 應用非對稱密鑰系統RSA密碼系統進行數據簽名的代碼
?? H
字號:
#ifndef CRYPTOPP_MODARITH_H
#define CRYPTOPP_MODARITH_H

// implementations are in integer.cpp

#include "cryptlib.h"
#include "misc.h"
#include "integer.h"
#include "algebra.h"

NAMESPACE_BEGIN(CryptoPP)

CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractRing<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;

//! ring of congruence classes modulo n
/*! \note this implementation represents each congruence class as the smallest non-negative integer in that class */
class CRYPTOPP_DLL ModularArithmetic : public AbstractRing<Integer>
{
public:

	typedef int RandomizationParameter;
	typedef Integer Element;

	ModularArithmetic(const Integer &modulus = Integer::One())
		: m_modulus(modulus), m_result((word)0, modulus.reg.size()) {}

	ModularArithmetic(const ModularArithmetic &ma)
		: m_modulus(ma.m_modulus), m_result((word)0, m_modulus.reg.size()) {}

	ModularArithmetic(BufferedTransformation &bt);	// construct from BER encoded parameters

	virtual ModularArithmetic * Clone() const {return new ModularArithmetic(*this);}

	void DEREncode(BufferedTransformation &bt) const;

	void DEREncodeElement(BufferedTransformation &out, const Element &a) const;
	void BERDecodeElement(BufferedTransformation &in, Element &a) const;

	const Integer& GetModulus() const {return m_modulus;}
	void SetModulus(const Integer &newModulus) {m_modulus = newModulus; m_result.reg.resize(m_modulus.reg.size());}

	virtual bool IsMontgomeryRepresentation() const {return false;}

	virtual Integer ConvertIn(const Integer &a) const
		{return a%m_modulus;}

	virtual Integer ConvertOut(const Integer &a) const
		{return a;}

	const Integer& Half(const Integer &a) const;

	bool Equal(const Integer &a, const Integer &b) const
		{return a==b;}

	const Integer& Identity() const
		{return Integer::Zero();}

	const Integer& Add(const Integer &a, const Integer &b) const;

	Integer& Accumulate(Integer &a, const Integer &b) const;

	const Integer& Inverse(const Integer &a) const;

	const Integer& Subtract(const Integer &a, const Integer &b) const;

	Integer& Reduce(Integer &a, const Integer &b) const;

	const Integer& Double(const Integer &a) const
		{return Add(a, a);}

	const Integer& MultiplicativeIdentity() const
		{return Integer::One();}

	const Integer& Multiply(const Integer &a, const Integer &b) const
		{return m_result1 = a*b%m_modulus;}

	const Integer& Square(const Integer &a) const
		{return m_result1 = a.Squared()%m_modulus;}

	bool IsUnit(const Integer &a) const
		{return Integer::Gcd(a, m_modulus).IsUnit();}

	const Integer& MultiplicativeInverse(const Integer &a) const
		{return m_result1 = a.InverseMod(m_modulus);}

	const Integer& Divide(const Integer &a, const Integer &b) const
		{return Multiply(a, MultiplicativeInverse(b));}

	Integer CascadeExponentiate(const Integer &x, const Integer &e1, const Integer &y, const Integer &e2) const;

	void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const;

	unsigned int MaxElementBitLength() const
		{return (m_modulus-1).BitCount();}

	unsigned int MaxElementByteLength() const
		{return (m_modulus-1).ByteCount();}

	Element RandomElement( RandomNumberGenerator &rng , const RandomizationParameter &ignore_for_now = 0 ) const
		// left RandomizationParameter arg as ref in case RandomizationParameter becomes a more complicated struct
	{ 
		return Element( rng , Integer( (long) 0) , m_modulus - Integer( (long) 1 )   ) ; 
	}   

	bool operator==(const ModularArithmetic &rhs) const
		{return m_modulus == rhs.m_modulus;}

	static const RandomizationParameter DefaultRandomizationParameter ;

protected:
	Integer m_modulus;
	mutable Integer m_result, m_result1;

};

// const ModularArithmetic::RandomizationParameter ModularArithmetic::DefaultRandomizationParameter = 0 ;

//! do modular arithmetics in Montgomery representation for increased speed
/*! \note the Montgomery representation represents each congruence class [a] as a*r%n, where r is a convenient power of 2 */
class CRYPTOPP_DLL MontgomeryRepresentation : public ModularArithmetic
{
public:
	MontgomeryRepresentation(const Integer &modulus);	// modulus must be odd

	virtual ModularArithmetic * Clone() const {return new MontgomeryRepresentation(*this);}

	bool IsMontgomeryRepresentation() const {return true;}

	Integer ConvertIn(const Integer &a) const
		{return (a<<(WORD_BITS*m_modulus.reg.size()))%m_modulus;}

	Integer ConvertOut(const Integer &a) const;

	const Integer& MultiplicativeIdentity() const
		{return m_result1 = Integer::Power2(WORD_BITS*m_modulus.reg.size())%m_modulus;}

	const Integer& Multiply(const Integer &a, const Integer &b) const;

	const Integer& Square(const Integer &a) const;

	const Integer& MultiplicativeInverse(const Integer &a) const;

	Integer CascadeExponentiate(const Integer &x, const Integer &e1, const Integer &y, const Integer &e2) const
		{return AbstractRing<Integer>::CascadeExponentiate(x, e1, y, e2);}

	void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const
		{AbstractRing<Integer>::SimultaneousExponentiate(results, base, exponents, exponentsCount);}

private:
	Integer m_u;
	mutable IntegerSecBlock m_workspace;
};

NAMESPACE_END

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成人一区二区在线观看| a级高清视频欧美日韩| 韩国女主播一区| 99re成人精品视频| 欧美一级欧美三级| 亚洲男女一区二区三区| 狠狠色丁香久久婷婷综| 欧美体内she精视频| 国产精品美女久久久久久2018| 欧美aaa在线| 欧美亚洲国产一区在线观看网站| 国产午夜久久久久| 青青草97国产精品免费观看 | 国产色婷婷亚洲99精品小说| 亚洲综合视频在线观看| 99久久伊人网影院| 国产无人区一区二区三区| 日本欧美一区二区三区| 欧美精品777| 亚洲一区二区在线观看视频| 日本精品一区二区三区四区的功能| 久久精品一区二区三区不卡牛牛| 美女一区二区视频| 欧美一二三区精品| 日本麻豆一区二区三区视频| 欧美日韩精品欧美日韩精品一综合| 亚洲男人天堂av网| 91福利区一区二区三区| 亚洲欧美精品午睡沙发| 色综合天天综合| 亚洲激情五月婷婷| 在线免费亚洲电影| 亚洲制服丝袜av| 欧美日本在线一区| 亚洲成av人片一区二区梦乃| 欧美日韩免费不卡视频一区二区三区 | 国产精品美女久久久久久久久久久 | 亚洲国产精品ⅴa在线观看| 国产精品99久久久久| 亚洲成av人片一区二区三区| 在线这里只有精品| 亚洲成人一区在线| 这里只有精品电影| 久久精品国产精品青草| 久久伊人蜜桃av一区二区| 国产成人精品亚洲日本在线桃色| 中文字幕国产一区| 91丨porny丨国产入口| 亚洲蜜桃精久久久久久久| 欧美性色aⅴ视频一区日韩精品| 亚洲国产中文字幕在线视频综合| 欧美久久一区二区| 国产米奇在线777精品观看| 久久久精品人体av艺术| av在线不卡观看免费观看| 亚洲精品欧美二区三区中文字幕| 欧美日本乱大交xxxxx| 精品综合免费视频观看| 欧美国产成人在线| 欧美丝袜丝交足nylons图片| 美女国产一区二区| 中文一区二区完整视频在线观看| 在线一区二区三区四区五区| 青青草91视频| 综合久久给合久久狠狠狠97色| 日本久久一区二区| 激情综合色综合久久综合| 成人欧美一区二区三区视频网页| 欧美日韩一区二区在线视频| 国产一区二区不卡| 亚洲综合色婷婷| 久久久久久免费| 日本高清无吗v一区| 精品一二三四区| 亚洲激情六月丁香| 精品国产欧美一区二区| 色狠狠综合天天综合综合| 精品一区二区三区在线播放视频| 久久se这里有精品| 亚洲精品视频在线观看免费| 欧美成人福利视频| 色综合视频在线观看| 久久99精品久久久久久| 一级做a爱片久久| 欧美高清在线精品一区| 欧美一级一区二区| 在线看国产一区二区| 夫妻av一区二区| 国产在线国偷精品免费看| 亚洲成a人片在线观看中文| 欧美国产激情二区三区| 精品乱码亚洲一区二区不卡| 欧美色图天堂网| 色综合久久88色综合天天6| 国内久久精品视频| 日韩精品电影在线观看| 亚洲国产精品久久久久婷婷884 | 91视频你懂的| 成人深夜福利app| 久久99久久久欧美国产| 日韩高清国产一区在线| 亚洲国产成人av好男人在线观看| 综合分类小说区另类春色亚洲小说欧美 | 国产成人一区在线| 精品一区二区三区av| 毛片av中文字幕一区二区| 日韩精品免费视频人成| 五月激情综合色| 亚洲电影一级片| 亚洲国产视频网站| 一区二区高清在线| 亚洲日本丝袜连裤袜办公室| 亚洲欧美综合网| 亚洲视频香蕉人妖| 亚洲美女视频在线| 亚洲精品日日夜夜| 一区二区三区在线观看视频| 亚洲精品免费在线播放| 亚洲香蕉伊在人在线观| 亚州成人在线电影| 日本系列欧美系列| 麻豆成人91精品二区三区| 韩国欧美国产1区| 成人一区二区视频| 91在线观看视频| 91福利在线免费观看| 欧美日韩一区二区不卡| 欧美一区二区视频观看视频| 日韩免费高清视频| 国产调教视频一区| 亚洲精品自拍动漫在线| 午夜视频在线观看一区二区| 老司机一区二区| 成人国产精品免费观看动漫| 99v久久综合狠狠综合久久| 91国偷自产一区二区使用方法| 777亚洲妇女| 久久综合精品国产一区二区三区 | 国产91精品一区二区| 成人激情小说乱人伦| 91免费版pro下载短视频| 欧美日韩亚洲综合在线| 日韩欧美国产精品| 国产精品免费视频一区| 成人性生交大合| 在线免费观看日本一区| 欧美一二三在线| 中文字幕色av一区二区三区| 亚洲va欧美va人人爽午夜| 国产在线国偷精品产拍免费yy| 91在线观看免费视频| 日韩一级免费一区| 中文字幕中文字幕在线一区| 亚洲国产另类av| 国产福利精品一区| 欧美日韩高清不卡| 日本一区二区电影| 肉色丝袜一区二区| 成人黄色小视频在线观看| 欧美日韩成人一区二区| 欧美激情中文字幕一区二区| 亚洲一区自拍偷拍| 国产精品一区专区| 欧美日韩精品欧美日韩精品| 国产精品日韩精品欧美在线| 日本不卡的三区四区五区| av电影在线观看完整版一区二区| 日韩一区二区三| 亚洲精品免费在线| 成人精品免费看| 精品国产伦一区二区三区观看体验| 亚洲欧美视频在线观看| 国产精品一级在线| 91精品中文字幕一区二区三区| 《视频一区视频二区| 国产成人免费视频一区| 日韩一区二区三区在线视频| 一区二区三区资源| 91碰在线视频| 欧美国产一区二区| 国产精品18久久久久久vr| 欧美一区二区三区公司| 亚洲在线观看免费视频| 97久久精品人人澡人人爽| 欧美国产精品久久| 风间由美一区二区av101 | 风间由美一区二区av101| 精品国产一区久久| 蜜芽一区二区三区| 91精品国产综合久久久久久漫画| 亚洲制服丝袜在线| 91久久精品日日躁夜夜躁欧美| 亚洲少妇屁股交4| 99re这里只有精品视频首页| 亚洲欧美自拍偷拍色图| 99精品黄色片免费大全| 亚洲婷婷国产精品电影人久久| av电影一区二区| 亚洲视频一区在线观看| 色琪琪一区二区三区亚洲区|