Sympatric Encryption

1 / 43

# Sympatric Encryption - PowerPoint PPT Presentation

Sympatric Encryption . L.Tahani Al jehani. Introduction. Definition Cryptography, a word with Greek origins, means “secret writing”. It refers to the science of transferring messages to make them secure and hard to attacks. Introduction. Components

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## Sympatric Encryption

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Sympatric Encryption

L.Tahani Al jehani

Introduction
• Definition
• Cryptography, a word with Greek origins, means “secret writing”.
• It refers to the science of transferring messages to make them secure and hard to attacks.
Introduction
• Components
• Plaintext : is the original message before being transformed.
• Ciphertext: is the message after transformation.
• Cipher : is the encryption and decryption algorithm.
• Key: is an number (or set of numbers) that the cipher, as an algorithm, operates on.
Terminology
• encipher (encrypt) - converting plaintext to ciphertext
• decipher (decrypt) - recovering ciphertext from plaintext
• cryptography - study of encryption principles/methods
• cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertextwithout knowing key
• cryptology - field of both cryptography and cryptanalysis
Cryptography Categories
• In symmetric-key cryptography, the same key is used by the sender (for encryption) and the receiver (for decryption).
• The key is shared.
Requirements
• two requirements for secure use of symmetric encryption:
• a strong encryption algorithm
• a secret key known only to sender / receiver
• mathematically have:

Y = E(K, X)

X = D(K, Y)

• assume encryption algorithm is known
• implies a secure channel to distribute key
Cryptography Categories
• In asymmetric-key cryptography, one key is used by the sender (for encryption) and other key is used by receiver (for decryption).
• The key are different.
Cryptography Categories
• Comparison
• In the symmetric-key cryptography, both sender and receiver use the same key for lock and unlock the message respectively.
• In the asymmetric-key cryptography, the sender uses a key to lock the message and the receiver uses another key to unlock the message.
Symmetric Encryption
• or conventional / private-key / single-key
• sender and recipient share a common key
• all classical encryption algorithms are private-key
• was only type prior to invention of public-key in 1970’s
• and by far most widely used
Cryptanalysis
• objective to recover key not just message
• general approaches:
• cryptanalytic attack
• brute-force attack
• if either succeed all key use compromised
More Definitions
• unconditional security
• no matter how much computer power or time is available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext
computationally secure
• Mallory can try all possible key combinations until one works, and the resulting data or message is understandable.
• You might be asking yourself, how many combinations would an attacker have to try? The answer to that question depends upon the
• encryption algorithm or cipher used.
• An algorithm is considered computationally secure if the amount of time needed to compute all possible combinations is so large that it cannot be done in any reasonable amount of time.
• This definition, “in a reasonable amount of time,” is deliberately vague, because the meaning of computationally secure is ever-changing as the speed of a computer is everincreasing. Also, most data does not need to be protected forever.
Brute Force Search
• always possible to simply try every key
• most basic attack, proportional to key size
• assume either know / recognise plaintext
Symmetric-Key Cryptography
• There are two main categories of ciphers in Symmetric-key Cryptography :
• Substitution ciphers
• Monoalphabetic
• Polyalphabetic
• Transposition ciphers
• Simple Modern Cipher:
• XOR Cipher
• Rotation Cipher
• Substitution cipher: S-box
• Transposition cipher: P-box
• Moder Round Ciphers:
• Data Encryption Standard (DES)
Substitution ciphers
• Substitution ciphers replaces one symbol with another, it can be either:
• Monoalphabetic
• Where a character (or symbol) in the plaintext is always changed to the same character (or symbol) in the ciphertext regardless of its position in the text.
• 1:1
• Polyalphabetic
• Where each occurrence of a character can have a different substitue.
• 1:N
Caesar Cipher
• earliest known substitution cipher
• by Julius Caesar
• first attested use in military affairs
• replaces each letter by 3rd letter on
• example:

meet me after the toga party

PHHW PH DIWHU WKH WRJD SDUWB

Caesar Cipher
• can define transformation as:

a b c d e f g h i j k l m n o p q r s t u v w x y z

D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

• mathematically give each letter a number

a b c d e f g h i j k l m n o p q r s t u v w x y z

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

• then have Caesar cipher as:

c = E(k, p) = (p + k) mod (26)

p = D(k, c) = (c – k) mod (26)

