Data Encryption
Nov 23, 2014
Data Encryption
INTRODUCTION Cryptography is the science of secret
using mathematics to encrypt and decrypt data.
Scrambling a message so that it’s contents are not readily accessible.
Decryption is the reverse of encryption.
Enables storage of sensitive information (from one’s personal diary to secrets of a nation).
Depends upon particular algorithms known as ciphers.
A process to convert plaintext (unencrypted text) into cipher text (encrypted text).
Keys are the soul of modern encryption.
Encryption Yesterday MASKING or Substitution is…
Individual characters being shifted by n numbers down or up the alphabetic table.
HELLOSIR becomes NKRRUYOX (A -> G)
VEILING or Transposition is..
Covering up of plaintext by first changing them into blocks of n characters each and exchanging the position of characters in each block.
(1234->3142) 1234 Plain text:DATA ENCR YPTI ONRE PORT
3142 Cipher: TDAA CERN TYIP ROEN RPTO
Simple Mathematics based algorithm and easier to decrypt.
Encryption Today Based on a specific ‘key’ or
‘password’ and the encryption algorithm alters itself such that different keys will produce different cipher texts.
The algorithm can be either
symmetrical (single key) or
asymmetrical (two keys – one for encryption and one for decryption).
Symmetric Encryption
Decryption Process
Fig: Simple process of symmetric encryption
Encryption Process
Symmetric Encryption
Are of two types.Stream Cipher (text encrypted and decrypted a letter at a time)Block Cipher (blocks of text encrypted or decrypted at a time)
Following common types of algorithm.Data Encryption Standard (DES)International Data Encryption Algorithm IDEA)RC2 and RC4Advance Encryption Standard (AES)
DES encryption has already been broken.
Algorithms like AES, IDEA, RC2 and RC4 and also 3-DES are very strong encryption system and to crack them takes a lot of time.
Unencrypted
Encrypted
by IDEA
Encrypted
by 3DES
Disadvantage of Symmetric Encryption Keys can be transmitted only through secure channels.
Data is not certified, so the authenticity of received cipher text is not verified.
If there are n number of users connected in a network, number of keys to facilitate 1 to 1 communication between each user becomes
nC2=n(n-1)/2
Third Party Accessing The
Information
Asymmetric Encryption
Fig: Simple process of asymmetric encryption
Global User accessing Public Key
Server Containing Encrypted Text
Message Transmitted
Using A’s Public Key A
A Uses his
Private Key to decrypt cipher text
Rivest, Shamir, Adleman (RSA) Use of two keys suppose K1 and
K2. Encryption by K1 and Decryption
by K2 or vice versa. Impossible to derive K1 from K2
or vice versa. Basis of RSA algorithm is that it
is easy to multiply two large prime numbers, but very difficult to find its prime factors.
A public key Algorithm.
DIAGRAM
Plain Readable Text
Plain Readable Text
10101010101011010101010101
Plain Readable Text
Plain Readable Text
Private Key
Public Key
Disadvantage of Asymmetric System
Disadvantage of Asymmetric Key Encryption
Is about 1000 times slower than symmetric encryption.
Encrypted text is about double that of plaint text.
Symmetric Asymmetric
Speed
Modern techniques of encryption Modern technique Hybrid encryption system Plain text is encrypted using
Symmetric encryption The generated key is then
encrypted using receiver’s public key.
ExamplesPGP – Pretty Good Privacy
SSL – Secure Socket Layer
Modern techniques of encryption
Plain Readable Text
Plain Readable Text
Plaintext is encrypted with session key Session Key is
encrypted with public key
Encrypted Session Key +
Cipher Text
Data Authenticity
User A wants to Send message to
B
Z intercepting Data
from A and
Sending it to B
B receives message
AB
Z
Hash function and Digital signature
Hash Function
Digital Signature
with private Key
Message Digest
Private Key
Plaintext
+
Signature
Working of Hash Function and Digital Signature
About Digital Signature Implemented through public-key
encryption Used to verify the origin and contents of
a message. Uses the private key of the sender to
verify his/her authenticity.
About Digital Certificate
Digitally signed and issued by Certificate Authority.
Verifies that the public key attached to the certificate belongs to the party stated.
Example of Digital Certificate
Yahoo Messenger “ymsg.exe” digitally signed by Yahoo Inc.
Applications and Services Military secrets Telecommunication E-commerce and E-business Internet banking Internet voting Music piracy
Military Secrets
MILITARY communication.
MILITARY Arms and ammunition information.
MILITARY database.
E-commerce and E-business
► Secure internet communication and
exchange of information.
► Electronic transactions
► Use of credit cards and debit cards.
► Privacy in internet content like emails.
► Digital authenticity of data.
► Non-repudiation ensures honesty.
Time Based Cryptography► Encryption for specific period of
time
► Decryption cannot be done until
particular interval of time or
specific date
Applications► Tender filling
► Will and Property Secrets
► Time encrypted checks
101010101001100001101010
Thank you
Questions?
Bibek ShresthaLakesh KansakarManish Modi
BCT - 061Institute of EngineeringPulchowk
Basic Process – Asymmetric Encryption
Two large prime numbers A and BC = A * BOther 2 prime numbers D and E chosen such that (D * E) mod (A-1)(B-1) = 1
Public Keys are (E,C)Private Keys are (D,C)
To encrypt X(X ^ E) mod C = encrypted text YTo decrypt Y(Y ^ D) mod C = decrypted text X
Simplified Example of asymmetric keyA = 47 and B = 71C = A * B = 3337(A – 1)(B – 1) = 46 * 70 = 3220D = 79 and E = 1019(79 * 1019) mod 3220 = 1
Encrypt password (79, 3337)Decrypt password (1019, 3337)
To encrypt 2001(2001 ^ 79) mod 3337 = 2563
To decrypt 2563(2563 ^ 1019) mod 3337 = 2001
Original Keys Given by RSAC= 114,381,625,757,888,867,669,235,779,976,146,612,010,218,296,721,242,362,562,561,84
2,935,706,935,245,733,897,830,597,123,563,958,705,058,989,075,147,599,290,026,879,543,541
encryption key (E)= 9007(E, C)