Sie sind auf Seite 1von 29

Why Data Compression?

 Make optimal use of limited storage space

 Save time and help to optimize resources

 In sending data over communication line: less


time to transmit and less storage to host
Data Compression
Methods
 Data compression is about storing and sending
a smaller number of bits.
 There’re two major categories for methods to
compress data: lossless and lossy methods
Lossless Compression
Methods
 In lossless methods, original data and the data after
compression and decompression are exactly the
same.

 Redundant data is removed in compression and


added during decompression.

 Lossless methods are used when we can’t afford to


lose any data: legal and medical documents,
computer programs.
Run-length encoding
 Simplest method of compression.
 How: replace consecutive repeating occurrences of a symbol by 1
occurrence of the symbol itself, then followed by the number of
occurrences.

 The method can be more efficient if the data uses only 2 symbols
(0s and 1s) in bit patterns and 1 symbol is more frequent than
another.
Lossy Compression Methods
 Used for compressing images and video files
(our eyes cannot distinguish minor changes, so
lossy data is acceptable).
 These methods are cheaper, less time and
space.
 Several methods:
 JPEG: compress pictures and graphics
 MPEG: compress video
 MP3: compress audio
Computer Security
deals with the prevention and
detection of unauthorised actions
by users of a computer system.

6
Definitions
 Network Security - measures to protect
data during their transmission

 Internet Security - measures to protect


data during their transmission over a
collection of interconnected networks

 We can characterize cryptographic system


by number of keys used- (single-key or
private / two-key or public)
Symmetric Encryption
 or conventional / private-key / single-key

 sender and recipient share a common key

 was only type prior to invention of public-key


in 1970’s and by far most widely used

 Example: DES, AES etc.


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 = EK(X)
X = D K( Y )
 assume encryption algorithm is known
 implies a secure channel to distribute key
Private-Key Cryptography
 traditional private/secret/single key
cryptography uses one key
 shared by both sender and receiver
 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
Symmetric and asymmetric-key cryptography will exist
in parallel and continue to serve the community. We
actually believe that they are complements of each
other; the advantages of one can compensate for the
disadvantages of the other.

Note
Asymmetric key cryptography uses two separate keys: one
private and one public.

Figure 1 Locking and unlocking in asymmetric-key cryptosystem


Need for Both

There is a very important fact that is sometimes


misunderstood: The advent of asymmetric-key
cryptography does not eliminate the need for symmetric-
key cryptography.
Why Public-Key
Cryptography?
 key distribution under symmetric
encryption requires either (1) that two
communicants already share a key, which
somehow has been distributed to them; or
(2) the use of a key distribution center.
 digital signatures
Public-Key Characteristics
 Public-Key algorithms rely on two keys where:

 it is computationally infeasible to find decryption key


knowing only algorithm & encryption key
 it is computationally easy to en/decrypt messages
when the relevant (en/decrypt) key is known
 either of the two related keys can be used for
encryption, with the other used for decryption (for
some algorithms)
Public-Key Applications
 Encryption/decryption: The sender encrypts a
message with the recipient's public key.
 Digital signature: The sender "signs" a
message with its private key. Signing is achieved
by a cryptographic algorithm applied to the
message or to a small block of data that is a
function of the message.
 Key exchange: Two sides cooperate to
exchange a session key. Several different
approaches are possible, involving the private
key(s) of one or both parties.
Difference Between Private and public key System
Conventional Encryption Public-Key Encryption
Needed to Work: Needed to Work:

1.The same algorithm with the 1.One algorithm is used for


same key is used for encryption encryption and decryption with a
and decryption. pair of keys, one for encryption
2.The sender and receiver must and one for decryption.
share the algorithm and the key. 2.The sender and receiver must
each have one of the matched pair
of keys (not the same one).

Needed for Security: Needed for Security:

1.The key must be kept secret. 1.One of the two keys must be
2.It must be impossible or at least kept secret.
impractical to decipher a message 2.It must be impossible or at least
if no other information is impractical to decipher a message
available. if no other information is
3.Knowledge of the algorithm available.
plus samples of ciphertext must 3.Knowledge of the algorithm
be insufficient to determine the plus one of the keys plus samples
key. of ciphertext must be insufficient
to determine the other key.
RSA CRYPTOSYSTEM

The most common public-key algorithm is the RSA


cryptosystem, named for its inventors (Rivest, Shamir,
and Adleman).
Figure 5 Complexity of operations in RSA
Figure 6 Encryption, decryption, and key generation in RSA
Two Algebraic Structures

Encryption/Decryption Ring: R = <Zn , +, × >

Key-Generation Group: G = <Z (n)∗, × >


Encryption
Decryption
Example

Bob chooses 7 and 11 as p and q and calculates n = 77. The


value of (n) = (7 − 1)(11 − 1) or 60. Now he chooses two
exponents, e and d, from Z60∗. If he chooses e to be 13, then
d is 37. Note that e × d mod 60 = 1 (they are inverses of each
Now imagine that Alice wants to send the plaintext 5 to Bob.
She uses the public exponent 13 to encrypt 5.

Bob receives the ciphertext 26 and uses the private key 37 to


decipher the ciphertext:
Question

 Let a=1, b=2, c=3-------,,p=3, q=7, find e


and d and encrypt a, b and c”.

 Decrypt ciphertext obtained in above


question and show that you have
recovered the correct plaintext.
Assignment 4 DOS: 12/5/2012
1. Write short notes on-
 FTP
 HTTP
 WWW
 HTML
 Remote Procedure Call
 SNMP

Das könnte Ihnen auch gefallen