|
  Lectures 9 & 10: SECURITY by Prof. Michael Tse   for Final-Year Elective (EIE417)e-Commerce Infrastructure and Processes Today's lectureIn today's lecture, we will discuss an important issue in e-commerce -- SECURITY. The security issue arises naturally from the basic problem of anonymity and openness over the network or by any electronic means. That is,
Technologies are available for providing the needed security for doing business electronically. We will review some of the key technologies today:
The problems and solutionsSecurity is probably the number one barrier to the growth of e-commerce. Some questions to begin with:
The solutions we have to these problems are basically built around two basic ideas:
The main threatsThe are many forms of security attacks that can take place in the distributed environment.
The problem is that all these hacking tools are available from the Internet, and people can learn to see them very easily. NEXT LASTThe idea of encryption
The simplest form of encryption is to manipulate on the data through an algorithm which is known only to the sender and the intended recipient. But if the algorithm is known by other people, the security will be broken. The idea of secret keysA slightly more advanced method of encryption is to use a "key" to control the algorithm. Here, the key contains some parameters for the algorithm. Without knowing the key, the algorithm cannot be run to retrieve the data. There are two approaches for managing keys:
Private and public key cryptographyPrivate key cryptography (symmetric cryptography)A secret key is used by both sender and recipient to encrypt and decrypt the data. Examples: International Data Encryption Algorithm (IDEA) and Data Encryption Standard (DES). DES uses a 56-bit key. First, it is extended to 64 bits by adding 8 parity bits. Then, it is used to encrypt the data which has been cut up into many 64-bit blocks. The encryption is to run an algorithm over the 64-bit blocks, basically mixing them with the key through some bit-operation such as ex-OR and shifting. DES is usually implemented by software, although it was originally designed for hardware realization. Public key cryptography (asymmetric cryptography)
Normally, if we want to make sure a person truly receives a message, we do the following: we send a message to a person encrypted with that person's public key. When the person gets it, he/she can decrypt it with his/her private key. This ensures confidentiality. Moreover, if we want to assure the recipient that we are the true sender, we do the following: we encrypt a message with our private key, and the recipient uses our public key to open it. This is the basis of digital signature. A few slides later, we'll explain it in more detail. Mixed key systemsPrivate key systems are more popular because they are simpler and run faster. Public key systems are slower and used for more specialised applications such as digital signing and "transmissing a private key." Thus, many practical applications use a combined private key and public key systems, to take advantage of the better security of the private key system and the fast algorithm of the public key system. A typical example is the SSL (Secure Socket Layer), in which public key encryption is used to exchange the private key. See below. NEXT LASTIs it safe enough?To break the system, one has to guess what the key is. This can be done by a fast computer trying all keys one by one. The question is: How long do we take to try all the keys and crack the system? Let's look at a simple formula. Quite generally, we expect the time needed to guess a key to be proportional to 2^(number of bits), i.e., 2^(key length). If the key attempt rate is N per second, then the time needed to crack the key is Time = { 2^(key length) / 2N } seconds Consider the 56 bit DES system. If we have a computer that can guess 2^(47) keys per second, then we need about 5 minutes to crack the key!!! This was exactly tested by a US company who built a DES cracker with an investment of US$210,000!!! -- the Deep Crack project. That sounds pretty bad! Let's now consider a 128 bit system. Suppose we have five times more computer power. Using the formula, we need about 74 billion years to crack it. That's pretty safe in fact! The point is that if computers get faster, we need longer key length to ensure adequate security. However, we cannot just use a very long key just to prevent cracking because long keys are not efficient and the encryption and decryption times can be very long. Thus, we need to set the key long enough to prevent possible cracking, but short enough to allow fast encryption and decryption. DES can be enhanced to improve security. We have now Triple DES, which basically has three keys, hence 168 bits altogether. The cracking will be quite impossible (requiring a million years with present computers.) NEXT LASTDigital signatures Click on the picture to see a Flash animationThe purpose of a signature is for identification of the person who signs it. The recipient, seeing the signature, can be sure of the sender's identity.
How to do it electronically?Suppose I want to send a message to David with my digital signature. The mailing software will do the following:
When David receives the message, his software has to do the following to verify the signature:
One-way digest generationOne very important part of the procedure is the digest generation which MUST BE a one-way process. You can't reverse it, and you can't (very hard!) generate the same digest with a different message. In fact, the digest creation algorithm is designed to make sure that a slight difference in the message can give different digest. NOTE: Strictly speaking the digest generation is not one-to-one, but because the number of possible digests is large, we may say that the digest generation is nearly or practically "one-to-one"! The SET (Secure Electronic Transaction) used for credit card transaction throught INTERNET uses this method. NEXT LASTDigital certificatesAs we have seen from the above description, the public key infrastructure can provide a good security solution for transferring data through the network. There is, however, a problem of trust which is still not resolved. How do I know if the public key really belongs to the person (or the bank) not a imposter? How do I know if the web site is really American Express? We need to certify a person's or bank's public key by a third party who can be trusted. VeriSgn Inc is one such trusted body. Basically to certify a site or a body is to "digitally sign" the public key and other personal information by the trusted third party. That is, "the public key and personal information" is the message to which the above-described digital signing procedure is applied. The resulting encrypted message is called a digital certificate. QUESTION: WHO CAN CERTIFY THE SO-CALLED TRUSTED PARTY? Secure links
There are currently some pretty good ways to protect an Internet link or session. A common approach is to use a Secure Socket Layer (SSL) which was developed by Netscape. SSL is based on public/private key encryption to establish a secure web session between the server and the user. In fact, SSL can be generally applied to any communication between two parties. It actually is an extra layer sitting on top of the usual TCP/IP. SSL tricksThe basic trick is to send messages between server and client in a certain order and with appropriate key encryption such that
URL with SSLAny URL beginning with https indicates that the session is protected by SSL. Usually the port number for SSL communication is 443 (rather than the default 80). Other approachesThere are other methods to achieve security in HTTP, for example, by using the "basic" authentication feature. If supported by the HTTP server, the header WWW-Authenticate: Basic realm="something" will cause the browser to pops up a dialogue box prompting for a user ID and password. Alternately, we can use a CGI program to include a password prompting procedure before the browser can enter the homepage. This method is used for protecting these notes. The CGI is "htpasswd". NEXT LASTPublic key infrastructurePublic/private key pairs provide an effective mechanism to secure transmission of data. The management of keys then becomes an important issue if security is to be ensured ultimately. There are some basic questions for managing keys:
For example, a large company needs to keep all the certificates of their employees in some kind of email directory. So, if one employee wishes to send a message to another, he can first look up the directory to verify the recipient's certificate. So, the company can delete or revoke an employee's certificate. Furthermore, should then company keep the employees' private keys? Maybe it should, in case an employee's private key is lost due to a hard disk failure, for example. The company may also need to see encrypted messages sent to an employee who has left the company or is not trusted. NEXT LASTSummaryIn this lecture, we have reviewed the security problems associated with doing business over a public network. The main purpose today is to introduce some key technologies for network security. These include:
Further reading:LAST |