The various provisions a database system may make for authorization may not be sufficient protection or highly sensitive data. In such cases, data may be encrypted. It is not possible for encrypted data to be read unless the reader knows how to decipher (decrypt) the encrypted data.
There are a vast number of techniques for the encryption of data. Simple techniques for encryption may not provide adequate security since it may be easy for an authorized user to break the code. As an example of a bad encryption technique, consider substitution of each character with the next character in the alphabet. Thus:
Perryridge
becomes:
Qfsszshehf
If an unauthorized user sees only ?Qfsszsjehf,? there is probably insufficient information to break the code. However, if the intruder sees a large number of encrypted branch names, the intruder could use statistical data regarding the relative frequency of characters (for example, ?e? is more common than ?x?) to guess what substitution is being made.
Good encryption techniques have the following properties:
It is relatively simple for authorized users to encrypt and decrypt data. The encryption scheme depends not on the secrecy of the algorithm but on a parameter of the algorithm called the encryption key. It is extremely difficult for an intruder to determine the encryption key.
The Data Encryption Standard is an approach which does both a substitution of characters and a rearrangement of their order based on an encryption key. In order for this scheme to work, the authorized users must be provided with the encryption key via a secure mechanism. This is a major weakness since the scheme is no more secure than the secureness of the mechanism by which the encryption key is transmitted.
There is an alternative scheme that avoids some of the problems with the Data Encryption Standard. This scheme, called public?key encryption, is based on two keys, a public key and private key. Each user has his or her own public key and private key . All public keys are published. Each user?s private key is known only to the one user to whom the key belongs. If user 1 wants to store encrypted data, encrypts it using his or her public key 1. decryption requires the private key 1.
Because the encryption key for each user is public, it is possible to exchange information securely using this scheme. if user 1 wants to share data with 2 , U1 encrypts the data using , the public key of 2. Since only user knows how to decrypt the data, secure information transfer is accomplished.
For public key encryption to work, there must be a scheme for encryption that can be made public without making it easy to figure out the scheme for decryption. Such a scheme does exist. It is based on the following:
There is an efficient algorithm for testing whether or not a number is prime No efficient algorithm is known for finding the prime factors of a number.
Data is treated as a collection of integers for purposes of this scheme. A public key is created by computing the product of two large prime numbers 1 and 2 . The private key consists of the (1,2) , and the decryption algorithm cannot be used successfully if only the product is known 12. Since all that is published in the product , an unauthorized user would need to be able to factor 12 in order to steal data. By choosing and to be sufficiently large (over 100 digits).