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

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

?? luc.h

?? 加密算法 Test Driver for Crypto++, a C++ Class Library of Cryptographic Primitives: - To generate an
?? H
字號:
#ifndef CRYPTOPP_LUC_H
#define CRYPTOPP_LUC_H

#include "pkcspad.h"
#include "oaep.h"
#include "integer.h"

NAMESPACE_BEGIN(CryptoPP)

class LUCFunction : virtual public TrapdoorFunction
{
public:
	LUCFunction(const Integer &n, const Integer &e) : n(n), e(e) {}
	LUCFunction(BufferedTransformation &bt);
	void DEREncode(BufferedTransformation &bt) const;

	Integer ApplyFunction(const Integer &x) const;
	Integer MaxPreimage() const {return n-1;}
	Integer MaxImage() const {return n-1;}

protected:
	LUCFunction() {}	// to be used only by InvertableLUCFunction
	Integer n, e;	// these are only modified in constructors
};

class InvertableLUCFunction : public LUCFunction, public InvertableTrapdoorFunction
{
public:
	InvertableLUCFunction(const Integer &n, const Integer &e,
						  const Integer &p, const Integer &q, const Integer &u);
	// generate a random private key
	InvertableLUCFunction(RandomNumberGenerator &rng, unsigned int keybits, const Integer &eStart=17);
	InvertableLUCFunction(BufferedTransformation &bt);
	void DEREncode(BufferedTransformation &bt) const;

	Integer CalculateInverse(const Integer &x) const;

protected:
	Integer p, q, u;
};

template <class B>
class LUCPrivateKeyTemplate : public B
{
public:
	LUCPrivateKeyTemplate(const Integer &n, const Integer &e, 
				const Integer &p, const Integer &q, const Integer &u)
		: PublicKeyBaseTemplate<InvertableLUCFunction>(
			InvertableLUCFunction(n, e, p, q, u)) {}

	LUCPrivateKeyTemplate(RandomNumberGenerator &rng, unsigned int keybits, const Integer &eStart=17)
		: PublicKeyBaseTemplate<InvertableLUCFunction>(
			InvertableLUCFunction(rng, keybits, eStart)) {}

	LUCPrivateKeyTemplate(BufferedTransformation &bt)
		: PublicKeyBaseTemplate<InvertableLUCFunction>(bt) {}
};

template <class B, class V>
class LUCPublicKeyTemplate : public B
{
public:
	LUCPublicKeyTemplate(const Integer &n, const Integer &e)
		: PublicKeyBaseTemplate<LUCFunction>(LUCFunction(n, e)) {}

	LUCPublicKeyTemplate(const V &priv)
		: PublicKeyBaseTemplate<LUCFunction>(priv.GetTrapdoorFunction()) {}

	LUCPublicKeyTemplate(BufferedTransformation &bt)
		: PublicKeyBaseTemplate<LUCFunction>(bt) {}
};

// analagous to the RSA schemes defined in PKCS #1 v2.0
typedef LUCPrivateKeyTemplate<DecryptorTemplate<OAEP<SHA>, InvertableLUCFunction> >
	LUCES_OAEP_SHA_Decryptor;
typedef LUCPublicKeyTemplate<EncryptorTemplate<OAEP<SHA>, LUCFunction>, LUCES_OAEP_SHA_Decryptor>
	LUCES_OAEP_SHA_Encryptor;

typedef LUCPrivateKeyTemplate<SignerTemplate<DigestSignerTemplate<PKCS_SignaturePaddingScheme, InvertableLUCFunction>, PKCS_DecoratedHashModule<SHA> > >
	LUCSSA_PKCS1v15_SHA_Signer;
typedef LUCPublicKeyTemplate<VerifierTemplate<DigestVerifierTemplate<PKCS_SignaturePaddingScheme, LUCFunction>, PKCS_DecoratedHashModule<SHA> >, LUCSSA_PKCS1v15_SHA_Signer>
	LUCSSA_PKCS1v15_SHA_Verifier;

// ********************************************************

class LUCELG_Encryptor : public PK_FixedLengthEncryptor
{
public:
	LUCELG_Encryptor(const Integer &p, const Integer &g, const Integer &y);
	LUCELG_Encryptor(BufferedTransformation &bt);

