freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)字簽名與鑒別協(xié)議-資料下載頁(yè)

2025-05-11 10:57本頁(yè)面
  

【正文】 cout MD5: 。 outputs[0]Attach(new HexEncoder(new FileSink(cout)))。 cout endl。 cout SHA: 。 outputs[1]Attach(new HexEncoder(new FileSink(cout)))。 cout endl。 cout RIPEMD160: 。 outputs[2]Attach(new HexEncoder(new FileSink(cout)))。 cout endl。 } 產(chǎn)生 RSA公鑰對(duì) void GenerateRSAKey(unsigned int keyLength, const char *privFilename, const char *pubFilename, const char *seed) { RandomPool randPool。 ((byte *)seed, strlen(seed))。 RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength)。 HexEncoder privFile(new FileSink(privFilename))。 (privFile)。 ()。 RSAES_OAEP_SHA_Encryptor pub(priv)。 HexEncoder pubFile(new FileSink(pubFilename))。 (pubFile)。 ()。 } 例子: RSA加密 char *RSAEncryptString(const char *pubFilename, const char *seed, const char *message) { FileSource pubFile(pubFilename, true, new HexDecoder)。 RSAES_OAEP_SHA_Encryptor pub(pubFile)。 if (strlen(message) ()) { cerr message too long for this key\n。 abort()。 } RandomPool randPool。 ((byte *)seed, strlen(seed))。 char *outstr = new char[2*()+1]。 (randPool, (byte *)message, strlen(message), (byte *)outstr)。 HexEncoder hexEncoder。 ((byte *)outstr, ())。 ()。 ((byte *)outstr, 2*())。 outstr[2*()] = 0。 return outstr。 } 例子:其他操作 void GzipFile(const char *in, const char *out, int deflate_level) { FileSource(in, true, new Gzip(deflate_level, new FileSink(out)))。 } void GunzipFile(const char *in, const char *out) { FileSource(in, true, new Gunzip(new FileSink(out)))。 } 參考資料 ? 書(shū) ? William Stallings, Cryptography and work security: principles and practice, Second Edition. ? Bruce Shneier, Applied cryptography: protocols, algorithms, and sourcecode in C, Second Edition. ? 文章 ? 密碼學(xué)的新方向 ? Web站點(diǎn) ? 問(wèn)題 1. 數(shù)字簽名應(yīng)該滿足哪些要求? 2. 簽名函數(shù)和加密函數(shù)應(yīng)該以哪種順序應(yīng)用于消息,為什么? 3. 思考題。如果簽名方聲稱私鑰丟失,來(lái)說(shuō)明其簽名無(wú)效,如何解決此類威脅?
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1