Encryption is
the process of translating plain text data (plaintext) into
something that appears to be random and meaningless (ciphertext).
Decryption is the process of converting ciphertext back to plaintext.
To encrypt more than a small amount of data, symmetric encryption is used. A symmetric key is used during both the encryption and
decryption processes. To decrypt a particular piece of ciphertext, the key that
was used to encrypt the data must be used.
The goal of every encryption algorithm is to make it as
difficult as possible to decrypt the generated ciphertext without using the
key. If a really good encryption algorithm is used, there is no technique
significantly better than methodically trying every possible key. For such an
algorithm, the longer the key, the more difficult it is to decrypt a piece of
ciphertext without possessing the key.
It is difficult to determine the quality of an encryption
algorithm. Algorithms that look promising sometimes turn out to be very easy to
break, given the proper attack. When selecting an encryption algorithm, it is a
good idea to choose one that has been in use for several years and has
successfully resisted all attacks.
When we use the Internet, we're not always just clicking around and passively
taking in information, such as reading news articles or blog posts -- a great
deal of our time online involves sending others our own information. Ordering
something over the Internet, whether it's a book, a CD or
anything else from an online vendor, or signing up for an online account,
requires entering in a good deal of sensitive personal information. A typical
transaction might include not only our names,e-mail addresses and physical address and phone number,
but also passwords and personal identification numbers (PINs).
The
incredible growth of the Internet has excited businesses and consumers alike
with its promise of changing the way we live and work. It's extremely easy to
buy and sell goods all over the world while sitting in front of a laptop.
But security is a major concern on the Internet, especially when you're using
it to send sensitive information between parties.
Let's
face it, there's a whole lot of information that we don't want other people to
see, such as:
·
Credit-card information
·
Social Security numbers
·
Private correspondence
·
Personal details
·
Sensitive company information
·
Bank-account information
Information
security is provided on computers and over the Internet by a variety of
methods. A simple but straightforward security method is to only keep sensitive
information on removable storage media like portable flash memory drives
or external hard drives. But the most popular forms of security all rely onencryption, the process of encoding
information in such a way that only the person (or computer) with thekey can decode it.
Decryption is the
reverse operation of encryption. For secret-key encryption, you must know both
the key and IV that were used to encrypt the data. For public-key encryption,
you must know either the public key (if the data was encrypted using the
private key) or the private key (if the data was encrypted using the public
key).
Symmetric Decryption
The decryption of
data encrypted with symmetric algorithms is similar to the process used to
encrypt data with symmetric algorithms. The CryptoStreamclass is used with symmetric cryptography classes
provided by the .NET Framework to decrypt data read from any managed stream
object.
The following example
illustrates how to create a new instance of the RijndaelManaged class and use it to perform decryption on
a CryptoStream object. This example first creates a new
instance of the RijndaelManaged class.
Next it creates a CryptoStream object
and initializes it to the value of a managed stream called MyStream. Next,
the CreateDecryptor method
from the RijndaelManaged class
is passed the same key and IV that was used for encryption and is then passed
to the CryptoStream constructor.
Finally, the CryptoStreamMode.Read enumeration
is passed to the CryptoStream constructor
to specify read access to the stream.
Tidak ada komentar:
Posting Komentar