[go: up one dir, main page]

0% found this document useful (0 votes)
31 views18 pages

Cryptography

Uploaded by

uheroes123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views18 pages

Cryptography

Uploaded by

uheroes123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Principals of Cryptography

Week 3
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
Some Basic Terminology
 plaintext - original message
 ciphertext - coded message
 cipher - algorithm for transforming plaintext to ciphertext
 key - info used in cipher known only to sender/receiver
 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 ciphertext without knowing key
 cryptology - field of both cryptography and cryptanalysis
Symmetric Cipher Model
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
 can characterize cryptographic system by:
 type of encryption operations used
 substitution
 transposition
 product
 number of keys used
 single-key or private
 two-key or public
 way in which plaintext is processed
 block
 stream
Cryptanalysis
 objective to recover key not just message
 general approaches:
 cryptanalytic attack
 brute-force attack
 if either succeed all key use compromised
Cryptanalytic Attacks
➢ ciphertext only
⚫ only know algorithm & ciphertext, is statistical, know or can
identify plaintext
➢ known plaintext
⚫ know/suspect plaintext & ciphertext
➢ chosen plaintext
⚫ select plaintext and obtain ciphertext
➢ chosen ciphertext
⚫ select ciphertext and obtain plaintext
➢ chosen text
⚫ select plaintext or ciphertext to en/decrypt
Classical Substitution Ciphers
 where letters of plaintext are replaced by other letters or by
numbers or symbols
 or if plaintext is viewed as a sequence of bits, then
substitution involves replacing plaintext bit patterns with
ciphertext bit patterns
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)
Use in Cryptanalysis
 key concept - monoalphabetic substitution ciphers do not
change relative letter frequencies
 discovered by Arabian scientists in 9th century
 calculate letter frequencies for ciphertext
 compare counts/plots against known values
 if caesar cipher look for common peaks/troughs
 peaks at: A-E-I triple, NO pair, RST triple
 troughs at: JK, X-Z
 for monoalphabetic must identify each letter
 tables of common double/triple letters help
Example Cryptanalysis
 given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
 count relative letter frequencies (see text)
 guess P & Z are e and t
 guess ZW is th and hence ZWP is the
 proceeding with trial and error finally get:
it was disclosed yesterday that several informal but
direct contacts have been made with political
representatives of the viet cong in moscow
Summary
 have considered:
 classical cipher techniques and terminology
 monoalphabetic substitution ciphers
 cryptanalysis using letter frequencies
 product ciphers and rotor machines
 stenography
Asymmetric Key Encryption
 The essential steps are the following:
1. Each user generates a pair of keys to be used for the encryption and
decryption of messages.

2. Each user places one of the two keys in a public register or other
accessible file.This is the public key.The companion key is kept
private.As the previous figure suggests, each user maintains a
collection of public keys obtained from others.

3. If Bob wishes to send a private message to Alice, Bob encrypts the


message using Alice’s public key.

4. When Alice receives the message, she decrypts it using her private
key. No other recipient can decrypt the message because only Alice
knows Alice’s private key.
 The two keys used for public-key encryption are referred to
as the public key and the private key.

 Invariably, the private key is kept secret, but it is


referred to as a private key rather than a secret key to avoid
confusion with conventional encryption.
References
 William Stallings, Chapter 2, Fifth Edition,Cryptography and
Network Security
,

You might also like