An Toan Mang May Tinh - Bai 4

Embed Size (px)

DESCRIPTION

a

Text of An Toan Mang May Tinh - Bai 4

  • AN TOAN TON N MMNG MNG MY TY TNH NH

    ThS. T NguyThS. T Nguyn Nhn Nht Quangt Quang

    TrTrngng ii HHcc CngCng NghNgh ThngThng TinTinKhoaKhoa MMngng MMyy TTnhnh vv TruyTruynn ThngThng

  • ATMMT ATMMT -- TNNQTNNQ 22

    NNI DUNG MN HI DUNG MN HCC

    1.1. TTng quan vng quan v an ninh man ninh mngng2.2. CCc phc phn mn mm gy hm gy hii3.3. CCc gic gii thui thut m hot m ho dd liliuu4.4. M hoM ho khokho cng khai vcng khai v ququn l khon l kho5.5. ChChng thng thc dc d liliuu6.6. MMt st s giao thgiao thc bc bo mo mt mt mngng7.7. BBo mo mt mt mng khng dyng khng dy8.8. BBo mo mt mt mng vng vnh ainh ai9.9. TTm kim kim phm pht hit hin xm nhn xm nhpp

  • M HOM HOKHOKHO CNG KHAI CNG KHAI & QU& QUN L KHON L KHO

    BBI 4I 4

  • ATMMT ATMMT -- TNNQTNNQ 44

    M hoM ho khokho cng khai vcng khai v ququn l khon l kho

    1.1. SS nguyn tnguyn t

    2.2. HH m hom ho khokho cng khaicng khai

    3.3. Giao thGiao thc trao c trao i khoi kho DiffieDiffie--HellmanHellman

    4.4. HH RSARSA

    5.5. QuQun l khon l kho

    6.6. BBi ti tpp

  • ATMMT ATMMT -- TNNQTNNQ 55

    1. S1. S nguyn tnguyn t GiGii thii thiuu

    BBtt kk ss nguyn a nguyn a > 1> 1 u cu c thth vivit dt di i ddng:ng:a = pa = p11a1a1pp22a2a2pp33a3a3ppttatat

    trong trong pp11 < p< p22 < < < p< ptt ll ccc sc s nguyn tnguyn t..VV dd::

    8585 = 5 x 17= 5 x 1791 91 = 7 x 13= 7 x 1312001200 = 2= 244 x 3 x 5x 3 x 522

    1101111011 = 7 x 11= 7 x 1122 x 13x 13

  • ATMMT ATMMT -- TNNQTNNQ 66

    1. S1. S nguyn tnguyn t GiGii thii thiuu

    MMt st s nguyn p> 1 lnguyn p> 1 l ss nguyn tnguyn t nnu vu vchch nnu u c duy nhc duy nht ct ca na n ll 1 v1 v p. p.

    SS nguyn tnguyn t ng vai tr quan trng vai tr quan trng trong l ng trong l thuythuyt st s vv trong ctrong cc kc k thuthut m hot m ho khokhocng khai thcng khai tho luo lun trong chng nn trong chng ny. y.

    BBng dng di y tri y trnh bnh by cy cc sc s nguyn tnguyn tnhnh hn hn 2000.2000.

  • ATMMT ATMMT -- TNNQTNNQ 77

    1. S1. S nguyn tnguyn t

  • ATMMT ATMMT -- TNNQTNNQ 88

    1. S1. S nguyn tnguyn t ThuThut tot ton tn tm dy sm dy s nguyn tnguyn t nhnh hn n hn n -- ddng ng

    thuthut tot ton cn ca nha nh toton hn hc Hy lc Hy lp Eratosthenes.p Eratosthenes.-- LiLit k tt k tt ct c ccc sc s nguyn tnguyn t 2 2 n n.n n.

    -- SS u tin (2) lu tin (2) l ss nguyn tnguyn t..

    -- LoLoi ti tt ct c ccc bc bi ci ca 2 ra kha 2 ra khi bi bng.ng.

    -- SS nguyn ngay sau snguyn ngay sau s 2 sau khi lo2 sau khi loi (si (sng) lng) l ssnguyn tnguyn t (s(s 3).3).

    -- LoLoi bi b ttt ct c ccc bc bi ci ca 3.a 3.

    -- ......

    -- Khi tKhi tm m c mc mt st s nguyn tnguyn t lln hn cn bn hn cn bc 2 cc 2 ca a n, tn, tt ct c ccc sc s cn lcn li khng bi khng b loloi ra i ra u lu l ssnguyn tnguyn t..

  • ATMMT ATMMT -- TNNQTNNQ 99

    1. S1. S nguyn tnguyn t ThuThut tot ton tn tm dy sm dy s nguyn tnguyn t nhnh hn n hn n::

    L = {2, 3, ..., n};L = {2, 3, ..., n};i = 1;i = 1;While (L[i]While (L[i]22

  • ATMMT ATMMT -- TNNQTNNQ 1010

    2. H2. H m hom ho khokho cng khaicng khai

    c xy dc xy dng trn tng trn tng hng hm mm mt chit chiu.u.

  • ATMMT ATMMT -- TNNQTNNQ 1111

    2. H2. H m hom ho khokho cng khaicng khaiCc bc ch yu khi thc hin m ho kho cng khai:

    1. Mi user to ra mt cp kho c s dng cho vic m ho v gii m thng ip.

    2. Mi user t mt trong hai kho trong mt ng k cng cng. y l kho cng khai. Kho cn li c gi kn.

    3. Nu Bob mun gi mt tin nhn b mt cho Alice, Bob m ho tin nhn ny bng cch s dng kho cng khai ca Alice.

    4. Khi Alice nhn c tin nhn, c gii m n bng cch sdng kho ring ca mnh. Khng c ai khc c th gii m thng ip bi v ch c Alice bit kho ring ca Alice.

  • ATMMT ATMMT -- TNNQTNNQ 1212

    2. H2. H m hom ho khokho cng khaicng khai

    LLch sch s hhnh thnh thnhnh:: Nm Nm 19761976, , Whitfield DiffieWhitfield Diffie vv Martin Martin

    HellmanHellman cng bcng b mmt ht h ththng ng mmt m t m hoho khokho bbt t i xi xngng trong trong nu ra nu ra phng phphng php trao p trao i khi kha cng khai.a cng khai.

    Trao Trao i khoi kho DiffieDiffie--HellmanHellman ll phng phng phphp cp c thth p dp dng trn thng trn thc tc t u tin u tin phn phphn phi khoi kho bb mmt thng qua mt thng qua mt t knh knh thng tinthng tin khng an tokhng an ton.n.

  • ATMMT ATMMT -- TNNQTNNQ 1313

    2. H2. H m hom ho khokho cng khaicng khai LLch sch s hhnh thnh thnhnh:: ThuThut tot ton n u tin u tin c c RivestRivest, , ShamirShamir vv

    AdlemanAdleman ttm ra vm ra vo nm o nm 19771977 tti i MITMIT. Cng . Cng trtrnh nnh ny y c cng bc cng b vvo nm o nm 19781978 vv thuthut t toton n c c t tn lt tn l RSARSA. .

    RSA sRSA s ddng phng php top ton tn tnh hnh hm mm m mun mun (m(mun un c tc tnh bnh bng tng tch sch s cca 2 sa 2 s nguyn nguyn tt lln)n) m hm haa vv gigii mi m ccng nh tng nh to cho chk sk s. An to. An ton cn ca a thuthut tot tonn c c m bm bo o vvi ii iu kiu kin ln l khng tkhng tn tn ti ki k thuthut hit hiu quu qu phn tphn tch mch mt st s rrt lt ln thn thnh nh ththa sa snguyn tnguyn t. .

  • ATMMT ATMMT -- TNNQTNNQ 1414

    2. H2. H m hom ho khokho cng khaicng khai

    ng dng dngng:: ng dng dng thng dng thng dng nhng nht ct ca ma mt m t m

    hoho khokho cng khai lcng khai l bbo mo mtt (m (m hoho/gi/gii m): mi m): mt vn bt vn bn n c c m hom hobbng ng khokho cng khaicng khai cca ma mt ngt ngi si sddng thng th chch cc thth gigii mi m vvi i khokho bbmmtt cca nga ngi i ..

  • ATMMT ATMMT -- TNNQTNNQ 1515

    2. H2. H m hom ho khokho cng khaicng khai

    Encryption

  • ATMMT ATMMT -- TNNQTNNQ 1616

    2. H2. H m hom ho khokho cng khaicng khai

    Y = E(PUb, X)X = D(PRb, Y)

    Secrecy

  • ATMMT ATMMT -- TNNQTNNQ 1717

    2. H2. H m hom ho khokho cng khaicng khai

    ng dng dngng:: CCc thuc thut tot ton tn to o chch k sk s khokho cng cng

    khai ckhai c thth ddng ng chchng thng thcc: M: Mt t ngngi si s ddng cng c thth m hom ho vn b vn bn n vvi i khokho bb mmtt cca ma mnh. Nnh. Nu mu mt t ngngi khi khc cc c thth gigii mi m vvi i khokhocng khaicng khai cca nga ngi gi gi thi th cc thth tin tin rrng vn bng vn bn thn thc sc s xuxut pht pht tt t ng ngi i ggn vn vi khoi kho cng khai cng khai ..

  • ATMMT ATMMT -- TNNQTNNQ 1818

    2. H2. H m hom ho khokho cng khaicng khai

    Authentication

  • ATMMT ATMMT -- TNNQTNNQ 1919

    2. H2. H m hom ho khokho cng khaicng khai

    Authentication

  • ATMMT ATMMT -- TNNQTNNQ 2020

    2. H2. H m hom ho khokho cng khaicng khai ng dng dngng::

    Trao Trao i khoi kho: Hai bn h: Hai bn hp tp tc c trao trao i session i session key. Ckey. C mmt st s phng ph phng php tip tip cp cn khn khc nhau lin c nhau lin quan quan n cn cc khc kha ba b mmt ct ca ma mt hot hoc cc c hai bn. hai bn.

    TrTrc tin, m hoc tin, m ho thng i thng ip X sp X s ddng khong khosecret csecret ca nga ngi gi gi (cung ci (cung cp chp ch k sk s) ) c c Y.Y.KK , m ho, m ho titip Y vp Y vi khoi kho public cpublic ca nga ngi i nhnhn.n.ChCh cc ng ngi nhi nhn xn xc c nh trnh trc mc mi ci c khokhosecret csecret ca nga ngi nhi nhn vn v khokho public cpublic ca nga ngi i ggi i gigii m hai li m hai ln n c X.c X.

  • ATMMT ATMMT -- TNNQTNNQ 2121

    2. H2. H m hom ho khokho cng khaicng khai

    Authentication v Secrecy

    Z = E(PUb, E(PRa, X))X = D(PUa, D(PRb, Z))

  • ATMMT ATMMT -- TNNQTNNQ 2222

    2. H2. H m hom ho khokho cng khaicng khai

    MMt st s gigii thui thut ht h m hom ho khokho cng khaicng khai

    Algorithm Encryption/Decryption

    DigitalSignature

    KeyExchange

    RSA x x x

    Elliptic Curve x x x

    Diffie-Hellman x

    DSS x

  • ATMMT ATMMT -- TNNQTNNQ 2323

    2. H2. H m hom ho khokho cng khaicng khai nh nghnh nghaa::

    Cho cCho cc tc tp hp hu hu hn S vn S v T.T.

    HHm mm mt chit chiu f: Su f: S T lT l hhm khm kh nghnghch thoch tho:: f df d ththc hic hin; cho x n; cho x S, dS, d ddng tng tnh nh c y = c y =

    f(x).f(x).

    ff--1 1 ll hhm ngm ngc cc ca f, kha f, kh ththc hic hin; cho y n; cho y T, T, rrt kht kh ttnh nh c x = fc x = f--11(y).(y).

    ff--11 chch cc thth ttnh nh c khi bic khi bit thm mt thm mt st sthng tin cthng tin cn thin thit.t.

  • ATMMT ATMMT -- TNNQTNNQ 2424

    2. H2. H m hom ho khokho cng khaicng khai

    VV dd::f: pq f: pq n ln l hhm mm mt chit chiu vu vi p vi p v q lq lccc sc s nguyn tnguyn t llnn..

    CC thth dd ddng thng thc hic hin phn php nhn pq p nhn pq (( phphc tc tp a thp a thc).c).

    TTnh fnh f--11 (phn t(phn tch ra thch ra tha sa s nguyn tnguyn t -- phphc tc tp mp m) l) l bbi toi ton cn cc kc k khkh..

  • ATMMT ATMMT -- TNNQTNNQ 2525

    3. Giao th3. Giao thc trao c trao i khoi kho DiffieDiffie--HellmanHellman

    MMc c ch cch ca thua thut tot ton ln l cho phcho php hai p hai ngngi di dng trao ng trao i khi kha ba b mmt dt dng ng chung trn mchung trn mng cng cng cng cng, sng, sau au cc ththss ddng ng m hm ha ca cc thng ic thng ip. p.

    ThuThut tot ton tn tp trung vp trung vo gio gii hi hn vin vic trao c trao i ci cc gic gi trtr bb mmt, xy dt, xy dng dng da trn a trn bbi toi ton khn kh logarit rlogarit ri ri rc.c.

  • ATMMT ATMMT -- TNNQTNNQ 2626

    3. Giao th3. Giao thc trao c trao i khoi kho DiffieDiffie--HellmanHellman

    Giao thGiao thc trao c trao i khoi kho gigia A va A v B: B: A vA v B thB thng nhng nht cht chn chung mn chung mt st s nguyn tnguyn t q vq v

    mmt pht phn tn t sinh sinh .. A chA chn ngn ngu nhin mu nhin mt st s XXAA {1, 2, ..., q{1, 2, ..., q--1} r1} ri gi gi i

    cho B kcho B kt qut qu YYAA = = XAXA mod q.mod q. B chB chn ngn ngu nhin mu nhin mt st s XXBB {1, 2, ..., q{1, 2, ..., q--1} r1} ri gi gi i

    cho