E Commerce 4

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 30

E-Commerce

Lecture 4
SECURE MESSAGING
Threats

Security of transactions between customers and vendors in e-


commerce is a paramount importance. There are several types of
threat which may arise. Some of these are :

- Attempt to access a web site and modify/destroy its contents


- Attempt to access a web site and read confidential information
such as credit card numbers and company payroll data.
- Send malicious programs such as viruses, worms and Trojans to
a web server by a browser.
Threats
- Taken various forms of firewalls to counter these threats are
not sufficient in e-commerce.
Requirements

- Confidentiality of message sent by a customer to a vendor

- Authentication of message

- Non-repudiation of message sent

- Integrity of message.
Confidentiality of message

- Customer may send a purchase order to a vendor along


with confidential information such as a credit card number.

- Intruders may be able to read this information and copy it.


Thus, we have to ensure that intruders are not able to read
the message and even if they are able to read the message
they are not able to decipher it and get useful information
such as a credit card number. In other words, the
confidentiality of messages should be preserved.
Authentication of message

- A customer may send a purchase order to a vendor.


Intruders may intercept it and alter it and forward it or may
even replace it by altering the shipping address to their
address.

- A vendor should be able to make sure that the order was


indeed sent by the customer and that it is has not been
altered. In other words, the authenticity of message sent by a
customer has to be ensured.
Non-repudiation of message

- A customer may send a purchase order to a vendor.

- Later may claim that it was not sent by him or her, or that
the items ordered and the quantity supplied by the vendor
are not what he or she ordered. In other words, a vendor
must be sure that a customer does not repudiate the actual
order.
Integrity of message

- A customer may order some shares from a stock broker at


time T1.

-When a bill is received he or she may claim that he or she


ordered it at time T2 at which time the share prices may
have gone down by 20% and agrees to pay only the smaller
amount. This example shows the importance of time
stamping of a transaction and authenticating it.
Cryptography

• Basic idea: convert clear text (also called plain text – the
original message) to ciphertext (the encrypted message)

ciphertext = encrypt(plaintext, KE)


plaintext = decrypt(ciphertext, KC)

• Can either make the encryption process hidden, so that an


intruder cannot know it
• Or, can use a known technique and use a hidden key
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 Data Encryption with Private Key

-The general scheme used in private key encryption is shown


below.
- Encryption algorithm is a mathematical transformation of plain
text to ciphertext using a secret key k.
- The encryption algorithm uses the key to transform plain text in
such a way that the ciphertext cannot be understood by a
evesdropper who reads it.
- Different keys will produce different ciphertexts for a given plain
text.
-The ciphertext is decoded using a decryption algorithm which
also uses the same secret key, k. This is called symmetric key
cryptography.
Requirements

• The encryption algorithm is not secret. It is known to all.


• The encryption key is secret. The same key is used by both the
sender and the receiver.
• Traditional secret/single key cryptography uses one key
• The sender should be able to communicate to the receiver the
secret key by using a secure channel other than that used for
sending the massage.
• A cryptanalyst who is able to obtain several pieces of ciphertext
not be able to guess the key. (As the encryption algorithm is
normally public knowledge).
• If this key is disclosed communications are compromised
• also is symmetric, parties are equal
• hence does not protect sender from receiver forging a message &
claiming is sent by sender
Digital Encryption Standard (DES)

 This encryption method was first proposed by IBM in 1975.

 It was a standard method of encryption for a long lime but


with increase in speed of computers, it is no more considered
secure as a cryptanalyst can break the code by exhaustively
searching for all the keys using a first computer.

 However a modification of DES called tripple DES is now


used which is more secure and difficult to break.
Digital Encryption Standard (DES)

• DES is called a block cipher, as the input bit string is divided into
64-bit blocks.
• Each 64-bit block is transformed using the same key.
• DES is also called a symmetric encryption algorithm as the same
key is used for encryption as well as decryption.
• The algorithm used by DES is designed in such a way that the
operations performed for encryption and decryption can easily be
performed by hardware circuits. Thus, integrated circuit chips can
be designed to perform DES encryption of binary strings fed to it.
• DES transforms blocks of 64-bits corresponding to binary
encoding of ASCII characters of messages text.
• The algorithm uses exclusive OR operation.
Digital Encryption Standard (DES)
Basic Idea

• DES encoding is applied to blocks of 64-bits of the given plain test.


• 64-bit blocks are encrypted using a 56-bit key.
• After an initial permutation of a 64-bit block, the block is divided into a
left and a right block each 32-bits long.
• The left and right blocks are represented by L and R respectively.
• 16 rounds of identical operations are applied using a different key in each
round on the left and right halves of the block.
• After 16 rounds, the right and left halves are joined and a final permutation
which is the inverse of the initial permutation is applied to the 64-bit block
giving the final encrypted output.
Operation of One Round

