0% found this document useful (0 votes)
55 views

PU Is Security - 5. Net Security Cryptography R

Cryptography is the practice and study of techniques for secure communication in the presence of third parties. The word cryptography comes from the Greek words "kryptos" meaning hidden and "graphein" meaning writing. There are different types of cryptography including symmetric and asymmetric encryption. Symmetric encryption uses the same key for encryption and decryption while asymmetric encryption uses separate public and private keys. Common techniques include substitution ciphers which replace characters and transposition ciphers which rearrange characters.

Uploaded by

Byu PALEMBANG
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)
55 views

PU Is Security - 5. Net Security Cryptography R

Cryptography is the practice and study of techniques for secure communication in the presence of third parties. The word cryptography comes from the Greek words "kryptos" meaning hidden and "graphein" meaning writing. There are different types of cryptography including symmetric and asymmetric encryption. Symmetric encryption uses the same key for encryption and decryption while asymmetric encryption uses separate public and private keys. Common techniques include substitution ciphers which replace characters and transposition ciphers which rearrange characters.

Uploaded by

Byu PALEMBANG
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/ 40

• Combination of Greek words i.e.

Crypto+Graphy
• Crypto = “Secret” and Graphy = “Writing”
• Cryptography means secret writing

10/21/2 4
017
• Number of keys used
• Hash functions: no key
• Secret key cryptography: one key
• Public key cryptography: two keys - public, private
• Type of encryption operations used
• substitution / transposition / product
• Way in which plaintext is processed
• block / stream
• The way in which the plaintext is processed (block cipher
processes the input one block of elements at a time, producing an
output block for each input block. Stream Cipher processes the
input elements continuously, producing output one element at a
time, as it goes along
The enemy is an
outsider listening to
traffic

Two secure end systems


communicate over an
insecure channel

10/21/2 8
017
A B
intruder

• A and B communicate over an insecure channel.


• A and B trust each other.
• Intruder can read, delete, and insert messages.
• With cryptography, A and B construct a secure
logical channel over an insecure network

10/21/2 9
017
10/21/2 1
017 0
A B
TTP

• Electronic commerce: A and B are customer and


merchant; they do not “trust” each other.
• We want protection against insider fraud as much
as protection against outsiders.
• Trusted Third Parties help settle disputes.

10/21/2 1
017 1
A B
LEA

• In many countries laws regulate how a law


enforcement agency (LEA) can intercept traffic.
• Key recovery makes cryptographic keys
available to their owner.
• Key escrow makes keys available to a LEA.

10/21/2 1
017 2
• plaintext - the original message
• ciphertext - the 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) - reconverting ciphertext from plaintext
• cryptography - study of encryption principles/methods
• cryptanalysis (codebreaking) - the study of principles/
methods of deciphering ciphertext without knowing key
• cryptology - the field of both cryptography and
cryptanalysis
• Encryption: plaintext (clear text) x is converted into a ciphertext under
the control of a key K.
• We write eK(x).
• Decryption with key K computes the plaintext from the ciphertext y.
• We write dK(y).
• Symmetric ciphers: the decryption key is essentially the same as the
encryption key.
• Asymmetric ciphers: it is computationally infeasible to derive the
private decryption key from the corresponding public encryption
key.

10/21/2 1
017 4
10/21/2 1
017 5
Symmetric cipher model consists of five
elements:
 1. Plain Text
 2. Encryption algorithm
 3. Secret key
 4. Cipher text
 5. Decryption algorithm
 1. Plaintext is the original message or data that is fed into the
algorithm as input.
 2. Encryption algorithm perfonns various substitutions and
transformations on the plaintext.
 3. Secret key is a value independent of the plaintext and of
the algorithm. The exact substitutions and transfomiations
perfomied by the algorithm depend on the key.
 4. Ciphertext is the unreadable message produced as output.
It depends on the plain text and secret key.
 5. Decryption algorithm takes the cipher text and the secret
key and produces the original plain text.
 Same key is used for encryption and decryption
process. So, it is called symmetric cipher.

 Mathematically it is represented as Y = E(K, X)


◦ where Y = cipher text. E = encryption. K = Secret shared
key. X = Plain Text.
 Same as X = D(K, Y),
◦ where D = Decryption.
 For Example, Data Encryption Standard (DES),
Advanced Encryption Standard (AES) and BLOWFISH.
 Advantages:
◦ Symmetric key is faster than asymmetric key cryptography.
◦ Same key is used for encryption and decryption, receiver cannot
decrypt data without key (without sender permission).
◦ Symmetric key achieves the authentication principle because it
checks receiver’s identity.
◦ System resources are less utilized in this cryptography.
 Disadvantages:
◦ Once key is stolen while transmitted data can easily decrypt.
◦ In symmetric key cryptography, key is transmitted first and then
message is transfer to the receiver. If attacker intercept the
communication, he can easily decrypt the massage.
Asymmetric key cryptography is also called
Public Key Cryptography

Asymmetric cipher model consists of six


