Using Modern Symmetric-Key Ciphers

Embed Size (px)

Citation preview

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    1/10

    I2

    USEOFMODERN LOCKCIPHERSUSEOFMODBRN TREAMCIPHPRS

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    2/10

    Sywwari*kq eneip.&evmeat*n be dp&e$rfug mqd.em lack eiphew"Mode.sqf, rye.wtlalt ftqve bee&devised e eneip.heteet af.'any skeemployingeither DESorAES

    E: Eucryption D: DecryptioDPi: Plaintextblock i Ci: Ciphellext block iK: Secret ey

    Fb'..-] F;;-lr{ql "' r-,{41Tffil

    Fbt"-l Fbt*l Fu',''lI _ l - IK-,1lK-ml ...*-'lglM M &DecryptioqDcryptioa

    Etor PrcpagationA single bit eftor in trunsrr.issioncqnblock. Eoweve4 the error doesnot havecteate errots I severul in the correspotdWan! effect on the other blocks,

    Elicfionic codebook ECB) mode

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    3/10

    Ciphertcxl StculingA techniqae called cipheftert stualing (CTS) can make it possible to useECB modewithoutpadding. n this technique he ast twoplainturt blocks," *_, or " *, are encrypted differently and out of order, asshown below,flssuming thst PN_, has n bits and P* has m bits, where m ! n .

    : : -X=Er(P,1.- ) -+ CA/ = heador(XJY = P,vlrlll.,-,, {X) -+ Cru- = E6 (Y)

    Cipher block chaining (CBC) modeE:Eicryptioi D:Decryltiol!: ?lai tex.l)lock Cr: Ciphertext lockK: Secrctkey IV: Initialvecior Co)

    Encryplion DeclwtionError Prcpag.ttiortIt' CBC mode, a single bit etor in cipheriext block C - duting bqflsmission may createleftor in most bits in plaintext block P .duting .lecryption.

    DecIWtion

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    4/10

    Ciphertext StealingThe ciphertexl stealing tuchnique described for ECB mode can also beapplied to CBC mode, as shown belaw,

    The head anction is the same as described in ECB mode; the pad functioninserts 0's.

    Eitcryption in cipher feedback (CFB) modeE: Encryption D: Decrlption S;:Shift isterPi: Plaintextblock i Cr: Ciphertext lock T,:Te$porary egisterK: Sesetkey IV: Initial vector S1)

    li

    Pz CzEncryption

    In CFB mode,enciphermentand decipherment se he encryption unctionofthe underlying block cipher.

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    5/10

    KEI- geoemtor

    Insecure haorel

    Enctyption in output eedback (OFB) mode

    Decry?don

    0 : tncryt)lio! 1) : Decryyion S,:Shift&gisterP,:Plrinrcxtblod( q: Cifhertexxlocki 1,: Teopoturyegi$.rK: S!'crcl l:y IV; tdii{l wct4r(Sl)l rv . r - "__"_-__-- '_ '_ "

    Ed-'WDffrynho'r

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    6/10

    OFB as a Stean CiohetKey generatoi

    (r bits) ;

    PiDecryptioD

    In the couater (CTR) mode, there is noleedbach Thepseudorandomnessn the ke!strcsm is achievedusing a counter.

    E : Encr,?tion IV: Initializatioo vcto1P,: Plairrtext lock Ci: Cjphenext lockK: Secret ey kr : Encryptionkey t

    Eacrwtion

    Key generator

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    7/10

    Coanter (CTR) mode qs d stteam cipher

    Encry?tion

    Conparisott of Different )Wotles

    Key genefator

    Decryption

    Key Senerator

    Su, u?fln' ol ope .1 iotl Ik4l c s

    Mada ' aihch ,r-birblock s elcryp{ed ndependeorlyitlrtbes$rc cipherke),. BlockciltherSAnres 6CB. bureiichbloak s fifst exckrsire-nredwith thepreviolscipl1crtcxt. IllockcrpherFach,*-bil lock s exch$ive-oredith itr r-bit key-vhich ispn|tof prcviousiipher exl Skearnciphel f < t lSatrc rsCliB. hul hosllitl rcgisteri$$pdnlcd y $cprevious ,bit kcy. Srelllnc\)he. r S r lSaoeasOFB,b{t 0 corrteris rsodi stead fl rhift.eliislcf. S||clllrrciplrcl

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    8/10

    The dea of RC4 stream cipherStutedd ky initialiraionw - . wsl0lsllt st?l sl2J5lw - . &K[oiK{rlxl2l Klls5l

    lnitlal stah!iEim(s1io

    Key

    InitiulizationInitialization is done n two steps:

    Key Streott GenerarionThe keys n the key strcam aregenerated,one b! ohe,

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    9/10

    To show the randomness of the stream key, we use a secret keywith all bytes set to 0.The key stream or 20valuesof * 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 Systemfor Mobile Commanication (GSM), a network for mobile telephonecommunication,.

    Plaintext frame Cipheftexl fra.treEncryption

  • 7/28/2019 Using Modern Symmetric-Key Ciphers

    10/10

    Key Generator45,4 ases hree LFSRs with 19, 22, and 23 bits.

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

    En crypti on Dec yptio nThe bit streams created rom the key generator are buffered to form a 228-bit key that is exclasive-ored with the plaintext frame to create theciphertext frame. Encryption/decryption is done one rame dt a time-

    Note: The three ed boxesare used n the maioritv linrction

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

    LFSR2: 22 bits 12+n + 1)

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

    1 0