Friday, 14 February 2014

Data Encryption VS Decryption concepts of programming in C#

 

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.

 

image

 

 

 

 

C# Program to Encrypting and Decrypting  Data

 

Symmetric encryption and asymmetric encryption are performed using different processes. Symmetric encryption is performed on streams and is therefore useful to encrypt large amounts of data. Asymmetric encryption is performed on a small number of bytes and is therefore useful only for small amounts of data.

 

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 encryption

 

image

 

 

image

image

 

 

 

Symmetric Decryption

image

 

image

image

 

 

 

Asymmetric encryption

 

image

image

 

 

Asymmetric Decryption

image

 

 

 

Blogger Labels: Data,Encryption,Decryption,concepts,text,goal,algorithm,technique,Algorithms,Program,Symmetric,amounts,Asymmetric,plaintext,ciphertext,decrypt

No comments:

Post a Comment