	void DEREncode(BufferedTransformation &bt) const;

	void Encrypt(RandomNumberGenerator &rng, const byte *plainText, unsigned int plainTextLength, byte *cipherText);

	unsigned int MaxPlainTextLength() const {return STDMIN(255U, modulusLen-3);}
	unsigned int CipherTextLength() const {return 2*modulusLen;}

protected:
	LUCELG_Encryptor() {}
	void RawEncrypt(const Integer &k, const Integer &m, Integer &a, Integer &b) const;
	unsigned int ExponentBitLength() const;

	Integer p, g, y;
	unsigned int modulusLen;
};

class LUCELG_Decryptor : public LUCELG_Encryptor, public PK_FixedLengthDecryptor
{
public:
	LUCELG_Decryptor(const Integer &p, const Integer &g, const Integer &y, const Integer &x);
	LUCELG_Decryptor(RandomNumberGenerator &rng, unsigned int pbits);
	// generate a random private key, given p and g
	LUCELG_Decryptor(RandomNumberGenerator &rng, const Integer &p, const Integer &g);

	LUCELG_Decryptor(BufferedTransformation &bt);
	void DEREncode(BufferedTransformation &bt) const;

	unsigned int Decrypt(const byte *cipherText, byte *plainText);

protected:
	void RawDecrypt(const Integer &a, const Integer &b, Integer &m) const;

	Integer x;
};

// ********************************************************

class LUCELG_DigestVerifier : public DigestVerifier
{
public:
	LUCELG_DigestVerifier(const Integer &p, const Integer &q, const Integer &g, const Integer &y);
	LUCELG_DigestVerifier(BufferedTransformation &bt);

	void DEREncode(BufferedTransformation &bt) const;
	bool VerifyDigest(const byte *digest, unsigned int digestLen, const byte *signature) const;

	unsigned int MaxDigestLength() const {return UINT_MAX;}
	unsigned int DigestSignatureLength() const {return p.ByteCount()+q.ByteCount();}

protected:
	LUCELG_DigestVerifier() {}
	bool RawVerify(const Integer &m, const Integer &a, const Integer &b) const;
	Integer EncodeDigest(const byte *digest, unsigned int digestLen) const;

	Integer p, q, g, y;
};

class LUCELG_DigestSigner : public LUCELG_DigestVerifier, public DigestSigner
{
public:
	LUCELG_DigestSigner(const Integer &p, const Integer &q, const Integer &g, const Integer &y, const Integer &x);
	LUCELG_DigestSigner(RandomNumberGenerator &rng, unsigned int pbits);
	LUCELG_DigestSigner(RandomNumberGenerator &rng, const Integer &p, const Integer &q, const Integer &g);
	LUCELG_DigestSigner(BufferedTransformation &bt);

	void DEREncode(BufferedTransformation &bt) const;
	void SignDigest(RandomNumberGenerator &rng, const byte *digest, unsigned int digestLen, byte *signature) const;

protected:
	void RawSign(RandomNumberGenerator &rng, const Integer &m, Integer &a, Integer &b) const;

	Integer x;
};

template <class H>
class LUCELG_Signer : public SignerTemplate<LUCELG_DigestSigner, H>
{
	typedef SignerTemplate<LUCELG_DigestSigner, H> Base;
public:
	LUCELG_Signer(const Integer &p, const Integer &q, const Integer &g, const Integer &y, const Integer &x)
		: Base(LUCELG_DigestSigner(p, q, g, y, x)) {}

	// generate a random private key
	LUCELG_Signer(RandomNumberGenerator &rng, unsigned int keybits)
		: Base(LUCELG_DigestSigner(rng, keybits)) {}

	// generate a random private key, given p, q, and g
	LUCELG_Signer(RandomNumberGenerator &rng, const Integer &p, const Integer &q, const Integer &g)
		: Base(LUCELG_DigestSigner(rng, p, q, g)) {}

	// load a previously generated key
	LUCELG_Signer(BufferedTransformation &storedKey)
		: Base(storedKey) {}
};

