Presentation is loading. Please wait.

Presentation is loading. Please wait.

Encryption Basics Types of ciphers Algorithms Modes Key Length

Similar presentations


Presentation on theme: "Encryption Basics Types of ciphers Algorithms Modes Key Length"— Presentation transcript:

1 Encryption Basics Types of ciphers Algorithms Modes Key Length
Internet Cryptography by Richard Smith (33 – 42) 2019/5/11

2 Encryption using Exclusive-OR
2019/5/11

3 Example - encryption Assume the plaintext is 1 1 0 0
And the key is The encrypted message (ciphertext) using exclusive-or is: (plaintext) (key) (Ciphertext) 2019/5/11

4 Example - decryption Assume the ciphertext is 0 1 1 0
And the key is (asymmetric key) The decrypted message (plaintext) using exclusive-or is: (ciphertext) (key) (original plaintext) 2019/5/11

5 Exercise – using exclusive-OR is called substitution
Given the plaintext is and the key is , determine the ciphertext using exclusive-or. The answer is  = Given the ciphertext is and the key is , determine the plaintext using exclusive-or. The answer is  = Think about the answer if the key is 2019/5/11

6 Transposition 0 0 1 0 1 1 0 1  bit 0 ciphertext
It is to re-position the bit position using an agreed method (algorithm)  bit 0 plaintext  bit 0 ciphertext 2019/5/11

7 Exercise Given the plaintext is , determine the ciphertext using the previous algorithm. The answer is : To decrypt it, you have to reverse the process. Determine the plaintext, if the ciphertext is 2019/5/11

8 Type of Ciphers There are two types: Stream and Block Stream cipher:
It is designed to accept a crypto key and a steam of plaintext to produce a stream of ciphertext Block cipher It is designed to take a block of a particular size, encrypt them with a key of a particular size and yield a block of cipertext block that is the same size of he plainetxt block. 2019/5/11

9 Stream of Ciphers The simplest stream cipher is called the Vernam cipher. A bit from the key is added with the carry discarded. (exclusive-or) 2019/5/11

10 Properties of stream and block cipher algorithms
Stream cipher: Vernam cipher Block ciphers that are in use (uses complex method, not just exclusive-or) Secret Key Block Data Block Crypto Key Size DES (data encryption standard) 64 56 International Data Encryption Algorithm 128 SKIPJACK 80 2019/5/11

11 Example of stream cipher
Give the key pattern of a stream cipher at a particular moment is: Determine the ciphertext, given the stream of plaintext at that moment is Recall that 1+1 = 0 (remove the carry), 1+0 = 1, 0 + 1= 1, = 0 (You can use exclusive or as well.) The answer is: 2019/5/11

12 Problem of Block cipher
Assume that you want to encrypt a plaintext of “book by book” and the key is 32-bit length (4 bytes). The ciphertext can be “%6Yiui90%6Yi”. You know that The first ciphertext book is %6Yi The ciphertext _by_ (_ means space) is ui90 and second ciphertext is %6Yi. You find that it is vulnerable (easy) to decrypt. 2019/5/11

13 Diagram of Electronic Code Book
Drawback: same output for the same input, it is very easy to decrypt. 2019/5/11

14 NOTE- Electronic Code Book Mode
WE EXPECT, the same plaintext will not produce the same ciphertext pattern The ciphertext depends on the initialization vector as well. That is why the initalization vector should pass to the remote as well. If it is corrupted, it never reproduces the same plaintext. (here, the vector is a random 32-bit pattern) 2019/5/11

15 Block Ciphers There are four common methods to resolve the above problem: Electronic Code Book  not block (already mentioned) Cipher Block Chaining Cipher Feedback Output Feedback Block 2019/5/11

16 Cipher Block Chaining 2019/5/11
Note: The output depends on the initialized vector, also same input will not produce the same output.

17 Cipher Feedback 2019/5/11

18 Cipher Feedback It is similar to CBC except that it feeds the ciphertext book back through the block cipher. This mode is called CTAK in military systems. An advantage is that: it is not limited to the cipher’s block size. 2019/5/11

19 Output Feedback 2019/5/11

20 Output Feedback Block (OFB)
OFB is similar to Cipher feedback but is simpler. The output from the encryption is connected to the input of next encryption stage. 2019/5/11

21 Brute Force - key lengths and the time to crack the system
Type of Key Key length No. of keys Time to test one case AVG time (divided by 2) 3-digit luggage lock 10 (2^10 = 1024) 1000 2 sec 17 min (2 sec x 1000/2)/60 sec) 4-digit bank card 14 10000 60 sec 3.5 days Netscape export crypto 40 50 micro sec 10 months DES key 56 52780 years 2019/5/11

22 Summary Simple encryption using exclusive-or (add without carry out) and transposition Type of encryption: stream and block Block uses fixed length plaintext and key Block mode: Electronic code book (ECB), cipher block chaining, cipher feedback and output feedback Drawback of ECB: It is easy to be cracked. 2019/5/11


Download ppt "Encryption Basics Types of ciphers Algorithms Modes Key Length"

Similar presentations


Ads by Google