elements:
1. Plain Text
2. Encryption algorithm
3. Private Key
4. Public Key
5. Cipher text
6. Decryption algorithm
1. Plaintext is the original message or data
that is fed into the algorithm as input.
2. Encryption algorithm perfonns various
transformations on the plaintext.
3. Public & Private keys: This is a pair of keys
that have been selected so that if one is
used for encryption, the other is used for
decryption.
4. Ciphertext is the unreadable message
produced as output. It depends on the
plain text and key. Two different key
produced two different output.
5. Decryption algorithm takes the cipher text
and the key and produces the original
plain text.
Public key is distributed to all users and
Private key is known to particular user only.

There are two different Scenario of


encryption model:
1. Public key used for encryption and private key used for
decryption.
2. Private key used for encryption and Public key used for
decryption.
 Scenario 1 : Encryption with public key
 If Bob wants to send message to Alice, Bob must have to use
Public key of Allice. Message to be transmitted afier
encryption of message using Alice‘s public key.
 Alice has received message and she can decrypt the message
using only her private key's.
 Scenario 2: Encryption with private key
 If Bob wants to send message to Alice, Bob must have to use
his own private key. Message to be transmitted after
encryption of message using Bob‘s public key.
 Alice has received message and she can decrypt the message
using Bob's public key.
Advantages :
1. If data is transmitting on insecure channel. but key cannot
distributing among sender and receiver.
2. Separate key is used for encryption and decryption, even if
encrypted message is stolen by attacker he/she cannot
decrypt the message.
3. Easy to use for user.
Disadvantages:
1. Asymmetric key use more resource in compare to
symmetric key cryptography.
2. More mathematical calculation required.
3. Slower in compare to symmetric key cryptography.
There are basically two types of symmetric
cipher :
◦ Substitution Cipher
◦ Transposition Cipher
 Substitution Cipher: A substitution is a
technique in which each letter or bit of the
plaintext is substituted or replaced by some
other letter, number or symbol to produce
cipher text.
 For example, ABC XYZ
 Transposition Cipher: In transposition
technique, there is no replacement of
alphabets or numbers occurs instead their
positions are changed or reordering of
position of plain text is done to produce
cipher text.
 For example, ABCDE BADEC
A monoalphabetic substitution cipher, also known as
a simple substitution cipher, relies on a fixed
replacement structure.
 That is, the substitution is fixed for each letter of
the alphabet.
 Thus, if "a" is encrypted to "R", then every time we
see the letter "a" in the plaintext, we replace it with
the letter "R" in the ciphertext.
 Ceaser cipher is also monoalphabetic cipher.
1. A simple example is where each letter is encrypted
as the next letter in the alphabet:
 For example,

 Plain Text: hidden treasure

 Cipher Text: IJEEFO USFBTVSF


Types of transposition techniques:
 Columnar Transposition Cipher

 The Columnar Transposition Cipher is a fonn of transposition


cipher in which plain text represent in matrix form.
 Columnar Transposition involves writing the plaintext out in
rows, and then reading the ciphertext off in columns one by
one.
 Here I have explained encryption and decryption process of
columnar transposition cipher.
1. Width of the rows and the permutation of the columns are
usually defined by a keyword.
 Example,

 Keyword: HACK, Length of Keyword: 4,


2. Keyword HACK is of length 4 (so the rows are of length 4),
and the permutation is defined by the alphabetical order of the
letters in the keyword. In this case, the order would be “3 1 2
4“.
 Example,

 Plain Text: TREE IS GREEN, Keyword: HACK, Length of


keyword: 4,
 Order of alphabets in HACK: 3 1 2 4
3. The message is written out in rows of a fixed length.
4. Any spare spaces are filled with nulls or lefi blank or placed by a
character (Example: _ ).
 Example,

 Plain Text: TREE IS GREEN, Keyword: HACK, Length of Keyword: 4,

 Order of alphabets in HACK: 3 1 2 4


5. Finally, the message is read off in columns, in the order specified by
the keyword.
 Example,

 Plain Text: TREE IS GREEN, Keyword: HACK, Length of Keyword: 4,

 Order of alphabets in HACK: 3 1 2 4

Cipher text : RIR_ESE_T_GNE_E_


1. To decipher it, the recipient has to work out the column
lengths by dividing the message length by the key length.
 Example,

 Keyword: HACK, Length of Keyword: 4,

 CipherText: RIR_ESE_T_GNE_E_
As per above rule, column length is : 4
2. Then, write the cipher text in columns again, then
re-order the columns by refonning the keyword.
Read matrix row wise to get plain text.
 Example,

 Keyword: HACK, Length of Keyword: 4,

 Order of alphabets in HACK: 3 1 2 4

 CipherText RIR_ ESE_ T_GN E_E_


1 2 3 4

Plain text : TREE IS GREEN


 Here the possibility is that if an attacker got cipher
text.
 He/she may apply different permutation and
combinations to decrypt and obtain the original
plain text.
 So, always sender has to think on applying
different encoding technique on plain text and
convert it into cipher text. Therefore attacker
cannot read the actual message.

You might also like