template <class H>
class LUCELG_Verifier : public VerifierTemplate<LUCELG_DigestVerifier, H>
{
	typedef VerifierTemplate<LUCELG_DigestVerifier, H> Base;
public:
	LUCELG_Verifier(const Integer &p, const Integer &q, const Integer &g, const Integer &y)
		: Base(LUCELG_DigestVerifier(p, q, g, y)) {}

	// create a matching public key from a private key
	LUCELG_Verifier(const LUCELG_Signer<H> &priv)
		: Base(priv) {}

	// load a previously generated key
	LUCELG_Verifier(BufferedTransformation &storedKey)
		: Base(storedKey) {}
};

// ********************************************************

class LUCDIF : public PK_SimpleKeyAgreementDomain
{
public:
	LUCDIF(const Integer &p, const Integer &g);
	LUCDIF(RandomNumberGenerator &rng, unsigned int pbits);
	LUCDIF(BufferedTransformation &domainParams);

	void DEREncode(BufferedTransformation &domainParams) const;

	bool ValidateDomainParameters(RandomNumberGenerator &rng) const;
	unsigned int AgreedValueLength() const {return p.ByteCount();}
	unsigned int PrivateKeyLength() const {return p.ByteCount();}
	unsigned int PublicKeyLength() const {return p.ByteCount();}

