【文章內(nèi)容簡(jiǎn)介】
)的“協(xié)議”參數(shù),參數(shù)”micalg”必須擁有為”pgphashsybol”的值,在這里hashsymbol標(biāo)記消息完整性檢查(MIC)用于產(chǎn)生簽名。hashsymbol通常定義的值為”md5”用于MD5的校驗(yàn)和,”sha1”。 multipart/signed 主體必須包含兩個(gè)部分。第一部分包含MIME規(guī)范格式的標(biāo)記數(shù)據(jù),包含描述該數(shù)據(jù)的適當(dāng)?shù)膬?nèi)容頭的集合。 第二部分必須包含PGP數(shù)據(jù)標(biāo)記。它必須包含內(nèi)容類型為application/pgpsignature的標(biāo)注。 當(dāng)產(chǎn)生PGP數(shù)字簽名時(shí): (1) 要進(jìn)行標(biāo)記的數(shù)據(jù)必須先被轉(zhuǎn)化為其type/subtype特定規(guī)范格式。對(duì)于text/plain,這就意味著轉(zhuǎn)化為合適的字符集并且將行末尾轉(zhuǎn)換為標(biāo)準(zhǔn)的回車和換行序列。 (2) 然后使用一個(gè)合適的內(nèi)容轉(zhuǎn)換編碼,每一行經(jīng)過(guò)編碼的數(shù)據(jù)必須以標(biāo)準(zhǔn)的回車、換行序列結(jié)束。 (3) MIME 內(nèi)容報(bào)頭然后被加到主體上來(lái),每一個(gè)都以標(biāo)準(zhǔn)的回車、換行序列結(jié)束。 (4) 正如在[1]中所描述的,數(shù)字簽名必須要同時(shí)基于要進(jìn)行標(biāo)記的數(shù)據(jù)和其內(nèi)容報(bào)頭計(jì)算出來(lái)。 (5) 要產(chǎn)生的簽名必須與待標(biāo)記的數(shù)據(jù)相分離,這樣處理不管怎樣都不會(huì)改變?cè)械臄?shù)據(jù)。 范例消息: From: Michael Elkins elkins@ To: Michael Elkins elkins@ MimeVersion: ContentType: multipart/signed。 boundary=bar。 micalg=pgpmd5。 protocol=application/pgpsignature bar amp。 ContentType: text/plain。 charset=iso88591 amp。 ContentTransferEncoding: quotedprintable amp。 amp。 =A1Hola! amp。 amp。 Did you know that talking to yourself is a sign of senility? amp。 amp。 It39。s generally a good idea to encode lines that begin with amp。 From=20because some mail transport agents will insert a greater amp。 than () sign, thus invalidating the signature. amp。 amp。 Also, in some cases it might be desirable to encode any =20 amp。railing whitespace that occurs on lines in order to ensure =20 amp。 that the message signature is not invalidated when passing =20 amp。 a gateway that modifies such whitespace (like BITNET). =20 amp。 amp。 me