Ron’s Code or Rivest Codes Scorecard Description RC2 RC4 RC5 RC6 Timeline 1987 1987 1994 1998 Type of Algorithm Block cipher Stream cipher Block cipher Block cipher Key size (in bits) 40 and 64 1 - 256 0 to 2040 bits (128 suggested) 128, 192, or 256 Variable key-size block cipher that was designed as a "drop-in" replacement for DES. Use Most widely used stream cipher based on a variable key-size Vernam stream cipher. It is often used in file encryption products and secure communications, such as within SSL. The cipher can be expected to run very quickly in software and is considered secure. © 2012 Cisco and/or its affiliates. All rights reserved. A fast block cipher that has a variable block size and key size. It can be used as a dropin replacement for DES if the block size is set to 64-bit. An AES finalist (Rijndael won). A 128-bit to 256- bit block cipher that was designed by Rivest, Sidney, and Yin and is based on RC5. Its main design goal was to meet the requirement of AES. 104
View full slide show




Substitution Cryptosystems  How many possible keys does an affine cipher on have? 7. Encrypt using a rotation cipher over with . 8. Encrypt using an affine cipher over with 9. Cipher X consists of a rotation, and then an affine cipher. What type of cipher is X? 10. Cipher Y is a substitution cipher over . Cipher consists of applying Y twenty-four times. What type of cipher is X? Be as specific as possible. 6.
View full slide show




Stream versions of list functions (define (snth n stream) (if (= n 0) (scar stream) (snth (sub1 n) (scdr stream)))) (define (smap f stream) (if (snull? stream) sempty (scons (f (scar stream)) (smap f (scdr stream))))) (define (sfilter f stream) (cond ((snull? stream) sempty) ((f (scar stream)) (scons (scar stream) (sfilter f (scdr stream)))) (else (sfilter f (scdr stream)))))
View full slide show




Stream versions of list functions (define (snth n stream) (if (= n 0) (scar stream) (snth (sub1 n) (scdr stream)))) (define (smap f stream) (if (snull? stream) sempty (scons (f (scar stream)) (smap f (scdr stream))))) (define (sfilter f stream) (cond ((snull? stream) sempty) ((f (scar stream)) (scons (scar stream) (sfilter f (scdr stream)))) (else (sfilter f (scdr stream)))))
View full slide show




We’ll need stream versions of other familiar list manipulation functions (define (snth n stream) (if (= n 0) (scar stream) (snth (sub1 n) (scdr stream)))) (define (smap f stream) (if (snull? stream) sempty (scons (f (scar stream)) (smap f (scdr stream))))) (define (sfilter f stream) (cond ((snull? stream) sempty) ((f (scar stream)) (scons (scar stream) (sfilter f (scdr stream)))) (else (sfilter f (scdr stream)))))
View full slide show




