1 Applications of Computers Lecture-4
1
Applications of Computers Lecture-4
2
Asymmetric or Public Keys
Asymmetric keys give a more robust performance
The RSA algorithm works as follows:– Sender gets the public key of recipient
(available to everyone)and uses it to encrypt the message
– Receiver uses private key (only known to receiver) to decrypt the message
3
Digital Signatures
Authentication is a core issue in e-commerce Authentication is to verify the source of a
document Authentication of paper documents is done with
watermarks, stamps, signatures and seals How to authenticate the electronic documents?
4
Authentication
With little effort, the public-private keys can be applied in reverse to perform verification of e-documents
For example, consider this e-conversation between two persons on the internet
5
Authentication
Bob--> Chuck Hi, Bob here Chuck-->Bob Prove you are Bob Bob-->Chuck Send me a random
message, I will return a digital signature (message digest encrypted using my private key)
Chuck-->Bob Random message Bob-->Chuck digital signature Chuck decrypts the message using Bob’s public key
and matches it to message digest
6
Multimedia Applications
Computers have become multimedia devices with an increasing number of applications with audio, video and graphics images
We look at basics of digitizing images and other multimedia stuff
7
Images
Computer Screen consists of thousands of pixels. Each pixel is intersection of a row and a column
Images can be digitized using bit-mapping Bit-mapped images contain pixel color and
intensity information for all the pixels on screen
8
Images
Let us assume we want to store a bit-mapped black-and-white image to memory
Each pixel can be represented by one bit that can be zero (black) or one (white)
Determine the number of bytes needed to store the image if the screen resolution is 1024 X 768
SOLUTION: 1024X768 equals 786,432 bits 786,432 divided by 8 equals 98,304 bytes
9
Images
Normally, the images stored in the computer contain much more information
TRUE-COLOR images contains 24-bit information for each pixel.
This translates into 8 bits for each of the RGB colors that are emitted in the CRT
Each color’s effect can be enhanced by increasing its 8-bit value
How many colors are possible?
10
How Many Colors?
11
How Many Colors?
With 2 bits per pixel, we can store 2 power 2 colors (4 colors)
With 3 bits per pixel, we can store 2 power 3 colors (8 colors)
With 8 bits per pixel, we can store 2 power 8 colors (256 colors)
With 24 bits per pixel, we can store 2 power 24 colors (16,777,216 or 16 Million colors)
12
Animation
Animation is a visual effect that can show things moving by rapidly changing displayed frames on screen
Animated GIF’s are easy to construct and shareware GIFConstruction Set can be used to build a series of frames that are displayed in rapid succession
Morphing is a visual technique that transforms one image into another.
13
Audio
In order to digitize analog signals such as sound, we need an ADC (analog to digital converter)
Normal conversation can be recorded in 8-bit values but for hi-fi sound, we will need 16-bit samples
Audio CD’s are recorded at the rate of 44.1KHz, the higher the sampling rate, the better is the reproduction
14
Sampling Sound
Adapted for academic use from “Exploring The Digital Domain” by Abernethy Allen, ITP 1999
15
Editing Sound
Once sound is digitized, we can edit it using digital signal processing techniques
Adding an echo effect involves inserting amplitudes equal to a percentage of some selected values at a slightly later time
Changing amplitudes involves clipping, or re-adjusting values outside the range to the max value
16
Digital Video
The analog video already consists of frames that are in a time sequence
The digitization involves capturing each frame and sampling its pixels
Raw digital video has a lot of digital still images
Digital video can be edited, it is randomly accessible and scalable
17
Compressing the Video
In its raw form, digital video delivery will push the computer to its limits
Suppose 640X480 Frame, 24-bits color info per pixel, and 30 frames per second
It translates to 216,000 Kbits per second Mix with it audio rate of 1378 Kbits per second
(stereo 16 bits per channel 44,100 samples per second) and we get total 26.5 MB per second
18
Compressing the Video
Therefore, it is necessary to compress the video at source and decompress it on displaying
This will also be good for our networks as we mostly have 10Mbps LAN connections
MPEG is the compression standard for video and it is based partly on JPEG
MPEG-1 has 150KB/s and MPEG-2 has 1.2 MB/s data rate
19
Applications of Computers (R)
We will go over the key concepts in this module
Databases: How do they work? How are they indexed?
Web opportunities E-commerce concerns Encryption, key delivery problem Multimedia
20
Databases
Databases have files. Files contain records. Records have information in fields
For example, “Employee Information” file will have one record for every employee. Each record will have fields like last name, first name, SS#, address, division etc.
In Ms-Access, tables are the database files, each field is defined as a column. A row is a record
21
Databases
To perform search in a database, we must define a field as a primary key
This primary key indexes into the database It accelerates searching by value of a field
in all records. For example, search by last name, search by
zip code
22
Binary Search Tree
In order to accelerate searching through the database, we need some efficient data structure
We introduced BST (Binary search tree) as the data structure that holds the values of a primary key field
We can build a BST of SS# or a BST of last names
23
BST Exercise
Build a BST whose root node has a value 15. Next values arrive in this order. 17, followed by 34, then 12 and finally 18
Given a BST, determine the steps needed to complete the searching
24
DBMS
Database Management Systems are of two types
Network and Relational What is the difference? Which one is faster? Which one is more flexible? Web + Database leads to ===>????
25
E-Commerce
Buying and selling online Main concern? For encryption, the fundamental operation is
the XOR with a key Original Message XOR key ==> Ciphertext Ciphertext XOR key ==> Original Message Key delivery problem
26
Asymmetric Keys
In some apartment complexes, the laundry room is locked
Every tenant gets a key to the laundry room. This is like a “public” key
If the management wants to enforce operating hours (for example, 8am to 10pm), they would install an additional lock
The key of this lock is not duplicated. It stays with the management
27
Asymmetric Keys
In a similar way, a site creates its own public and private key pair, related to each other in “strange” ways
It lets everyone download the public key but it will keep the private key secret
Suppose that John wants to send a secret message to Citibank
John will go to the Citibank website and obtain their public key
28
Asymmetric Keys
John will encrypt the message using the public key of Citibank
The message will be transmitted over the Internet
Anyone who gets this message and tries to open it using the public key of Citibank will fail (why? Remember laundry room after 10pm?)
29
Multimedia
Images are stored either as bitmapped, grayscale or color images
Storage requirements increase when we use a lot of colors
Digital video is even more demanding