	void GenerateKeyPair(RandomNumberGenerator &rng, byte *secretKey, byte *publicKey) const;
	bool Agree(byte *agreedValue, const byte *secretKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const;

	const Integer &Prime() const {return p;}
	const Integer &Generator() const {return g;}

private:
	unsigned int ExponentBitLength() const;

	Integer p, g;
};

NAMESPACE_END

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最新国产の精品合集bt伙计| 风间由美一区二区av101 | 成人午夜碰碰视频| 国产欧美久久久精品影院| 成人深夜在线观看| 国产精品第13页| 91国产免费看| 日韩国产成人精品| 久久一区二区三区四区| 不卡一二三区首页| 亚洲不卡一区二区三区| 日韩一卡二卡三卡四卡| 国产精品亚洲一区二区三区妖精 | 风流少妇一区二区| 亚洲美女一区二区三区| 欧美一区二区视频在线观看2020| 久久精品久久综合| 国产精品不卡一区| 欧美另类高清zo欧美| 久久99精品久久久久久| 国产精品国产馆在线真实露脸 | 欧美三级乱人伦电影| 色妞www精品视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩毛片在线免费观看| 欧美日韩精品综合在线| 国模娜娜一区二区三区| 一区二区三区在线视频观看58| 欧美日韩亚洲综合| 国产夫妻精品视频| 午夜伊人狠狠久久| 国产亚洲一区二区三区四区| 一本到三区不卡视频| 极品少妇xxxx精品少妇偷拍| 亚洲欧美视频在线观看视频| 欧美一区二区精品| 99精品欧美一区二区蜜桃免费| 日日摸夜夜添夜夜添国产精品 | 日韩精品资源二区在线| 99综合影院在线| 亚洲精品国产a久久久久久 | 91精品一区二区三区久久久久久| 极品美女销魂一区二区三区免费| ...xxx性欧美| 久久久久97国产精华液好用吗| 成人av片在线观看| 免费一级片91| 一区二区三区产品免费精品久久75| 欧美精品一区二区三区四区| 欧洲一区二区三区在线| 国产成人aaaa| 麻豆精品久久精品色综合| 一级女性全黄久久生活片免费| 久久久久久久久99精品| 日韩欧美一区中文| 欧美日韩亚洲不卡| 色综合天天综合网国产成人综合天| 极品少妇xxxx偷拍精品少妇| 日韩精品一级中文字幕精品视频免费观看 | 日韩一区二区三区视频| 91国偷自产一区二区开放时间| 国产成人自拍网| 九九国产精品视频| 日本午夜精品视频在线观看| 亚洲高清视频在线| 一区二区高清在线| 亚洲人一二三区| 国产精品天干天干在线综合| 久久亚洲精精品中文字幕早川悠里| 欧美一卡二卡三卡| 777色狠狠一区二区三区| 欧美日韩aaaaaa| 精品视频免费在线| 欧美亚洲禁片免费| 在线观看国产一区二区| 欧美做爰猛烈大尺度电影无法无天| 91丨porny丨首页| 97久久超碰国产精品电影| 成人高清伦理免费影院在线观看| 成人免费看片app下载| 成人一区二区在线观看| 高清av一区二区| 99视频国产精品| 日本韩国欧美三级| 欧美精品久久一区| 日韩欧美国产一区二区三区| 2024国产精品| 国产女人水真多18毛片18精品视频| 欧美国产一区二区| 亚洲欧美日韩久久精品| 伊人开心综合网| 日韩主播视频在线| 久久久久9999亚洲精品| 91精品国产综合久久婷婷香蕉 | 色狠狠一区二区| 欧美综合亚洲图片综合区| 欧美狂野另类xxxxoooo| 日韩欧美一级精品久久| 国产亚洲精品超碰| 成人免费一区二区三区在线观看| 亚洲黄一区二区三区| 日韩福利电影在线| 国产一区在线观看视频| 99精品视频在线免费观看| 欧美图区在线视频| 精品久久久久99| 国产精品高潮呻吟久久| 五月婷婷久久综合| 国产精品夜夜嗨| 在线观看三级视频欧美| 日韩一二在线观看| 国产精品福利一区二区三区| 亚洲福利国产精品| 国产一区二区三区日韩| 成人av在线网站| 精品999在线播放| aaa亚洲精品一二三区| 色av一区二区| 精品国产91亚洲一区二区三区婷婷| 久久久久亚洲蜜桃| 亚洲在线观看免费视频| 韩国av一区二区三区四区| 色一情一伦一子一伦一区| 欧美videos大乳护士334| 最新日韩av在线| 久久99国产精品麻豆| 色综合久久久网| 2023国产精华国产精品| 亚洲中国最大av网站| 国产91精品一区二区麻豆网站| 欧美精品成人一区二区三区四区| 国产欧美日韩一区二区三区在线观看| 亚洲国产综合在线| 99视频精品免费视频| 久久影院午夜片一区| 舔着乳尖日韩一区| 色狠狠色噜噜噜综合网| 国产欧美日韩另类一区| 日本强好片久久久久久aaa| 91亚洲精品久久久蜜桃| 久久久久97国产精华液好用吗| 日韩不卡手机在线v区| 91色视频在线| 中文字幕免费在线观看视频一区| 日本 国产 欧美色综合| 在线一区二区三区四区五区| 国产精品你懂的在线欣赏| 国产原创一区二区| 欧美大片在线观看一区二区| 午夜精品久久久久久久久| 成年人国产精品| 欧美激情一区在线观看| 韩国av一区二区三区| 欧美刺激脚交jootjob| 日韩有码一区二区三区| 欧美日韩国产美| 亚洲国产综合在线| 欧美性生活影院| 亚洲一区二区三区四区在线免费观看| 99久精品国产| 国产精品白丝在线| 不卡在线观看av| 中文字幕中文字幕一区二区| 成人aa视频在线观看| 国产精品午夜在线| av一区二区三区四区| 国产精品午夜春色av| 成人污污视频在线观看| 国产精品久久久久四虎| 99久久综合99久久综合网站| 国产精品久久久久久久久搜平片| 成人午夜视频在线| 亚洲色图都市小说| 在线免费观看成人短视频| 亚洲一区二区美女| 制服丝袜亚洲精品中文字幕| 日本亚洲三级在线| 欧美变态tickle挠乳网站| 国产一区二区影院| 秋霞午夜av一区二区三区| 亚洲一区二区精品久久av| 色综合一个色综合亚洲| 亚洲欧美日韩国产手机在线| 色八戒一区二区三区| 亚洲18色成人| 日韩视频在线你懂得| 韩国三级中文字幕hd久久精品| 国产亚洲欧美激情| 欧美电影在哪看比较好| 激情图区综合网| 国产精品久久99| 欧美色图免费看| 精品一区二区三区久久久| 国产欧美一区二区精品久导航| 91香蕉视频在线| 青青草原综合久久大伊人精品优势| 国产亚洲欧美在线| 91在线免费看| 日本美女一区二区三区视频| 久久久精品日韩欧美|