We’ll need stream versions of other familiar list manipulation functions (define (snth n stream) (if (= n 0) (scar stream) (snth (sub1 n) (scdr stream)))) (define (smap f stream) (if (snull? stream) sempty (scons (f (scar stream)) (smap f (scdr stream))))) (define (sfilter f stream) (cond ((snull? stream) sempty) ((f (scar stream)) (scons (scar f) (sfilter f (scdr stream)))) (#t (sfilter f (scdr stream)))))
View full slide show




Cipher Block Chaining • cipher block: if input block repeated, will produce same cipher text: t=1 … m(17) = “HTTP/1.1” t=17 • cipher block chaining: XOR ith input block, m(i), with previous block of cipher text, c(i-1) – c(0) transmitted to receiver in clear m(1) = “HTTP/1.1” block cipher c(1) block cipher c(17) m(i) c(i-1) + block cipher c(i) = “k329aM02” = “k329aM02”
View full slide show




Flow Chart Cipher Text  false false IC<=.0455 Cipher is Playfair false Cipher dist = normal dist Cipher is Vigenere false Error true IC >= .058 true IC = Index of coincidence Same freqs present Shift freq. = normal true true Cipher is Affine Cipher is Caesar true Cipher is transposition
View full slide show




SSL Cipher Suite • cipher suite – public-key algorithm – symmetric encryption algorithm – MAC algorithm Common SSL symmetric ciphers  DES – Data Encryption Standard: block  3DES – Triple strength: block  RC2 – Rivest Cipher 2: block  RC4 – Rivest Cipher 4: stream • SSL supports several cipher suites • negotiation: client, server SSL Public key encryption  RSA agree on cipher suite – client offers choice – server picks one Network © 2016 Kurose Security & Ross
View full slide show




Detect and Compress An Ins. Stream Detect a new instruction stream 1. Get next PC; 2. ndiff = PC – PPC; 3. if (ndiff != 4 or SL == MaxS) { 4. Place (SA & SL) into the instruction stream buffer; 5. SL = 1; 6. SA = PC; 7. } else SL++; 8. PPC = PC; Compress instruction stream 1. Get the next instruction stream record from the instruction stream buffer(S.SA, S.SL); 2. Lookup in the stream cache with iSet = F(S.SA, S.SL); 3. if (hit) 4. Emit(iSet && iWay) to SCIT; 5. else { 6. Emit reserved value 0 to SCIT; 7. Emit stream descriptor (S.SA, S.SL) to SCMT; 8. Select an entry (iWay) in the iSet set to be replaced; 9. Update stream cache entry: SC[iSet][iWay].Valid = 1 10. SC[iSet][iWay].SA = S.SA, SC[iSet][iWay].SL = S.SL;} 11.Update stream cache replacement indicators; 31
View full slide show




Detect and Compress An Ins. Stream Detect a new instruction stream 1. Get next PC; 2. ndiff = PC – PPC; 3. if (ndiff != 4 or SL == MaxS) { 4. Place (SA & SL) into the instruction stream buffer; 5. SL = 1; 6. SA = PC; 7. } else SL++; 8. PPC = PC; Compress instruction stream 1. Get the next instruction stream record from the instruction stream buffer(S.SA, S.SL); 2. Lookup in the stream cache with iSet = F(S.SA, S.SL); 3. if (hit) 4. Emit(iSet && iWay) to SCIT; 5. else { 6. Emit reserved value 0 to SCIT; 7. Emit stream descriptor (S.SA, S.SL) to SCMT; 8. Select an entry (iWay) in the iSet set to be replaced; 9. Update stream cache entry: SC[iSet][iWay].Valid = 1 10. SC[iSet][iWay].SA = S.SA, SC[iSet][iWay].SL = S.SL;} 11.Update stream cache replacement indicators; 18
View full slide show




Cryptography Substitution cipher A cipher that substitutes one character with another Caesar cipher A substitution cipher that shifts characters a certain number of positions in the alphabet Transposition ciphers A cipher that rearranges the order of existing characters in a message in a certain way (e.g., a route cipher) 20
View full slide show




 In Europe during the Renaissance, cryptography was becoming a routine diplomatic tool  Cryptanalysis was moving into the West during the 15th century time  By the 18th century the telegraph was invented. During the Civil War U.S. Military Telegraph Corps used route ciphers.  Many cryptanalysists invented different ciphers between the 15th and 18th century periods:  Giovanni Battista Porta (1535-1615) invented the earliest digraphic cipher.  Blaise de Vigenere (1523-1596) invented the first acceptable autokey cipher system. Also the Vigenere Square.  Francis Bacon (1561-1626) invented the Bilateral cipher.  Thomas Jefferson (1743-1826) invented the wheel cipher.  Charles Wheatstone invented the digraphic cipher (playfair cipher).
View full slide show




Stream Cipher and Block Cipher  Stream cipher   Every bit in a stream of data is encrypted Block cipher   Encrypts groupings of data in blocks Typically has specific block and key sizes Guide to Operating System Security 6
View full slide show




Stream vs. Block Cipher  A stream cipher translates plaintext into cipher text symbol by symbol › Most of the methods discussed thus far are stream ciphers › Errors like skipping a symbol will corrupt the rest of the message  A block cipher encrypts plaintext by blocks › Reduces corruption and risk of code breaking
View full slide show