Académique Documents
Professionnel Documents
Culture Documents
of EEE
4/4/2011 1 4/4/2011 2
4/4/2011 3 4/4/2011 4
Prepared by S.Muralidharan 1
CS65-COMPUTER NETWORKS Dept. of EEE
Cryptography
• Cryptography is the art of converting the original
intelligible message, referred to as “plaintext” into
random nonsense, referred to as “ciphertext”. • Plaintext vs. Ciphertext
• The process of converting the plaintext into ciphertext is – P(plaintext): the original form of a message
called “encryption”. The reverse process is called – C(ciphertext): the encrypted form
“decryption”. The user can do the “decryption” only by • Basic operations
using a secret key. – plaintext to ciphertext: encryption: C = E(P)
– ciphertext to plaintext: decryption: P = D(C)
• can be characterized by: – requirement: P = D(E(P))
– 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
4/4/2011 5 4/4/2011 6
4/4/2011 7 4/4/2011 8
Prepared by S.Muralidharan 2
CS65-COMPUTER NETWORKS Dept. of EEE
Simple substitution
• Keyless Cipher
– a cipher that does not require the use of a key
• Simple substitution
• key cannot be changed – use a correspondence table
• substitute each character by another character or symbol
• Two forms of encryption
– monoalphabetic cipher
– substitution: one letter is exchanged for another • one-by-one
– transposition: the order of the letters is rearranged
The Caesar Cipher
• Named for Julious Caesar
– Caesar used a shift of 3
– translation chart
Plaintext 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
Ciphertext 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
4/4/2011 9 4/4/2011 10
• Permutation based
– generalization of the Caesar cipher
– permutation
• 1-1
• example:
• Advantages and Disadvantages of the Caesar Cipher – use more complex rule
– advantage • use a key, a word that controls the enciphering
• easy to use Plaintext 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
– disadvantage Ciphertext k e y a b c d f g h i j l m n o p q r s t u v w x z
• simple structure
• easy to break start key: e key: k key: y
4/4/2011 11 4/4/2011 12
Prepared by S.Muralidharan 3
CS65-COMPUTER NETWORKS Dept. of EEE
Polyalphabetic Substitution-based
Polyalphabetic Substitution-based Cipher Ciphers (contd..)
•To encode the message, take the first letter of the plaintext, t, and
the corresponding key character immediately above it, C
•Similar to monoalphabetic ciphers except multiple alphabetic •Go to row C column t in the 26x26 matrix and retrieve the
strings are used to encode the plaintext cipher text character V
•For example, a matrix of strings, 26 rows by 26 characters or •Continue with the other characters in the plaintext
columns can be used
•A key such as COMPUTERSCIENCE is placed repeatedly
over the plaintext
COMPUTERSCIENCECOMPUTERSCIENCECOMPUTER
thisclassondatacommunicationsisthebest
4/4/2011 15 4/4/2011 16
Prepared by S.Muralidharan 4
CS65-COMPUTER NETWORKS Dept. of EEE
4/4/2011 17 4/4/2011 18
4/4/2011 19 4/4/2011 20
Prepared by S.Muralidharan 5
CS65-COMPUTER NETWORKS Dept. of EEE
KEY KEY
bad guy
listening in
4/4/2011 21 4/4/2011 22
Prepared by S.Muralidharan 6
CS65-COMPUTER NETWORKS Dept. of EEE
KE = KD
Key
4/4/2011 25 4/4/2011 26
4/4/2011 27 4/4/2011 28
Prepared by S.Muralidharan 7
CS65-COMPUTER NETWORKS Dept. of EEE
4/4/2011 29 4/4/2011 30
Categories of Algorithms
• Stream algorithms Stream Ciphers
– Operate on the plaintext one bit at a time • Advantage
• Block algorithms – Speed of Transposition
– Encrypt and decrypt data in groups of bits, typically 64 bits in – Low error propagation
size • Disadvantage
• Stream Cipher • Block Cipher – Low diffusion
– convert one symbol of – convert a group of • subject to the tools such as frequency distribution, digram analysis,
plaintext immediately into plaintext symbols as one the index of coincidence, and the Kasiski method
a symbol of ciphertext block – Susceptibility to malicious insertions and modifications
• integrity
4/4/2011 31 4/4/2011 32
Prepared by S.Muralidharan 8
CS65-COMPUTER NETWORKS Dept. of EEE
Block Cipher
Asymmetric Algorithms
• Use different keys for encryption and decryption
• Disadvantages
– the strengths of stream cipher
• Decryption key cannot be calculated from the encryption
• speed
key
• error propagation • Anyone can use the key to encrypt data and send it to
• Advantages the host; only the host can decrypt the data
– Diffusion • Also known as public key algorithms
• information from the plaintext if diffused into several ciphertext symbols
• one ciphertext block may depend on several plaintext letters
– Immunity to insertions: integrity
• it is impossible to insert a single symbol into one block
• the length of the block would then be incorrect, and the decipherment
would quickly reveal the insertion
• active interceptor cannot simply cut one ciphertext letter out of a
message and paste a new one in to change an account, a time, a date,
or a name of a message
4/4/2011 33 4/4/2011 34
4/4/2011 35 4/4/2011 36
Prepared by S.Muralidharan 9
CS65-COMPUTER NETWORKS Dept. of EEE
4/4/2011 37 4/4/2011 38
• A digital signature or digital signature scheme is a • A digital signature scheme typically consists of three
mathematical scheme for demonstrating the authenticity algorithms:
of a digital message or document. A valid digital – A key generation algorithm that selects a private key uniformly
signature gives a recipient reason to believe that the at random from a set of possible private keys. The algorithm
message was created by a known sender, and that it outputs the private key and a corresponding public key.
was not altered in transit. Digital signatures are – A signing algorithm that, given a message and a private key,
produces a signature.
commonly used for software distribution, financial
– A signature verifying algorithm that, given a message, public
transactions, and in other cases where it is important to key and a signature, either accepts or rejects the message's
detect forgery or tampering. claim to authenticity.
• Digital signatures employ a type of asymmetric • Two main properties are required.
cryptography. – First, a signature generated from a fixed message and fixed
private key should verify the authenticity of that message by
using the corresponding public key.
– Secondly, it should be computationally infeasible to generate a
valid signature for a party who does not possess the private key.
4/4/2011 39 4/4/2011 40
Prepared by S.Muralidharan 10
CS65-COMPUTER NETWORKS Dept. of EEE
4/4/2011 41 4/4/2011 42
4/4/2011 43 4/4/2011 44
Prepared by S.Muralidharan 11
CS65-COMPUTER NETWORKS Dept. of EEE
4/4/2011 45 4/4/2011 46
4/4/2011 47
Prepared by S.Muralidharan 12