Encryption
description
Transcript of Encryption
![Page 1: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/1.jpg)
1
EncryptionEncryptionConventional Conventional Encryption Encryption Message Message
ConfidentialityConfidentialityOla FlygtVäxjö University, Sweden
http://w3.msi.vxu.se/users/ofl/[email protected]
+46 470 70 86 49
![Page 2: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/2.jpg)
2
OutlineOutlineConventional Encryption PrinciplesConventional Encryption AlgorithmsCipher Block Modes of OperationLocation of Encryption DevicesKey Distribution
![Page 3: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/3.jpg)
3
Conventional Encryption Conventional Encryption PrinciplesPrinciples
An encryption scheme has five ingredients:PlaintextEncryption algorithmSecret KeyCiphertextDecryption algorithm
![Page 4: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/4.jpg)
4
Conventional Encryption Conventional Encryption PrinciplesPrinciples
![Page 5: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/5.jpg)
5
Requirements for Requirements for SecuritySecurity
Strong encryption algorithmEven if known, should not be able to
decrypt or work out keyEven if a number of cipher texts are
available together with plain texts of themSender and receiver must obtain
secret key securelyOnce key is known, all communication
using this key is readable
![Page 6: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/6.jpg)
6
CryptographyCryptographyClassified along three independent
dimensions:The type of operations used for
transforming plaintext to ciphertextThe number of keys used
symmetric (single key)asymmetric (two-keys, or public-key
encryption)The way in which the plaintext is
processed
![Page 7: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/7.jpg)
7
Average time required Average time required for exhaustive key for exhaustive key
search search Key Size (bits)
Number of Alternative Keys
Time required at 106 Decryption/µs
32 232 = 4.3 x 109 2.15 milliseconds
56 256 = 7.2 x 1016 10 hours
128 2128 = 3.4 x 1038 5.4 x 1018 years
168 2168 = 3.7 x 1050 5.9 x 1030 years
![Page 8: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/8.jpg)
8
Classical Encryption Classical Encryption TechniquesTechniques
Substitution Techniques : plaintext are replaced by other letters or by numbers or symbols Caesar Cipher Monoalphabetic Cipher Playfair Cipher Polyalphabetic Cipher
Transposition Techniques : some sort of permutation on the plaintext letters
![Page 9: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/9.jpg)
9
Caesar CipherCaesar Cipher Replacing each other letter of the alphabet
with the letter standing three places further down - plain : meet me after the toga party - cipher : PHHW PH DIWHU WKH WRJD SDUWB
Note that the alphabet is wrapped around, so that the letter following Z is A. - plain : abcdefghijklmnopqrstuvwxyz - cipher : DEFGHIJKLMNOPQRSTUVWXYZABC
If we assign a numerical equivalent to each letter(a=1, b=2 etc) - C = E(p) = (p+3) mod (26) - P = D(c) = (c–3) mod (26)
![Page 10: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/10.jpg)
10
Crypto analysis of the Crypto analysis of the Caesar CipherCaesar Cipher
brute-force cryptanalysis Simply try all the 25 possible keys.
Three important characteristic of this problem:1. The encryption/decryption algorithm
are known2. There are only 25 keys to try3. The language of the plaintext is known
and easily recognized
![Page 11: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/11.jpg)
11
Monoalphabetic CipherMonoalphabetic Cipher Cipher line can be any permutation of the 26
alphabetic characters 26! Or greater than 4*1026 possible keys If an enemy agent could check one of these possible
keys every second, it would take roughly one billion times the lifetime of the universe to check all of them and find the correct one.This simple brute force approach clearly will not work.
http://www.simonsingh.net/The_Black_Chamber/generalsubstitutionWithMenu.html
![Page 12: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/12.jpg)
12
Crypto analysis of the Crypto analysis of the Monoalphabetic CipherMonoalphabetic Cipher
Attack : regularities of the language
![Page 13: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/13.jpg)
13
Polyalphabetic CipherPolyalphabetic Cipher Instead of having one key (table) that is
used to encrypt each block of plaintext, we use several different keys.
The Vigenère cipher is the classical example.
http://www.simonsingh.net/The_Black_Chamber/Swapping_Cipher_Alphabets.html
![Page 14: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/14.jpg)
14
One time padOne time padMessages
n-bit strings [b1,…,bn]Keys
Random n-bit strings [k1,…,kn]Encryption/Decryption
c = E(b, k) = b k = [b1 k1, …, bn kn] denotes exclusive or
b = D(b, k) = c k = b k k = b [1, …, 1] = b
![Page 15: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/15.jpg)
15
One time pad (cont.)One time pad (cont.)Properties
Provably unbreakable if used properly
Keys must be truly randomMust not be used more than onceKey same size as message
![Page 16: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/16.jpg)
16
Transposition ciphersTransposition ciphersAn alternative to substitution
ciphersInstead of changing the coding
of the characters (blocks) in the plaintext, we rearrange the text.
The effect is that the cipher text and the plaintext contains the same symbols.
![Page 17: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/17.jpg)
17
Simple permutationSimple permutationAlgorithm
Divide to plaintext into blocksDecide on a permutation orderRearrange the blocks according to this
Example:Plaintext: We a|re t|he b|est!Key: 1 4 2 3Cipher text: Wae |rte |hbe |e!st
![Page 18: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/18.jpg)
18
Transposition ciphersTransposition ciphers A more complex transposition cipher is to write the
message in a rectangle, row by row, and read the message off, column by column but permute the order of the columns K e y : 4 3 1 2 5 6 7
Input : t h e e x a m p l e j u s t g i v e n s u g g e s t s t h a t m u l t
Ciphertext EEVETEJESMHLIGATPGGHXUNTUASSSLMTUTT
![Page 19: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/19.jpg)
19
Problems with Problems with classical ciphersclassical ciphers
Neither substitution nor transposition ciphers are secure enough today.
They also often have problems with complex keys that are hard to remember.
Solution?
![Page 20: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/20.jpg)
20
Product ciphersProduct ciphersCombine both methods!Simple ciphers can be
implemeted in hardwareS-box = substition cipherP-box transposition cipher
![Page 21: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/21.jpg)
21
Feistel Cipher StructureFeistel Cipher StructureVirtually all conventional block
encryption algorithms, including DES have a structure first described by Horst Feistel of IBM in 1973
The realization of a Fesitel Network depends on the choice of the following parameters and design features (see next slide):
![Page 22: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/22.jpg)
22
Feistel Cipher StructureFeistel Cipher StructureBlock size: larger block sizes mean greater
securityKey Size: larger key size means greater securityNumber of rounds: multiple rounds offer
increasing securitySubkey generation algorithm: greater
complexity will lead to greater difficulty of cryptanalysis.
Fast software encryption/decryption: the speed of execution of the algorithm becomes a concern
![Page 23: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/23.jpg)
23
![Page 24: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/24.jpg)
24
Conventional Encryption Conventional Encryption AlgorithmsAlgorithms
Data Encryption Standard (DES)The most widely used encryption
schemeThe algorithm is reffered to the Data
Encryption Algorithm (DEA)DES is a block cipherThe plaintext is processed in 64-bit
blocksThe key is 56-bits in length
![Page 25: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/25.jpg)
25
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
General description of DESGeneral description of DES
![Page 26: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/26.jpg)
26
![Page 27: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/27.jpg)
27
DESDESThe overall processing at each
iteration:Li = Ri-1Ri = Li-1 F(Ri-1, Ki)
Concerns about:The algorithm and the key length
(56-bits)
![Page 28: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/28.jpg)
28
Time to break a code (10Time to break a code (1066 decryptions/µs)decryptions/µs)
![Page 29: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/29.jpg)
29
Problem with DESProblem with DESBroken in 1998 by Electronic
Frontier FoundationUsed special purpose machine -
$250,000Took less than three daysDES IS NOT WORTHLESS!!!!
![Page 30: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/30.jpg)
30
Triple DEATriple DEAUse three keys and three executions
of the DES algorithm (encrypt-decrypt-encrypt)
C = ciphertext P = Plaintext EK[X] = encryption of X using key K DK[Y] = decryption of Y using key K
Effective key length of 168 bits
C = EK3[DK2[EK1[P]]]
![Page 31: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/31.jpg)
31
Triple DEATriple DEA
![Page 32: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/32.jpg)
32
Other Symmetric Block Other Symmetric Block CiphersCiphers
International Data Encryption Algorithm (IDEA)128-bit keyUsed in PGP
BlowfishEasy to implementHigh execution speed Run in less than 5K of memory
![Page 33: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/33.jpg)
33
Other Symmetric Block Other Symmetric Block CiphersCiphers
RC5Suitable for hardware and softwareFast, simpleAdaptable to processors of different word lengthsVariable number of roundsVariable-length keyLow memory requirementHigh securityData-dependent rotations
Cast-128Key size from 40 to 128 bitsThe round function differs from round to round
![Page 34: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/34.jpg)
34
Advanced Encryption Advanced Encryption Standard (AES)Standard (AES)
National Institute of Standards and Technology (NIST) in 1997 issued call for Advanced Encryption Standard (AES)Security strength equal to or better than
3DESImproved efficiencySymmetric block cipherBlock length 128 bitsKey lengths 128, 192, and 256 bits
![Page 35: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/35.jpg)
35
AESAESEvaluation included security,
computational efficiency, memory requirements, hardware and software suitability, and flexibility
The selected cipher was developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, and submitted to the AES selection process under the name "Rijndael"
2001, AES issued as federal informationprocessing standard (FIPS 197)
![Page 36: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/36.jpg)
36
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 37: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/37.jpg)
37
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 38: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/38.jpg)
38
Comparison tableComparison table
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 39: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/39.jpg)
39
Cipher Block Modes of Cipher Block Modes of OperationOperation
Electronic Code Book (ECB) Mode
Cipher Block Chaining (CBC) Mode
Cipher Feedback (CFB) Mode
![Page 40: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/40.jpg)
40
Electronic Code Book Electronic Code Book (ECB) Mode(ECB) Mode
Block 1 Block 2 Block 3 Block 4 Block 5 …
E(block) E(block) E(block) E(block) E(block) E(block)
Block 1 Block 2 Block 3 Block 4 Block 5 …
Plaintext
Ciphertext
• Pad last block, if necessary
Block Encryption
![Page 41: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/41.jpg)
41
Cipher Block Chaining Cipher Block Chaining ModeMode
The input to the encryption algorithm is the XOR of the current plaintext block and the preceding ciphertext block.
Repeating pattern of 64-bits are not exposed
![Page 42: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/42.jpg)
42
Cipher Block Chaining Cipher Block Chaining ModeMode
![Page 43: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/43.jpg)
43
Cipher Feedback Cipher Feedback ModeMode
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 44: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/44.jpg)
44
Location of Encryption Location of Encryption DeviceDevice
Link encryption:A lot of encryption devicesHigh level of securityDecrypt each packet at every switch
End-to-end encryptionThe source encrypt and the receiver decryptsPayload encryptedHeader in the clear
High Security: Both link and end-to-end encryption are needed
![Page 45: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/45.jpg)
45
![Page 46: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/46.jpg)
46
Key DistributionKey Distribution1. A key could be selected by A and
physically delivered to B.2. A third party could select the key and
physically deliver it to A and B.3. If A and B have previously used a key, one
party could transmit the new key to the other, encrypted using the old key.
4. If A and B each have an encrypted connection to a third party C, C could deliver a key on the encrypted links to A and B.
![Page 47: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/47.jpg)
47
Key DistributionKey DistributionSession key:
Data encrypted with a one-time session key. At the conclusion of the session the key is destroyed.
Permanent key:Used between entities for the purpose of
distributing session keys.
![Page 48: Encryption](https://reader036.fdocuments.net/reader036/viewer/2022062501/56816337550346895dd3c5e9/html5/thumbnails/48.jpg)
48