• The following steps are followed in each round:


Step 1: Choose 48-bits Ki from a 56-bit key. A well defined key schedule is
essential.
Step 2: Expand Ri-1 to 48 bits by table lookup giving E(Ri-1).
Step 3: Exclusive OR E(Ri-1) with Ki.
Step 4: Compress the 48-bits results to 32 bits using substitution with table
lookup.
Step 5: Exclusive OR result with Li-1 to get Ri.

The whole process is represented by the equation: Ri = Li−1  f(Ri−1, Ki). This
algorithm is called Fiestel cypher.
• The key transformation from 56 bits to 48 bits in each round,
extension of bits and contraction of bits are all done by a set of
tables.
Initial Permutation IP

• first step of the data computation


• IP reorders the input data bits
• even bits to LH half, odd bits to RH half
• The values in each matrix identify where each bit of the input
message is mapped to in the output message. For example, The
matrix for IP shows that the 58th bit from the input gets mapped
to the first bit of the output; the 50th of the input maps to the
second of the output, and so on.
IP IP-1

58 50 42 34 26 18 10 2 40 8 48 16 56 24 64 32
60 52 44 36 28 20 12 4 39 7 47 15 55 23 63 31

62 54 46 38 30 22 14 6 38 6 46 14 54 22 62 30

64 56 48 40 32 24 16 8 37 5 45 13 53 21 61 29
57 49 41 33 25 17 9 1 36 4 44 12 52 20 60 28

59 51 43 35 27 19 11 3 35 3 43 11 51 19 59 27
61 53 45 37 29 21 13 5 34 2 42 10 50 18 58 26
63 55 47 39 31 23 15 7 33 1 41 9 49 17 57 25

Table 2. Initial and final permutation matrices for DES.


Expansion Table

• Expands the 32 bit data to 48 bits


– Result(i)=input( array(i))
– The expansion table defines a permutation plus an expansion
that involves duplication of 16 of the bits.

32 1 2 3 4 5
4 5 6 7 8 9
8 9 10 11 12 13
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
DES Decryption

- The process of decryption of DES cipher text is essentially the


same as the encryption process.
- To decrypt, the ciphertext is taken as the input to the DES
algorithm.
- The keys K1, K2, . . . . , K16 are however used in the reverse
order.
- This is a good feature of DES, because it means that we need
not implement two different algorithms to encrypt and decrypt.
- If an IC is designed to implement DES encryption, the same
chip can also be used to decrypt with the same primary key K.
DES Decryption
- The only key exchanged between the sender and the receiver is the
master key K.
- We can quickly find out the time needed to find this key by brute
force that is, trying with all possible keys to decode a cipher text.
- With 56-bit key, the number of possible keys is 2 56.
- If it takes 1 microsecond to try out a key, it will take 7x10 10
seconds to try all keys. This is approximately 1100 years.
- If we are able to increase computational speed by 106 , the time
will reduce to approximately 10 hours making DES encryption easy
to break.
- Thus, DES is no more considered very secure. And we need larger
key.
- If 3x56=168 bit key is used, the time needed to break the code
with the best computer will be around 1030 years.
Double DES?

• Using two encryption stages and two keys


– C=Ek2(Ek1(P))
– P=Dk1(Dk2(C))
• It is proved that there is no key k3 such that
– C=Ek2(Ek1(P))=Ek3(P)
• But Meet-in-the-middle attack

27
Meet-in-the-Middle Attack

• Assume C=Ek2(Ek1(P))
• Given the plaintext P and ciphertext C
• Encrypt P using all possible keys k1
• Decrypt C using all possible keys k2
– Check the result with the encrypted plaintext lists
– If found match, they test the found keys again for another
plaintext and ciphertext pair
– If it turns correct, then find the keys
– Otherwise keep decrypting C

28
Triple DES

• Tripple DES uses DES encryption algorithm with three


different keys: KA, KB, and KC each 56-bit long on 64-bit
blocks of plain text.
• The general scheme is shown below.

29
Triple DES

• This algorithm uses 168-bit key and makes this encryption


practically unbreakable.
• The use of the decryption block D in the middle has no
cryptographic significance, as the algorithms used by E and
D are the same and using KA with the first block and KB
with the second block will essentially encrypt the plain text
with two independent keys.
• The main reason D is used as the intermediate block is to
ensure compatibility with single DES.
• If KA=KB, this becomes equivalent to single DES with key
KC.
• As it uses existing DES algorithm, it is very easy to
implement in hardware.

30

You might also like