modern stream cipher

Download Modern stream cipher

Post on 12-May-2015

3.240 views

Category:

Technology

3 download

Embed Size (px)

DESCRIPTION

Modern cipher include block ciphers and stream ciphers. This slide describe basic principles in building symmetric stream ciphers.

TRANSCRIPT

  • 1.Information SafeConfidentialityModern cipherVan Hoang NguyenMail: startnewday85@gmail.comDepartment of Computer ScienceFaculty of Information Technology Hanoi University of Agriculture.

2. Modern CiphersBlock cipher?Stream cipher? 3. Modern Stream cipher? 4. Stream cipher Stream cipher x l plaintext theo tng bits hoctheo tng nhm nh(8bits) Stream cipher c xy dng nh sau:- Kha ng vai tr lm input cho b sinh s ngunhin(PNG)- Output ca PNG c gi l keystream- Keystream c t hp vi plaintext tothnh ciphertextThng ch p dng cho symmetric stream cipher! 5. Stream cipherStream cipher gm hai loi: Symmetric Stream cipher - Synchronous - UnSynchronous - Periodic Asymmetric Stream cipher - Blum-Goldwasser probabilistic publickey encryption. 6. Stream cipherKhi thit k stream cipher ta cn lu hai yu t sau: Tnh ngu nhin ca PNG Key size 7. Stream cipher Nu PNG tha mn nhng yu cu t ratrong thit k th tnh an ton ca streamcipher l tng ng vi block cipher Ci t ca stream cipher thng n ginv chy nhanh hn block cipher Stream cipher cn trnh vic s dng likha Nu c c nhng tnh cht ca plaintextth stream cipher khng c an ton 8. Stream cipherng dng ca Stream cipher: M ha cc d liu ngu nhin Nhng ng dng tng tc i hithi gian gii m v m ha phinhanh 9. RC4 RC4 c thit k bi RonaldRivest vo nm 1987 Nn tng ca RC4 l phphon v ngu nhin RC4 c cu trc n gin; d hiu v phn tch Ronald L. Rivest 10. RC4 RC4 cho php kha K c c t 1 ti 256bytes(8-1024 bits) RC4 s dng hai vector 256 bytesT l vector tm thi v S l vector trng thi RC4 hot ng nh sau:1. Khi to vector S2. Kha K c s dng khi to vector T3. Vector T c s dng hon v S4. Thc hin sinh keystream v m ha(gii m) 11. RC41. Khi to vector S For i=0 to 255 do S[i]=i;2. Khi to vector T For i=0 to 255 do T[i]=K[i mode keylen];3. Vector T c s dng hon v S j=0; For i=0 to 255 do Beginj=(j+S[i]+T[i]) mode 256;swap(S[i],S[j]); End 12. RC4 4. Sinh keystream(ks) v m ha(gii m): i,j=0; While (true) do Begini=(i+1) mode 256;M ha(gii m) ngin l s dng ks j=(j+S[i]) mode 256;xor vi plaintext(ciphertext). swap(S[i],S[j]);t=(S[i]+S[j]) mode 256;ks=S[t];End 13. Operation mode for block cipher 14. Operation mode for block cipher Mt ch thi hnh l mt k thut nm nng cao hiu qu ca mt m khi cho mt loi ng dng c th. Cc ch thi hnh c nh ngha trong FIPS PUB 81 gm c: - Electronic Code Book - ECB. - Cipher Block Chaining - CBC. - Cipher FeedBack - CFB. - Outer FeedBack - OFB. - Counter - CTR. 15. Electronic codebook ModeECB encryption: ECB l ch n gin nht s dng cng mtkha m ha tt c cc khi ca plaintext. 16. Electronic codebook ModeECB decryption: 17. Electronic codebook ModeNhn xt v ECB mode: ECB v bn cht ging ht vi monoalphabeticcipher, ch c iu bng ch ci ca ECB phc tphn. ECB d dng b ph nu plaintext ln v c tnh cutrc r rng. Do m ECB thng dng m ha nhngplaintext ngn nh kha b mt. 18. Cipher Block Chaining ModeCBC encryption:CBC s dng IV nh mt gi tr khi to cho qu trnh m ha v gii m. 19. Cipher Block Chaining ModeCBC decryption: 20. Counter Mode CTR encryption: Counter ban u c khi to mt gi tr no . Sau mikhi c m ha counter=counter+1 mod 2b vi b l c cablock. 21. Counter ModeCTR decryption: 22. Counter ModeNhn xt v CTR mode: Hardware effeciency: CTR cho php m v gii mcc khi mt cch song song. CBC khng th thc hinsong song! Software effeciency: Do tn dng c li th x lsong song nn CTR s chy nhanh hn. X l: Nu b nh cho php v vn m bo c san ton th cc output ca khi m ha c th ctnh trc => t m tc m ha s rt nhanh. 23. Counter ModeNhn xt v CTR mode: Cho php truy nhp ngu nhin cc khi. V tnh an ton CTR khng mnh nh cc ch khc. CTR c ci t tng i n gin do m v gii m l nh nhau. 24. Cipher FeedBack ModeCFB encryption:CFB s dng IV lm gi tr khi to. 25. Cipher FeedBack ModeCFB decryption: 26. Outer FeedBack ModeOFB encryption: 27. Outer FeedBack ModeOFB decryption: 28. Outer FeedBack Mode V c bn OFB ging ht vi CFB. Ci tin ca OFB nhm trnh vic pht trin lit mt li trong qu trnh truyn.

Recommended

View more >