Substitution ciphers
• Example:
• Use the shift cipher with key=15 to encrypt the message “HELLO”
• Is this Cipher Polyalphabetic?
Cryptanalysis of Caesar Cipher
• only have 26 possible ciphers
• A maps to A,B,..Z
• could simply try each in turn
• a brute force search
• given ciphertext, just try all shifts of letters
• do need to recognize when have plaintext
• eg. break ciphertext "GCUA VQ DTGCM"
Substitution ciphers
• Examples#1 :
• Plaintext: HELLO
• Ciphertext: KHOOR
• Is the cipher monoalphabetic?
• Examples#2 :
• Plaintext: HELLO
• Ciphertext: ABNZF
• Is the cipher monoalphabetic?
Transposition cipher
• Transposition cipher, it reorders (permutes) symbols in a block of symbols.
• Key is a mapping between the position of the symbols in the plaintext and cipher text.
Transposition cipher
• Example :
• Encrypt the message “HELLO MY DEAR,” using the key shown in the previous figure.
• Solution
• First remove the spaces in the message.
• Then divide the text into blocks of four characters.
• Add a bogus character Z at the end of the third block.
• The result is HELL OMYD EARZ.
• Ciphertext will be  ELHLMDOYAZER.
Transposition cipher
• Using same Example decrypt the message “ELHLMDOYAZER”.
• Solution
• The result is HELL OMYD EARZ. After removing the bogus character and combining the characters, we get the original message “HELLO MY DEAR.”
Simple Modern Ciphers Vs Traditional Ciphers
• The traditional ciphers are character-oriented; however, Simple Modern Ciphers are bit-oriented.
• Bit-oriented ciphers are needed because:
• Information to be encrypted is not just text, it can be graphics, audio, and video data.
• It is provide more security.
• Modern ciphers is made up of simple ciphers.
Type of Cipher
• Stream Cipher
• Block cipher
• Both do :Combination of input plaintext and key to produce cipher text
• They differ in : How the plaintext and key and combined
Stream cipher
• Characterized by operating on one symbol at a time
• The alphabetic substitutions we have seen so far have been stream ciphers
• If the algorithm is XOR, this is a stream cipher
Stream cipher
• It provides integrity. If any of the cipher text bits are changed, it will be obvious to Bob when he decrypts the message
• There are some stream ciphers that do not propagate errors through the entire message. that means if an error occurs while the message is being sent from Alice to Bob, it will only prevent that section of the message from being decrypted properly.
• It is very fast algorithm using in mobile encryption
• Stream ciphers:
• –They operate relatively fast since they work on only one character at a time
• –Lower error propagation since each symbol is affected only by itself
Block Ciphers
• Characterized by operating on more than one symbol at a time
• A block cipher takes a group of symbols as input, combines them without output, and outputs a block of cipher text
• if the algorithm is XOR, this is a block cipher:
Block Ciphers
• each block is processed independently, and there is no correlation between the encrypting of one message block and another.
• repeated blocks (problem )
• order of blocks ( problem )
• Although the encryption method provides confidentiality, integrity can be broken.
• Solution : block ciphers use different encryption modes.
Encryption modes.
• Electronic code book (ECB)
• Cipher-block chaining (CBC)
• Propagating cipher-block chaining (PCBC)
• Cipher feedback (CFB)
• Output feedback (OFB)
XOR Cipher
• An XOR operation needs two data inputs: plaintext and a key.
• The size of the plaintext, key, and ciphertext are the same.
Rotation Cipher
• In rotation cipher, the input bits are rotated to the left or right.
• The rotation can be either keyed or keyless.
• In Keyed , the value of the key in = # of rotations.
• In the keyless, the number of rotation is fixed.
NOTES in Rotation Cipher
• If the length of the original stream is N, after N rotation, we get the original message.
• The decryption algorithm for the rotation cipher uses the same key and the opposite rotation direction.
Substitution Cipher: S-box
• The S-box is normally keyless.
• The function that matches the input to the output is defined either mathematically or by a table.

Sharing the keys:

• The key issharedbefore communication begins.
• If Alice wants to communicatewith Bob, but she has never met Bob before. How can Alice and Bob communicatesecurely?
• Theycouldcreate keys and encryptthemso no one knows the keys.
• Solution 1:
• Use a trustedthird party.
Sharing the keys
• Sharing the keys:
• Alice create a key to beused to communicatewith Bob. Shewillencryptthis key using a pre-shared key thatshe has with Trent.
• Trent willdecrypt and encryptagainwith a shared key with Bob.
• Problem: what if Trent is not really Trent but anotherperson?
Sharing the keys
• Sharing the keys:
• Solution 2: key agreement protocol
• Alice and Bob agree to use a specificprime number (p) and a base number (g).
• Alice and Bob eachchoose a secret integer.
• Suppose that the secreteintegerchoosen by Alice isais the secreteintegerchoosen by Bob isb.
• Alice sends : g amod p
• Bob sends: g bmod p
• Alice calculates the key = (Message bob)amod p
• Bob calculates the key = (Message Alice) bmod p
Modern Round Ciphers
• The ciphers of today are called round ciphers because they involve multiple rounds.
• Each round is a complex cipher made up of simple ciphers.
• They key used in each round is a subset or variation of the general key called the round key.
Modern Round Ciphers
• There are three modern symmetric key ciphers:
• Data Encryption Standard (DES).
• Triple DES.