Vous êtes sur la page 1sur 10

I

USEOFMODERN BLOCKCIPHERS

2 USEOFMODBRN STREAM CIPHPRS

black eiphew" e*n be dp&e$rfug mqd.em Sywwari*kq eneip.&evmeat Mode.sqf, rye.wtlalt ftqve bee& devisedte eneip.hetteet af.'any ske employingeither DESor AES

Elicfionic codebook(ECB) mode


E: Eucryption Pi: Plaintextblock i K: Secretkey D: DecryptioD Ci: Ciphellext block i

Fb'..-]
r{ql

F;;-l

ffil

"' r-,{41 T

K-,1 dlK-ml ... *-'lgl

Fbt"-l Fbt*l I _ l -

Fu',''l

M M &
Decryptioq

EDcryptioa

Etor Prcpagation A single bit eftor in trunsrr.ission cqn cteate errots I severul in the correspot dW block. Eoweve4 the error doesnot have an! effect on the other blocks,

Ciphertcxl Stculing A techniqae called cipheftert stualing (CTS) can make it possible to use ECB modewithout padding. In this techniquethe last twoplainturt blocks, or are encrypted differently and out of order, as shown below, " *_, " *, has n bits and P has m bits, where m ! n . flssuming thst P N_, *

X=Er(P,1.- t) Y = P,v {X) lrlll.,-,,

-+ : -+

CA/ = heador(XJ Cru-' = E6 (Y)

Cipher block chaining (CBC) mode E:Eicryptioi l!: ?lai tex.l)lockt K: Secrctkey D:Decryltio Cr: Ciphertext blocki IV: Initialvecior(Co)

Encryplion Error Prcpag.ttiort It' CBC mode, a single bit etor

Declwtion DecIWtion

in cipheriext block C - duting bqflsmission l eftor in most bits in plaintext block P .duting .lecryption.

may create

Ciphertext Stealing The ciphertexl stealing tuchnique described for ECB mode can also be applied to CBC mode, as shown belaw,

The head fanction is the same as described in ECB mode; the pad function inserts 0's.

Eitcryption

in cipher feedback (CFB) mode D: Decrlption Cr: Ciphertext block i IV: Initial vector(S1) S;:Shiftrister T,: Te$poraryregister

E: Encryption Pi: Plaintextblock i K: Seset key

li

Pz

Cz Encryption

In CFB mode,enciphermentand deciphermentusethe encryptionfunction of the underlying block cipher.

KEI- geoemtor

Insecurechaorel Decry?don

Enctyption in outputfeedback (OFB) mode


0 : tncryt)lio! P,:Plrinrcxtblod( i kl:y K: S!'crcl 1) : Decryyion q: Cifhertexx blocki IV; tdii{l wct4r(Sl) S,:Shift&gister 1,: Teopotury legi$.r
l r v . r - " _ _" _ - __ - - ' _ - ' _ " t

Ed-'W
Dffrynho'r

OFB as a Stean Ciohet


Key generatoi Key generator

(r bits)i

Pi DecryptioD

In the couater (CTR) mode, there is no leedbach The pseudorandomnessin the ke! strcsm is achievedusing a counter.

E : Encr,?tion P,: Plairrtext blocki K: Secretkey

IV: Initializatioo vcto1 blocki Ci: Cjphenext kr : Encryptionkey t

Eacrwtion

Coanter (CTR) mode qs d stteam cipher

Key Senerator

Key genefator

Encry?tion

Decryption

Conparisott of Different )Wotles

Su, t u?fln' ol op er.1tiotl I k4l cs

Mada ' a ihch ,r-birblock is elcryp{edindependeorly vitlr tbe s$rc cipherke),. Block cilther

SAnre rs 6CB. bur eiichbloakis fifst exckrsire-nred Illock with the previols cipl1crtcxt. crpher Fach,*-bilblock is exch$ive-ored *ith itr r-bit keyvhich is pn|t of prcvious ,iipherlexl SatrcirsCliB. hul tho sllitl rcgisteri$$pdnlcd by $c previous r,bit kcy. SaoeasOFB, b{t 0 corrteris rsodi stead ofl rhift .eliislcf. Skearn ciphel
Srellln c\)he. S||clllrr ciplrcl f<tl

rSrl

The idea of RC4 stream cipher


Stutedd ky initialiraion lnitlal stah! iEim(s1io

w -.w sl0lsllt st?l


Key

sl2J5l

w -.& K[oiK{rlxl2l

Klls5l

Initiulization Initialization is done in two steps:

Key Streot t Generarion The keys in the key strcam are generated,one b! ohe,

To show the randomness of the stream key, we use a secret key with all bytes set to 0. The key stream for 20 valuesof * is (222,24, 137, 65,163, 55, 93, 58, 138,6, 30, 103, 87, ll0, 146, tog, 199, 26, 127, 163).

A5/1 (a member of the A5 family of ciph*s) is used in the Global System for Mobile Commanication (GSM), a network for mobile telephone

communication,.

Plaintext frame Cipheftexl fra.tre Encryption

Key Generator 45,4 asesthree LFSRs with 19, 22, and 23 bits.

Note: The threeled boxesare usedin the maioritv linrction

+.t' +l +; + t) LFSR l: l9 bns(xle

LFSR2: 22 bits (12+n + 1)

LFSR3i 23 bits (13 +.rr5 + .r + 1)

At a point of time the clockingbits ar 1, 0, and 1. Which LFSR is clocked(shifted)?

En crypti on/Decryptio n The bit streams createdfrom the key generator are buffered to form a 228bit key that is exclasive-ored with the plaintext frame to create the ciphertext frame. Encryption/decryption is done oneframe dt a time-

10

Vous aimerez peut-être aussi