tài liệu tham khảo các hệ mật mã và phân bố, quản lý khóa
/ƯÚL1RÛL³DÂX 7KHÃJLỬLFXÝDFKXÛQJWDOXRÄQVRÄLVXĐFWURQJPXRÄQYDÚQELHÃQĨRỈQJĨØƯĐFWDĐRUDÝLFRQ QJØƯÚL9DÚWURQJWKHÃN\ÝQDÚ\PDÛ\WÏQKODÚPRỈWWURQJQKØ×QJVDÝQSKDÇPỸĨDĐLQKDÃW&XÚQJ ÛLWKƯÚLJLDQQJØƯÚLWDNKRÄQJPXRÃQVØÝGXĐQJPRỈWPDÛ\WÏQKĨƯQOHÝQØ×DPDÚVH×NHÃWQRÃLFDÛF PDÛ\QDÚ\ODĐLWKDÚQKPRỈWPDĐQJPDÛ\WÏQKQKDÊPWDÌQJNKDÝQDÌQJODÚPYLHỈFKLHÇXELHÃWWUDRĨRÇL FDỈSQKDỈWFDÛFWKRÄQJWLQg0DĐQJ,QWHUQHWODÚ[XKØỬQJSKDÛWWULHÇQFXÝDWKHÃJLỬLQJDÚ\QD\+LHỈQ QD\,QWHUQHWĨD×WÝQHÄQUDÃWSKRÇELHÃQWUHÄQWRDÚQWKHÃJLỬL 7KRÄQJTXDPDĐQJ,QWHUQHW PRĐL QJØƯÚLFRÛWKHÇWUDRĨRÇLWKRÄQJWLQÛLQKDXPRỈWFDÛFKQKDQKFKRÛQJWKXDỈQWLHỈQ1KØ×QJFRÄQJW\ SKDÛWWULHÇQYDÚNLQKGRDQKWUHÄQPRÄLWÙƯÚQJ,QWUDQHW,QWHUQHWKRĐSKDÝLĨRÃLGLHỈQÛLNKRÛNKDÌQ ÛQODÚODÚPWKHÃQDÚRĨHÇEDÝRYHỈQKØ×QJGØ×OLHỈXTXDQWURĐQJQJDÌQFKDÍQQKØ×QJKỴQKWKØÛFWDÃQ FRÄQJWUX\[XDÃWGØ×OLHỈXEDÃWKƯĐSSKDÛSWØÚEHÄQWURQJ,QWUDQHWODÅQFDÝEHÄQQJRDÚL,QWHUQHW .KLPRỈWQJØƯÚLPXRÃQWUDRĨRÇLWKRÄQJWLQÛLPRỈWQJØƯÚLKD\PRỈWWRÇFKØÛFQDÚRĨRÛWKRÄQJTXD PDĐQJPDÛ\WÏQKWKỴ\HÄXFDÂXTXDQWURĐQJODÚODÚPVDRĨHÇĨDÝPEDÝRWKRÄQJWLQNKRÄQJVDLOHỈFK KRDÍFORỈGRVØĐ[DÄPQKDỈSFXÝDNHÝWKØÛED7ÙỬFFDÛF\HÄXFDÂXFDÂQWKLHÃWĨRÛPRỈWVRÃJLDÝL WKXDỈWPD×KRÛDĨD×GØƯĐF[DÄ\GØĐQJQKDÊPĨDÝPEDÝRWÏQKDQWRDÚQGØ×OLHỈXWDĐLQƯLÒXWÙ×FX×QJ QKØNKLGØ×OLHỈXĨØƯĐFWUX\HÂQWUHÄQPDĐQJQKØFDÛFJLDÝLWKXDỈWPD×KRÛDĨRÃL[ØÛQJ (DES), JLDÝL WKXDỈWPD×KRÛDFRÄQJNKDL, . 9LHỈFWỴPKLHÇXYDÚ[DÄ\GØĐQJFKØƯQJWQKFDÛFJLDÝLWKXDỈWQDÚ\ FX×QJNKRÄQJQDÊPQJRDÚLPXĐFĨÏFKFXÝDEDÝQOXDỈQYDÌQQDÚ\/XDỈQYDÌQFRÛQKLHỈPYXĐWỴPKLHÇXO\Û WKX\HÃWYHÂPDỈWPD×KRDÛWKRÄQJWLQ[DÄ\GØĐQJVHUYHUWDĐRNKRÛDFKR user trong YDÃQĨHÂEDÝR PDỈWGØ×OLHỈX. 'RWKƯÚLJLDQYDÚNKDÝQDÌQJFRÛKDĐQWURQJNKLSKDĐPYLĨHÂWDÚLODĐLURỈQJQKØ×QJQJØƯÚL WKØĐFKLHỈQFKÈFRÛWKHÇWỴPKLHÇXĨØƯĐFPRỈWVRÃJLDÝLWKXDỈWFKÏQKQKØ'(6(&%&%&56$ 0'YDÚTXDĨRÛĨØDUDPRÄKỴQKVHUYHUWDĐRNKRÛDFKRFDÛFXVHUFXĐWKHÇODÚODÚPWKHÃQDÚRĨHÇ TXDÝQO\ÛYDÚSKDÄQSKRÃLNKRÛDPRỈWFDÛFKDQWRDÚQKLHỈXTXDÝ&KDËFFKDËQUDÊQJWDỈSWKX\HÃWPLQK QDÚ\VH×NKRÄQJWUDÛQKNKRÝLQKØ×QJWKLHÃXVRÛWQJØƯÚLWKØĐFKLHỈQPRQJQKDỈQĨØƯĐFVØĐJRÛS\ÛFKÈ GDÅQWKHÄPFXÝDFDÛF7KDÂ\&RÄEDĐQEHÚĨHÇEDÝQWKX\HÃW PLQKĨØƯĐFKRDÚQWKLHỈQKƯQ&KXÛQJ WRÄL[LQFKDÄQWKDÚQKFDÝPƯQ7KDÂ\KØỬQJGDÅQFDÛF7KDÂ\&RÄWURQJNKRDĨD×WDĐRĨLHÂX NLHỈQWKXDỈQĐLĨHÇEDÝQWKX\HÃWPLQKQDÚ\FRÛWKHÇKRDÚQWKDÚQKĨXÛQJWKƯÚLKDĐQ &KØƯQJ &DÛFKHỈPDỈWPD× +HỈPDỈWPD×ĨRÃL[ØÛQJ *LỬLWKLHỈX &DÛFJLDÝLWKXDỈWPDỈWPD×ĨRÃL[ØÛQJODÚFDÛFJLDÝLWKXDỈWVØÝGXĐQJFXÚQJPRỈWNKRÛDẸPDỈW FKRWDÛFYXĐPD×KRÛDYDÚWDÛFYXĐJLDÝLPD×9ÏGXĐQKØFDÛFJLDÝLWKXDỈWWKD\WKHÃYDÚKRDÛQJLDÝL WKXDỈW '(6g ¶½ ĨDÄ\ WD FKÈ WỴP KLHÇX JLDÝL WKXDỈW '(6 'DWD (QFU\SWLRQ 6WDQGDUG ODÚ JLDÝL WKXDỈWPDỈWPD×ĨRÃL[ØÛQJĨØƯĐFVØÝGXĐQJSKRÇELHÃQQKDÃW *LDÝLWKXDỈW'(6'DWD(QFU\SWLRQ6WDQGDUG 9DÚRQDÌP1DWLRQDO%XUHDXRIVWDQGDUGĨD×ĨØDUDFKXDÇQ'(6ĨHÇVØÝGXĐQJ FKRFDÛFØÛQJGXĐ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\YRÚQJKDLẸWTXD WUDÛL4XDSKHÛSTXD\YRÚQJQDÚ\& L YDÚ' L VH×ĨØƯĐFELHÃQĨRÇLWKDÚQK& L YDÚ' L +RDÛQ& L YDÚ ' L WKHREDÝQJ6DXNKLKRDÛQ& L ERÝTXDFDÛFẸWWDĐRWKDÚQKQØ×DWUDÛLFXÝD. L ẸWFRÚQ' L ERÝĨLFDÛFẸWWDĐRUDQØ×DSKDÝLFXÝD. L ẸW*KHÛSQØ×DWUDÛL YDÚQØ×DSKDÝLWDĐRUDNKRÛD. L ẸW *LDÝLPD× 4XDÛWQKJLDÝLPD×ĨØƯĐFWKØĐFKLHỈQWKHRFXÚQJJLDÝLWKXDỈWQDÚ\WKHRWKØÛWØĐQJØƯĐFODĐL QKØVDX,3 ODÚĨDÝRFXÝD,3YDÚƯÝYRÚQJODÍSWKØÛLVØÝGXĐQJNKRÛD. L . ƯÝYRÚQJODÍSĨDÂXWLHÄQ . ƯÝYRÚQJODÍSFXRÃLFXÚQJYDÚ 5 L / L / L 5 L ⊕)/ L . L Input .KÖÝLWDÑRKRDÛQYÔ L 1 =Ro Ro + F + F + F ³DÝRNKÖÝLWDÑRKRÛDQYÔ 2XWSXW Lo R 1 = Lo + F(R 1 ,K 1 ) L 15 = R 14 R 2 = L 1 + F(R 1 ,K 2 )L 2 = R 1 R 15 = L 14 + F(R 14 ,K 15 ) + F R 16 = L 15 + F(R 15 ,K 16 ) L 16 = R 15 1,2,3, . 64 1,2,3, . 64 1,2,3, . 32 K 1 K 2 Kn K 16 Hình 1: Encryption computation 1,2,3, . 32 &KRÑQKRÛDQYÔ /HIW6KLIW /HIW6KLIW /HIW6KLIW/HIW6KLIW /HIW6KLIW /HIW6KLIW &KRÑQKRÛDQYÔ &KRÑQKRDÛQYÔ &KRÑQKRDÛQYÔ 1,2,3, . 64 1,2,3, . 28 1,2,3, . 28 K 1 Kn K 16 +ÎQK Key Schedule Calculation Key Key Key C 1 D 1 Cn Dn C 16 D 16 S 1 S 2 S 3 S 6 S 5 S 7 S 4 S 8 P 32 bits + E 48 bits K ( 48 bits ) 5 ELWV Hình 3 : Calculation of f(R,K) 6 4 %DÝQJD%DÝQJKRDÛQYÔÓDÂXWLHÄQ,3 %DÝQJE%DÝQJKRDÛQYÔFXRÃLFXÚQJ,3 %DÝQJ%DÝQJFKRÑQEÏW( %DÝQJ%DÝQJKRDÛQYÔ3 %DÝQJ%DÝQJKRDÛQYÔNKRÛD3& %DÝQJ%DÝQJKRDÛQYÔNKRÛD3& &ROXPQ 5RZ%R[ 6 6 6 6 6 6 6 6 %DÝQJ%DÝQJFKRÑQ6ER[H[ '(6,Q(OHFWURQLF&RGH%RRN0RGH(&% ảẵPRGHQD\FDFNKRLGDWDGỉệLGDẹQJURíFOHDUWH[WểỉệẹFểỉDYDRLQSXWFXíD'(6 &DFNKRLNHWTXDíGỉệLGDẹQJPDặWPDìFLSKHUWH[WFRWKHầểỉệẹFVỉíGXẹQJFKRFDFỉQJGXẹQJ NKDF4XDWUẻQKELHQểRầLGLHQUDQKỉVDXKẻQK &OHDUWH[Wặ,QSXWEORFNặ'(6ặ2XWSXWEORFNặ&LSKHUWH[W (&%HQFU\SWLRQ (&%GHFULSWLRQ +ẻQK(OHFWURQLF&RGHERRN0RGH(&% '(6,Q&LSKHU%ORFN&KDLQLQJ0RGH&%& .KRLGDWDFDQPDìKRDểỉệẹFFKLDWKDQKFDFNKRL% % g% Q YệLNẽFKWKỉệFPRL NKRLODELWV9HFWệNKệíLWDẹR,9ELWVểỉệẹFFKRẹQ6ệểRPDặWPDìểỉRẹFFKRWURQJKẻQK 4XDWUẻQKPDìKRD ,9% & &OHDUWH[W ' ' ' ,QSXWEORFN , , g, '(6HQFU\SW 2XWSXWEORFN 2 2 g2 &LSKHUWH[W & & g& &OHDUWH[W ' ' ' &LSKHUWH[W & & g& ,QSXWEORFN , , g, '(6GHFU\SW 2XWSXWEORFN 2 2 g2 0Dì KRD & ⊕% & Q& Q ⊕% Q & Q 4XDÛWUÎQKJLDÝLPD× & ,9⊕% ,9⊕% ⊕,9 % & & ⊕% & ⊕% ⊕& % & Q & Q ⊕% Q & Q ⊕% Q ⊕& Q % Q +ÎQK&LSKHU%ORFN&KDLQLQJ&%&PRGH *LDÝL PD× ,9 % % % 3 Time = 1 Time = 2 Time = n + + + ,,, '(6HQFU\ '(6HQFU\ '(6HQFU\ & & & Q . , , , '(6GHFU\ '(6GHFU\ '(6GHFU\ ,9 + + + % % % 3 . . 0D×KRÛD *LDÝLPD×