锘??xml version="1.0" encoding="utf-8" standalone="yes"?>99久久久久,亚洲国产精品无码久久98,久久婷婷国产麻豆91天堂http://www.shnenglu.com/ivenher/category/2683.htmlzh-cnMon, 19 May 2008 21:45:44 GMTMon, 19 May 2008 21:45:44 GMT60鍏挜緋葷粺/鏁板瓧絳懼悕/鏁板瓧璇佷功宸ヤ綔鍘熺悊鍏ラ棬 錛堣漿錛?/title><link>http://www.shnenglu.com/ivenher/articles/12939.html</link><dc:creator>鐖遍キ鐩?/dc:creator><author>鐖遍キ鐩?/author><pubDate>Mon, 25 Sep 2006 03:33:00 GMT</pubDate><guid>http://www.shnenglu.com/ivenher/articles/12939.html</guid><wfw:comment>http://www.shnenglu.com/ivenher/comments/12939.html</wfw:comment><comments>http://www.shnenglu.com/ivenher/articles/12939.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ivenher/comments/commentRss/12939.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ivenher/services/trackbacks/12939.html</trackback:ping><description><![CDATA[ <p>璇戣呮寜錛?br />鍔犲瘑鍜岃В瀵嗕嬌鐢ㄥ悓涓涓瘑閽ョ殑綆楁硶錛岀О涓哄縐板姞瀵嗙畻娉曪紱鍔犲瘑鍜岃В瀵嗕嬌鐢ㄧ殑鏄笉鍚岀殑瀵嗛挜錛岀О涓洪潪瀵圭О鍔犲瘑綆楁硶錛屽叕閽ョ郴緇熷嵆灞炰簬闈炲縐板姞瀵嗙畻娉曘傚浜庡縐板姞瀵嗚岃█錛岄渶瑕佺潃閲嶄繚鎶ょ殑鏄縐板瘑閽ワ紝瀵逛簬鍏挜綆楁硶鑰岃█錛岄渶瑕佺潃閲嶄繚鎶ょ殑鏄閽ャ?br />鍏挜鍔犲瘑綆楁硶錛屼互鍙婅鐢熷嚭鐨勬暟瀛楃鍚嶃佹暟瀛楄瘉涔︽妧鏈紝涓嶄粎騫挎硾搴旂敤浜嶪nternet閫氳涓紝渚嬪HTTPS鍗忚涓殑SSL/TLS錛屽湪鍗曟満緋葷粺涓篃瓚婃潵瓚婂彈鍒伴噸瑙嗭紝渚嬪Windows XP鐨勮澶囬┍鍔ㄧ▼搴忋?NET鐨凣AC assembly閮借姹傛暟瀛楃鍚嶃傚井杞粠Windows98/NT4璧峰嵆鎻愪緵浜咰ryptograph API錛屾敮鎸丏ES錛孯C2錛孯C4錛孖DEA絳夊縐板姞瀵嗙畻娉曞拰RSA鍏挜緋葷粺絳夐潪瀵圭О瀵嗙畻娉曪紝浠ュ強MD5錛孲HA錛孧AC絳夋憳瑕侊紙Digest錛屼篃縐頒負Hash錛屾暎鍒楋級綆楁硶銆?br />鏈枃璇戣嚜錛?br /><a >http://developer.netscape.com/tech/security/ssl/howitworks.html</a></p> <p>榪欐槸涓綃囩敓鍔ㄦ祬鏄劇殑鏂囩珷錛屽浜嗚В鍏挜緋葷粺鐨勫伐浣滃師鐞嗗緢鏈夊府鍔╋紝CSDN涓婂凡鏈変竴綃囪瘧鏂囷細</p> <p> <a >http://www.csdn.net/Develop/article/27/27524.shtm</a> <br />浣嗘湰浜鴻涓轟笂鏂囩殑鍏抽敭鍦版柟涓嶅鍑嗙‘錛屾瑺閫氶『銆傛湰璇戞枃鍦ㄤ笂綃囪瘧鏂囩殑鍩虹涓婏紝鍏抽敭鐨勬湳璇噰鐢ㄤ簡閫氱敤璇戞硶錛屽皯鏁板湴鏂歸噰鐢ㄤ簡鎰忚瘧錛岃屼笖闄勬湁鑻辨枃鍘熸枃錛屾湁緲昏瘧涓嶅綋鐨勫湴鏂瑰ぇ瀹跺彲浠ュ鐓у師鏂囥?br />甯屾湜鑳藉鍏挜緋葷粺鏈夊叴瓚g殑鏈嬪弸浠湁鎵甯姪銆?/p> <p>BTW錛氫笂闈㈡彁鍒扮殑鎵鏈夊縐板姞瀵嗗拰闈炲縐板姞瀵嗭紝瀹冧滑鐨勫姞瑙e瘑綆楁硶閮芥槸鍏紑鐨勶紝鍙涓嶇煡閬撳瘑閽ワ紝綆楁硶鐨勮璁¤呮湁淇″績浣垮姞瀵嗙粨鏋滀笉浼氳杞繪槗鐮磋В錛岃繖鐐逛笌WAPI鎴劧涓嶅悓錛氾級 銆?/p> <p>浠ヤ笅鏄腑鑻辨枃瀵圭収鐨勮瘧鏂囷細</p> <p>Public key encryption is a technique that uses a pair of asymmetric keys for encryption and decryption. Each pair of keys consists of a public key and a private key. The public key is made public by distributing it widely. The private key is never distributed; it is always kept secret. <br />鍏挜鍔犲瘑鏄嬌鐢ㄤ竴瀵歸潪瀵圭О鐨勫瘑閽ュ姞瀵嗘垨瑙e瘑鐨勬妧鏈傛瘡涓瀵瑰瘑閽ョ敱鍏挜鍜岀閽ョ粍鎴愩傚叕閽ヨ騫挎硾鍙戝竷銆傜閽ユ槸闅愬瘑鐨勶紝涓嶅叕寮銆?/p> <p>Data that is encrypted with the public key can be decrypted only with the private key. Conversely, data encrypted with the private key can be decrypted only with the public key. This asymmetry is the property that makes public key cryptography so useful. <br />鐢ㄥ叕閽ュ姞瀵嗙殑鏁版嵁鍙兘澶熻縐侀挜瑙e瘑銆傚弽榪囨潵錛屼嬌鐢ㄧ閽ュ姞瀵嗙殑鏁版嵁鍙兘鐢ㄥ叕閽ヨВ瀵嗐傝繖涓潪瀵圭О鐨勭壒鎬т嬌寰楀叕閽ュ姞瀵嗗緢鏈夌敤銆?/p> <p>USING PUBLIC KEY CRYPTOGRAPHY FOR AUTHENTICATION <br />浣跨敤鍏挜鍔犲瘑娉曡璇?/p> <p>Authentication is the process of verifying identity so that one entity can be sure that another entity is who it claims to be. In the following example involving Alice and Bob, public key cryptography is easily used to verify identity. The notation {something}key means that something has been encrypted or decrypted using key. <br />楠岃瘉鏄竴涓牳瀹炶韓浠界殑榪囩▼錛屼互渚夸竴鏂硅兘紜鍙︿竴鏂圭殑紜槸鍏舵墍澹扮О鐨勯偅涓韓浠姐傚湪涓嬪垪渚嬪瓙涓寘鎷敳鍜屼箼錛屽叕閽ュ姞瀵嗕細杞繪澗鍦版牎楠岃韓浠姐傜鍙穥鏁版嵁} key鎰忓懗鐫"鏁版嵁"宸茬粡浣跨敤key鍔犲瘑鎴栬В瀵嗐?/p> <p>Suppose Alice wants to authenticate Bob. Bob has a pair of keys, one public and one private. Bob discloses to Alice his public key (the way he does this is discussed later). Alice then generates a random message and sends it to Bob: </p> <p>聽 A->B聽聽 random-message </p> <p>Bob uses his private key to encrypt the message and returns the encrypted version to Alice: </p> <p>B->A聽聽 {random-message}bobs-private-key </p> <p>Alice receives this message and decrypts it by using Bob's previously published public key. She compares the decrypted message with the one she originally sent to Bob; if they match, she knows she's talking to Bob. An imposter presumably wouldn't know Bob's private key and would therefore be unable to properly encrypt the random message for Alice to check. <br />鍋囧鐢叉兂鏍¢獙涔欑殑韜喚銆備箼鏈変竴瀵瑰瘑閽ワ紝涓涓槸鍏紑鐨勶紝鍙︿竴涓槸縐佹湁鐨勩備箼閫忛湶緇欑敳浠栫殑鍏挜銆傜敳浜х敓涓涓殢鏈轟俊鎭彂閫佺粰涔欍?/p> <p>鐢測斺斻変箼錛歳andom message</p> <p>涔欎嬌鐢ㄤ粬鐨勭閽ュ姞瀵嗕俊鎭紝鎶婂姞瀵嗗悗鐨勪俊鎭繑鍥炵敳銆?</p> <p>涔欌斺斻夌敳錛歿random-message}涔欑殑縐侀挜</p> <p>鐢叉敹鍒拌繖涓俊鎭劧鍚庝嬌鐢ㄤ箼鐨勫墠闈㈠叕寮鐨勫叕閽ヨВ瀵嗐備粬姣旇緝瑙e瘑鍚庣殑淇℃伅涓庝粬鍘熷厛鍙戠粰涔欑殑淇℃伅銆傚鏋滃畠浠畬鍏ㄤ竴鑷達紝灝變細鐭ラ亾鍦ㄤ笌涔欒璇濄備換鎰忎竴涓腑闂翠漢涓嶄細鐭ラ亾涔欑殑縐侀挜錛屼篃涓嶈兘姝g‘鍔犲瘑鐢叉鏌ョ殑闅忔満淇℃伅銆?/p> <p>BUT WAIT, THERE'S MORE <br />絳変竴涓嬶紝浜嬫儏榪樻病鏈夊畬</p> <p>Unless you know exactly what you are encrypting, it is never a good idea to encrypt something with your private key and then send it to somebody else. This is because the encrypted value can be used against you (remember, only you could have done the encryption because only you have the private key). <br />鐢ㄧ閽ュ姞瀵嗘煇浜涗俊鎭紝鐒跺悗鍙戦佺粰鍏朵粬浜轟笉鏄竴涓ソ涓繪剰錛岄櫎闈炰綘娓呮鐭ラ亾榪欎釜淇℃伅鐨勫惈涔夈傚洜涓哄姞瀵嗗悗鐨勪俊鎭彲鑳借鐢ㄦ潵瀵逛粯浣狅紙璁頒綇錛屽埆浜虹煡閬撹淇℃伅鏄綘鍔犲瘑鐨勶紝鍥犱負鍙湁浣犳湁鍔犲瘑鐢ㄧ殑縐侀挜錛夈?/p> <p>So, instead of encrypting the original message sent by Alice, Bob constructs a message digest and encrypts that. A message digest is derived from the random message in a way that has the following useful properties: </p> <p>The digest is difficult to reverse. Someone trying to impersonate Bob couldn't get the original message back from the digest. <br />An impersonator would have a hard time finding a different message that computed to the same digest value. </p> <p>鎵浠ワ紝鍙栦唬鐩存帴鍔犲瘑鐢插彂鏉ョ殑鍘熷淇℃伅錛屼箼鍒涘緩涓涓俊鎭憳瑕佸茍涓斿姞瀵嗚鎽樿銆備俊鎭憳瑕佺敱浠繪剰淇℃伅榪愮畻鑰屾潵錛屽茍鍏鋒湁浠ヤ笅鏈夌敤鐨勭壒鎬э細</p> <p>1. 浠庤繖涓憳瑕佸奸毦浠ヨ繕鍘熷嚭鍘熷淇℃伅銆備換浣曚漢鍗充嬌浼鎴愪箼錛屼篃涓嶈兘浠庢憳瑕佸煎緱鍒板師濮嬩俊鎭紱</p> <p>2. 涓嶅悓鐨勪俊鎭緢闅捐綆楀嚭鐩稿悓鐨勬憳瑕佸鹼紱</p> <p>By using a digest, Bob can protect himself. He computes the digest of the random message sent by Alice and then encrypts the result. He sends the encrypted digest back to Alice. Alice can compute the same digest and authenticate Bob by decrypting Bob's message and comparing values. <br />浣跨敤鎽樿錛屼箼鑳藉淇濇姢鑷繁銆備粬璁$畻鐢插彂鍑虹殑浠繪剰淇℃伅鐨勬憳瑕侊紝鍔犲瘑鎽樿鍊鹼紝鐒跺悗鍙戦佸姞瀵嗙殑鎽樿鍊肩粰鐢層傜敳鑳藉璁$畻鍑虹浉鍚岀殑鎽樿鍊煎茍涓旇В瀵嗕箼鐨勪俊鎭紝鏈緇堣璇佷箼銆?<br />錛堣瘧鑰呮敞錛氭憳瑕侊紙Digest錛夌畻娉曞張縐頒負鏁e垪(Hash)綆楁硶錛?/p> <p>GETTING CLOSER <br />榪涗竴姝ョ殑璁ㄨ</p> <p>The technique just described is known as a digital signature. Bob has signed a message generated by Alice, and in doing so he has taken a step that is just about as dangerous as encrypting a random value originated by Alice. Consequently, our authentication protocol needs one more twist: some (or all) of the data needs to be originated by Bob. </p> <p>A->B 聽hello, are you bob?<br />B->A聽聽聽 Alice, This Is bob { digest[Alice, This Is Bob] } bobs-private-key </p> <p>When he uses this protocol, Bob knows what message he is sending to Alice, and he doesn't mind signing it. He sends the unencrypted version of the message first, "Alice, This Is Bob." Then he sends the digested-encrypted version second. Alice can easily verify that Bob is Bob, and Bob hasn't signed anything he doesn't want to. </p> <p>鍒氬垰璁ㄨ鐨勬妧鏈О涓烘暟瀛楃鍚嶃備箼鐩存帴鍦ㄧ敳浜х敓鐨勪俊鎭笂絳懼悕錛岃繖鏍峰仛鍜屽姞瀵嗙敳浜х敓鐨勪換鎰忎俊鎭槸鍚屾牱鍗遍櫓鐨勩傚洜姝ゆ垜浠殑楠岃瘉鍗忚榪橀渶瑕佸姞涓浜涙妧宸э細鏌愪簺鎴栧叏閮ㄤ俊鎭渶瑕佺敱涔欎駭鐢燂細</p> <p>鐢測斺斻変箼錛氫綘濂斤紝浣犳槸涔欎箞?<br />涔欌斺斻夌敳錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝鎴戞槸涔橾 } 涔欑殑縐侀挜</p> <p>浣跨敤榪欎釜鍗忚錛屼箼鐭ラ亾浠栧彂閫佺粰鐢茬殑淇℃伅鐨勫唴瀹癸紝浠栦笉浠嬫剰鍦ㄤ笂闈㈢鍚嶃備粬鍏堝彂閫佷笉鍔犲瘑鐨勪俊鎭紝"鐢詫紝鎴戞槸涔?錛岀劧鍚庡彂閫佽淇℃伅鐨勫姞瀵嗗悗鐨勬憳瑕併傜敳鍙互闈炲父鏂逛究鍦版牳瀹炰箼灝辨槸涔欙紝鍚屾椂錛屼箼榪樻病鏈夊湪浠栦笉鎯崇鍚嶇殑淇℃伅涓婄鍚嶃?/p> <p>HANDING OUT PUBLIC KEYS <br />鍒嗗彂鍏挜</p> <p>How does Bob hand out his public key in a trustworthy way? Let's say the authentication protocol looks like this: </p> <p>A->B聽 聽hello<br />B->A 聽Hi, I'm Bob, bobs-public-key<br />A->B聽prove it<br />B->A聽Alice, This Is bob聽 { digest[Alice, This Is Bob] } bobs-private-key</p> <p>閭d箞錛屼箼鎬庢牱浠ュ彲淇$殑鏂瑰紡鎻愪氦浠栫殑鍏挜鍛紵鐪嬬湅濡備笅鎵紺虹殑楠岃瘉鍗忚錛?/p> <p>鐢測斺斻変箼錛氫綘濂?br />涔欌斺斻夌敳錛氬棬錛屾垜鏄箼錛屼箼鐨勫叕閽?br />鐢測斺斻変箼錛氳璇佹槑<br />涔欌斺斻夌敳錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝鎴戞槸涔橾 } 涔欑殑縐侀挜</p> <p>With this protocol, anybody can be Bob. All you need is a public and private key. You lie to Alice and say you are Bob, and then you provide your public key instead of Bob's. Then you prove it by encrypting something with the private key you have, and Alice can't tell you're not Bob. <br />浣跨敤榪欎釜鍗忚錛屼換浣曚漢閮借兘澶熸垚涓?涔?銆傚彧瑕佷綘鏈変竴瀵瑰叕閽ュ拰縐侀挜銆備綘嬈洪獥鐢茶浣犲氨鏄箼錛屽彧瑕佹彁渚涗綘鐨勫叕閽ワ紝鑰屼笉鏄箼鐨勫叕閽ャ傜劧鍚庯紝浣犲彂閫佺敤浣犵殑縐侀挜鍔犲瘑鐨勪俊鎭紝璇佹槑浣犵殑韜喚銆傜敳騫朵笉鑳藉彂瑙変綘騫朵笉鏄箼銆?/p> <p>To solve this problem, the standards community has invented an object called a certificate. A certificate has the following content: </p> <p>The certificate issuer's name <br />The entity for whom the certificate is being issued (aka the subject) <br />The public key of the subject <br />Some time stamps </p> <p>The certificate is signed using the certificate issuer's private key. Everybody knows the certificate issuer's public key (that is, the certificate issuer has a certificate, and so on...). Certificates are a standard way of binding a public key to a name. </p> <p>涓轟簡瑙e喅榪欎釜闂錛屾爣鍑嗗寲緇勭粐鍙戞槑浜嗚瘉涔︺備竴涓瘉涔︽湁浠ヤ笅鐨勫唴瀹癸細</p> <p>聽聽聽聽聽聽 璇佷功鍙戣鑰呯殑鍚嶇О<br />聽聽聽聽聽聽 琚彂緇欒瘉涔︾殑瀹炰綋錛堜篃縐頒負涓婚錛?br />聽聽聽聽聽聽 涓婚鐨勫叕閽?br />聽聽聽聽聽聽 涓浜涙椂闂存埑</p> <p>璇佷功浣跨敤鍙戣鑰呯殑縐侀挜鍔犲瘑銆傛瘡涓涓漢閮界煡閬撹瘉涔﹀彂琛岃呯殑鍏挜錛堝氨鏄錛屾瘡涓瘉涔︾殑鍙戣鑰呬篃鎷ユ湁涓涓瘉涔︼紝浠ユ綾繪帹錛夈傝瘉涔︽槸涓涓妸鍏挜涓庝竴涓悕縐扮粦瀹氱殑鏍囧噯鏂瑰紡銆?/p> <p>By using this certificate technology, everybody can examine Bob's certificate to see whether it's been forged. Assuming that Bob keeps tight control of his private key and that it really is Bob who gets the certificate, then all is well. Here is the amended protocol: </p> <p>A->B聽 聽hello<br />B->A聽Hi, I'm Bob, bobs-certificate<br />A->B聽prove it<br />B->A聽Alice, This Is bob { digest[Alice, This Is Bob] } bobs-private-key</p> <p>Now when Alice receives Bob's first message, she can examine the certificate, check the signature (as above, using a digest and public key decryption), and then check the subject (that is, Bob's name) and see that it is indeed Bob. She can then trust that the public key is Bob's public key and request Bob to prove his identity. Bob goes through the same process as before, making a message digest of his design and then responding to Alice with a signed version of it. Alice can verify Bob's message digest by using the public key taken from the certificate and checking the result. </p> <p>閫氳繃浣跨敤璇佷功鎶鏈紝姣忎釜浜洪兘鍙互媯鏌ヤ箼鐨勮瘉涔︼紝鍒ゆ柇鍏舵槸鍚﹁浼犮傚亣璁句箼鎺у埗濂戒粬鐨勭閽ワ紝騫朵笖浠栫‘瀹炴槸寰楀埌璇佷功鐨勪箼錛屽氨涓囦簨澶у悏浜嗐備笅闈㈡槸淇鍚庣殑鍗忚錛?/p> <p>鐢測斺斻変箼錛氫綘濂?br />涔欌斺斻夌敳錛氬棬錛屾垜鏄箼錛屼箼鐨勮瘉涔?br />鐢測斺斻変箼錛氳璇佹槑<br />涔欌斺斻夌敳錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝 鎴戞槸涔橾 } 涔欑殑縐侀挜</p> <p>鐜板湪褰撶敳鏀跺埌涔欑殑絎竴涓俊鎭紝浠栬兘媯鏌ヨ瘉涔︼紝鏍告煡璇佷功涓婄殑絳懼悕錛堝涓婃墍榪幫紝浣跨敤鎽樿鍜屽叕閽ヨВ瀵嗭級錛屾鏌ヨ瘉涔︿腑鐨勪富棰橈紙榪欓噷鏄箼鐨勫鍚嶏級錛岀‘瀹氭槸涔欍備粬灝辮兘鐩鎬俊鍏挜灝辨槸涔欑殑鍏挜錛岀劧鍚庤姹備箼璇佹槑鑷繁鐨勮韓浠姐備箼閫氳繃鍓嶉潰鎻忚堪榪囩殑榪囩▼錛屽埗浣滀竴涓俊鎭憳瑕侊紝鐢ㄤ竴涓鍚嶇増鏈瓟澶嶇敳銆傜敳鍙互閫氳繃浣跨敤浠庤瘉涔︿笂寰楀埌鐨勫叕閽ユ楠屼箼鐨勪俊鎭憳瑕侊紝騫跺姣旂粨鏋溿?/p> <p>A bad guy - let's call him Mallet - can do the following: </p> <p>A->M聽hello<br />M->A聽Hi, I'm Bob, bobs-certificate<br />A->M聽prove it<br />M->A聽 聽????</p> <p>But Mallet can't satisfy Alice in the final message. Mallet doesn't have Bob's private key, so he can't construct a message that Alice will believe came from Bob. </p> <p>鍋囪鏈変竴涓潖灝忓瓙錛屾垜浠О浠栦負H錛屼粬鍙互榪欎箞鍋氾細</p> <p>鐢測斺斻塇錛氫綘濂?br />H鈥斺斻夌敳錛氫綘濂斤紝鎴戞槸涔欙紝涔欑殑璇佷功<br />鐢測斺斻塇錛氳璇佹槑<br />H鈥斺斻夌敳錛氾紵錛燂紵</p> <p>H涓嶈兘婊¤凍鐢茬殑鏈鍚庝竴涓俊鎭紝浠栨病鏈変箼鐨勭閽ワ紝鍥犳浠栦笉鑳藉緩绔嬩竴涓護鐢茬浉淇℃槸鏉ヨ嚜涔欑殑淇℃伅銆?/p> <p>EXCHANGING A SECRET <br />浜ゆ崲瀵嗛挜錛坰ecret錛?/p> <p>Once Alice has authenticated Bob, she can do another thing - she can send Bob a message that only Bob can decode: </p> <p>A->B聽聽 {secret}bobs-public-key </p> <p> <br />The only way to find the secret is by decrypting the above message with Bob's private key. Exchanging a secret is another powerful way of using public key cryptography. Even if the communication between Alice and Bob is being observed, nobody but Bob can get the secret. </p> <p>涓鏃︾敳宸茬粡楠岃瘉涔欏悗錛屼粬灝卞彲浠ュ仛鍙﹀鐨勪簨鎯呬簡--鍙戦佺粰涔欎竴涓彧鏈変箼鍙互瑙e瘑銆侀槄璇葷殑錛堝彟涓涓級瀵嗛挜錛?/p> <p>鐢測斺斻変箼錛歿 secret }涔欑殑鍏挜</p> <p>鍙湁浣跨敤涔欑殑縐侀挜鎵嶈兘瑙e瘑涓婅堪淇℃伅錛屽緱鍒皊ecret錛堝彟涓涓瘑閽ワ級銆備氦鎹紙棰濆鐨勶級瀵嗛挜鏄叕閽ュ瘑鐮佹湳鎻愪緵鐨勫彟涓涓己鏈夊姏鐨勬墜孌點傚嵆浣垮湪鐢插拰涔欎箣闂寸殑閫氳琚睛鍚紝鍙湁涔欐墠鑳藉緱鍒板瘑閽ャ?/p> <p>This technique strengthens Internet security by using the secret as another key, but this time it's a key to a symmetric cryptographic algorithm (such as DES, RC4, or IDEA). Alice knows the secret because she generated it before sending it to Bob. Bob knows the secret because Bob has the private key and can decrypt Alice's message. Because they both know the secret, they can both initialize a symmetric cipher algorithm and then start sending messages encrypted with it. Here is a revised protocol: </p> <p>A->B 聽hello<br />B->A 聽Hi, I'm Bob, bobs-certificate<br />A->B 聽prove it<br />B->A 聽Alice, This Is bob { digest[Alice, This Is Bob] } bobs-private-key<br />A->B聽ok bob, here is a secret {secret} bobs-public-key<br />B->A聽some message}secret-key<br />聽<br />How secret-key is computed is up to the protocol being defined, but it could simply be a copy of secret. </p> <p>浣跨敤secret浣滀負鍙︿竴涓瘑閽ュ寮轟簡緗戠粶鐨勫畨鍏ㄦэ紝浣嗘槸鐜板湪榪欎釜瀵嗛挜灝嗙敤浜庡縐板姞瀵嗙畻娉曠殑錛堜緥濡侱ES銆丷C4銆両DEA錛夈傦紙璇戣呮敞錛氬叕閽ョ畻娉曞湪鍔犲瘑澶т俊鎭噺鏃跺紑閿姣旇緝澶э紝鎵浠ュ湪鍔犲瘑澶т俊鎭噺鏃朵竴鑸噰鐢ㄥ縐板姞瀵嗙畻娉曪紝甯歌閫氳浣跨敤鍏挜緋葷粺鏄笉鍫噸璐熺殑銆傛墍浠ユ湰鏂囧湪韜喚楠岃瘉鍚庤鍒╃敤鍏挜緋葷粺鐨勫彲闈犳т氦鎹竴涓縐板姞瀵嗙殑瀵嗛挜錛屼互鍚庣殑閫氳灝遍噰鐢ㄥ縐板姞瀵嗙畻娉曡繘琛屼繚鎶ゃ傦級鍥犱負鏄敳鍦ㄥ彂閫佺粰涔欎箣鍓嶄駭鐢熺殑瀵嗛挜錛屾墍浠ョ敳鐭ラ亾榪欎釜瀵嗛挜銆備箼涔熺煡閬撳瘑閽ワ紝鍥犱負涔欐湁縐侀挜錛岃兘澶熻В瀵嗙敳鐨勪俊鎭傜敱浜庝粬浠兘鐭ラ亾瀵嗛挜錛屼粬浠氨閮借兘澶熷垵濮嬪寲涓涓縐板姞瀵嗙畻娉曪紝浠庡紑濮嬪彂閫侊紙鐢ㄥ縐板姞瀵嗙畻娉曪級鍔犲瘑鍚庣殑淇℃伅銆備笅闈㈡槸淇畾鍚庣殑鍗忚錛?/p> <p>鐢測斺斻変箼錛氫綘濂?br />涔欌斺斻夌敳錛氬棬錛屾垜鏄箼錛屼箼鐨勮瘉涔?br />鐢測斺斻変箼錛氳璇佹槑<br />涔欌斺斻夌敳錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝鎴戞槸涔橾 }涔欑殑縐侀挜<br />鐢測斺斻変箼錛氫綘濂戒箼錛岃繖閲屾槸瀵嗛挜 {secret}涔欑殑鍏挜<br />涔欌斺斻夌敳錛歿some message}secret-key</p> <p>錛堝縐板瘑閽ワ級secret-key鏄浣曡綆楀嚭鏉ョ殑錛屽畬鍏ㄧ敱錛堝弻鏂瑰畾涔夌殑錛夐氳鍗忚鑷凡鍐沖畾錛屽綋鐒跺彲浠ョ畝鍗曞湴灝辨妸secret鍋氫負secret-key銆?</p> <p>YOU SAID WHAT? <br />浣犲湪璇翠粈涔堬紵</p> <p>Mallet's bag contains a few more tricks. Although Mallet can't discover the secret that Alice and Bob have exchanged, he can interfere in their conversation by damaging it. For example, if Mallet is sitting between Alice and Bob, he can choose to pass most information back and forth unchanged but mangle certain messages (easy for him to do because he knows the protocol that Alice and Bob are speaking): <br />H榪樻湁鍏朵粬鑺辨嫑銆傝櫧鐒朵笉鐭ラ亾鍙戠幇鐢插拰涔欏凡緇忎氦鎹㈢殑瀵嗛挜錛屼絾H鑳藉共鎵頒粬浠殑浜よ皥銆傚鏋滈粦瀹鍦ㄧ敳鍜屼箼錛堢殑閫氳閾捐礬鐨勶級涓棿錛屼粬鍙互鏀捐繃澶ч儴鍒嗕俊鎭紝閫夋嫨鐮村潖涓瀹氱殑淇℃伅錛堣繖鏄潪甯哥畝鍗曠殑錛屽洜涓轟粬鐭ラ亾鐢插拰涔欓氳瘽閲囩敤鐨勫崗璁級錛?/p> <p>A->M 聽hello<br />M->B 聽hello</p> <p>B->M 聽Hi, I'm Bob, bobs-certificate<br />M->A 聽Hi, I'm Bob, bobs-certificate</p> <p>A->M 聽prove it <br />M->B 聽prove it </p> <p>B->M 聽Alice, This Is bob { digest[Alice, This Is Bob] } bobs-private-key<br />M->A 聽Alice, This Is bob { digest[Alice, This Is Bob] } bobs-private-key</p> <p>A->M 聽ok bob, here is a secret {secret} bobs-public-key<br />M->B 聽ok bob, here is a secret {secret} bobs-public-key</p> <p>B->M 聽{some message}secret-key<br />M->A 聽Garble[ {some message}secret-key ]</p> <p>Mallet passes the data through without modification until Alice and Bob share a secret. Then Mallet gets in the way by garbling Bob's message to Alice. By this point Alice trusts Bob, so she may believe the garbled message and try to act on it. Note that Mallet doesn't know the secret - all he can do is damage the data encrypted with the secret key. Depending on the protocol, Mallet may not produce a valid message. Then again, he may get lucky. </p> <p>鐢測斺斻塇錛氫綘濂?br />H鈥斺斻変箼錛氫綘濂?/p> <p>涔欌斺斻塇錛氬棬錛屾垜鏄箼錛屼箼鐨勮瘉涔?br />H鈥斺斻夌敳錛氬棬錛屾垜鏄箼錛屼箼鐨勮瘉涔?/p> <p>鐢測斺斻塇錛氳璇佹槑<br />H鈥斺斻変箼錛氳璇佹槑</p> <p>涔欌斺斻塇錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝鎴戞槸涔橾 }涔欑殑縐侀挜<br />H鈥斺斻夌敳錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝鎴戞槸涔橾 }涔欑殑縐侀挜</p> <p>鐢測斺斻塇錛氫綘濂斤紝涔欙紝榪欓噷鏄瘑閽?{secret} 涔欑殑鍏挜<br />H鈥斺斻変箼錛氫綘濂斤紝涔欙紝榪欓噷鏄瘑閽?{secret} 涔欑殑鍏挜</p> <p>涔欌斺斻塇錛歿some message}secret-key<br />H鈥斺斻夌敳錛欸arble[{s ome message}secret-key ]</p> <p>H蹇界暐涓浜涙暟鎹笉淇敼錛岀洿鍒扮敳鍜屼箼浜ゆ崲瀵嗛挜銆傜劧鍚嶩騫叉壈涔欑粰鐢茬殑淇℃伅銆傚湪榪欐椂錛岀敳宸茬粡淇′換涔欙紝鎵浠ヤ粬鍙兘鐩鎬俊宸茬粡琚共鎵扮殑淇℃伅騫朵笖灝藉姏瑙e瘑銆傞渶瑕佹敞鎰忕殑鏄紝H涓嶇煡閬撳瘑閽ワ紝浠栨墍鑳藉仛鐨勫氨鏄瘉鍧忎嬌鐢ㄥ瘑閽ュ姞瀵嗗悗鐨勬暟鎹傚熀浜庡崗璁紝H鍙兘涓嶈兘浜х敓涓涓湁鏁堢殑淇℃伅銆備絾涓嬩竴嬈″憿錛?/p> <p>To prevent this kind of damage, Alice and Bob can introduce a message authentication code (MAC) into their protocol. A MAC is a piece of data that is computed by using a secret and some transmitted data. The digest algorithm described above has just the right properties for building a MAC function that can defend against Mallet: </p> <p>聽MAC := Digest[ some message, secret ]聽聽 </p> <p>Because Mallet doesn't know the secret, he can't compute the right value for the digest. Even if Mallet randomly garbles messages, his chance of success is small if the digest data is large. For example, by using MD5 (a good cryptographic digest algorithm invented by RSA), Alice and Bob can send 128-bit MAC values with their messages. The odds of Mallet's guessing the right MAC are approximately 1 in 18,446,744,073,709,551,616 - for all practical purposes, never. </p> <p>涓轟簡闃繪榪欑鐮村潖錛岀敳鍜屼箼鍙互鍦ㄤ粬浠殑鍗忚涓紩鍏ヤ竴涓俊鎭獙璇佺爜錛坢essage authentication code錛屼互涓嬬ОMAC錛夈侻AC鏄牴鎹瘑閽ュ拰琚紶杈撶殑淇℃伅璁$畻鍑虹殑涓孌墊暟鎹傚墠闈㈡弿榪扮殑鎽樿綆楁硶鐨勭壒鎬у湪鐢熸垚MAC鏃舵濂藉彲浠ユ淳涓婄敤鍦猴紝鐢ㄦ潵鎶靛盡H鐨勬敾鍑伙細</p> <p>MAC= Digest[some message錛宻ecret ]</p> <p>鍥犱負H涓嶇煡閬撳瘑閽ワ紝浠栦笉鑳借綆楀嚭姝g‘鐨勬憳瑕佸箋傚嵆浣縃闅忔満騫叉壈淇℃伅錛屽彧瑕佹暟鎹噺澶э紝浠栨垚鍔熺殑鏈轟細寰箮鍏跺井銆備緥濡傦紝浣跨敤MD5錛堜竴涓猂SA鍙戞槑鐨勫ソ鐨勫姞瀵嗘憳瑕佺畻娉曪級錛岀敳鍜屼箼鑳藉緇欎粬浠殑淇℃伅鍔犱笂128浣峂AC鍊箋侶鐚滄祴姝g‘鐨凪AC鐨勫嚑鐜囧皢榪?/18錛?46錛?44錛?73錛?09錛?51錛?16錛岀害絳変簬闆躲?/p> <p>Here is the sample protocol, revised yet again: </p> <p>A->B聽hello<br />B->A聽Hi, I'm Bob, bobs-certificate<br />A->B聽prove it<br />B->A聽 聽Alice, This Is bob { digest[Alice, This Is Bob] } bobs-private-key<br />A->B 聽ok bob, here is a secret {secret} bobs-public-key<br />B->A聽{some message, MAC}secret-key </p> <p>Mallet is in trouble now. He can garble messages all he wants, but the MAC computations will reveal him for the fraud he is. Alice or Bob can discover the bogus MAC value and stop talking. Mallet can no longer put words in Bob's mouth. </p> <p>涓嬮潰鍙堜竴嬈′慨鏀瑰悗鐨勫崗璁細</p> <p>鐢測斺斻変箼錛氫綘濂?br />涔欌斺斻夌敳錛氬棬錛屾垜鏄箼錛屼箼鐨勮瘉涔?br />鐢測斺斻変箼錛氳璇佹槑<br />涔欌斺斻夌敳錛氱敳錛屾垜鏄箼 {鎽樿[鐢詫紝鎴戞槸涔橾 } 涔欑殑縐侀挜<br />鐢測斺斻変箼錛氫綘濂斤紝涔欙紝榪欐槸瀵嗛挜 {secret} 涔欑殑鍏挜<br />涔欌斺斻夌敳錛歿some message錛孧AC}secret-key</p> <p>鐜板湪H宸茬粡鏃犳妧鍙柦浜嗐備粬鍙互騫叉壈浠諱綍淇℃伅錛屼絾MAC璁$畻鑳藉鍙戠幇浠栫殑璇¤銆傜敳鍜屼箼鑳藉鍙戠幇浼犵殑MAC鍊煎茍涓斿仠姝氦璋堛侶涓嶅啀鑳藉亣鍊熶箼閫氳銆?/p> <p>WHEN WAS THAT SAID? </p> <p>Last but not least to protect against is Mallet the Parrot. If Mallet is recording conversations, he may not understand them but he can replay them. In fact, Mallet can do some really nasty things sitting between Alice and Bob. The solution is to introduce random elements from both sides of the conversation. <br />浠呬粎闃茶寖H鐨勫鑸屽紡鏀誨嚮鏄笉澶熺殑銆傚鏋淗璁板綍涓嬶紙鐢插拰涔欑殑錛夐氳錛岃櫧鐒朵粬涓嶈兘鏄庣櫧錛堥氳鐨勶級鍚箟錛屼絾鏄粬鍙互閲嶇幇錛堥氳錛夈備簨瀹炰笂錛岄殣钘忓湪鐢插拰涔欎腑闂寸殑H鍙互鍋氫竴浜涢鍏峰▉鍔╃殑鏀誨嚮銆傝В鍐蟲柟妗堟槸鍦ㄥ弻鏂歸氳涓紩鍏ラ殢鏈哄洜绱犮?br /></p> <img src ="http://www.shnenglu.com/ivenher/aggbug/12939.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ivenher/" target="_blank">鐖遍キ鐩?/a> 2006-09-25 11:33 <a href="http://www.shnenglu.com/ivenher/articles/12939.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.chemzt.cn" target="_blank">精品久久人人爽天天玩人人妻 </a>| <a href="http://www.dgtoygift.cn" target="_blank">国产精品久久成人影院</a>| <a href="http://www.iaftvc.cn" target="_blank">久久国产亚洲精品无码</a>| <a href="http://www.auto-insurance.cn" target="_blank">国内精品久久久久国产盗摄</a>| <a href="http://www.ttkanshu.cn" target="_blank">99久久综合狠狠综合久久</a>| <a href="http://www.cctt88.cn" target="_blank">亚洲香蕉网久久综合影视</a>| <a href="http://www.dfux.com.cn" target="_blank">久久精品国产福利国产琪琪</a>| <a href="http://www.bayercas.cn" target="_blank">精品国产一区二区三区久久久狼</a>| <a href="http://www.amazinghall.com.cn" target="_blank">久久亚洲天堂</a>| <a href="http://www.fc117.cn" target="_blank">无码国内精品久久人妻麻豆按摩</a>| <a href="http://www.117shop.cn" target="_blank">久久w5ww成w人免费</a>| <a href="http://www.lae.net.cn" target="_blank">国产精品成人99久久久久</a>| <a href="http://www.acolor.com.cn" target="_blank">香蕉aa三级久久毛片</a>| <a href="http://www.smash6.cn" target="_blank">久久精品国产影库免费看</a>| <a href="http://www.yteid.cn" target="_blank">国产成人久久激情91</a>| <a href="http://www.zazhui.cn" target="_blank">日批日出水久久亚洲精品tv</a>| <a href="http://www.chechuai.cn" target="_blank">久久久久亚洲AV成人片</a>| <a href="http://www.3743.com.cn" target="_blank">久久综合狠狠综合久久97色</a>| <a href="http://www.558866.com.cn" target="_blank">久久久婷婷五月亚洲97号色</a>| <a href="http://www.510dpw.cn" target="_blank">伊人久久国产免费观看视频</a>| <a href="http://www.crs24.cn" target="_blank">一本久久免费视频</a>| <a href="http://www.hydqgs.cn" target="_blank">久久精品视频免费</a>| <a href="http://www.worktrotter.cn" target="_blank">色综合久久中文字幕无码</a>| <a href="http://www.yingongshe.cn" target="_blank">中文字幕日本人妻久久久免费 </a>| <a href="http://www.xxxhj.cn" target="_blank">亚洲精品乱码久久久久久久久久久久</a>| <a href="http://www.maishuhua.cn" target="_blank">久久精品国产一区</a>| <a href="http://www.52cjw.cn" target="_blank">久久综合88熟人妻</a>| <a href="http://www.liuzirui597.cn" target="_blank">久久婷婷国产综合精品</a>| <a href="http://www.zc8899.cn" target="_blank">久久久久国产精品人妻</a>| <a href="http://www.jkzgjkzl.org.cn" target="_blank">亚洲综合伊人久久综合</a>| <a href="http://www.ki71.cn" target="_blank">久久性精品</a>| <a href="http://www.ozxt.cn" target="_blank">日日狠狠久久偷偷色综合免费</a>| <a href="http://www.yikafei.cn" target="_blank">青青青伊人色综合久久</a>| <a href="http://www.chabaibaike.cn" target="_blank">91久久精品视频</a>| <a href="http://www.5ihubei.cn" target="_blank">久久久国产视频</a>| <a href="http://www.wdmdg.cn" target="_blank">久久久久久无码Av成人影院</a>| <a href="http://www.vf369.cn" target="_blank">久久久久国产精品嫩草影院</a>| <a href="http://www.oldoak.net.cn" target="_blank">亚洲日韩欧美一区久久久久我</a>| <a href="http://www.mrzqjn.cn" target="_blank">无码人妻少妇久久中文字幕</a>| <a href="http://www.caikuaipeixun.com.cn" target="_blank">国产精品免费久久久久影院</a>| <a href="http://www.leiyaojidian.cn" target="_blank">91精品国产91久久久久久</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>