C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Cryptography in Asp.net


Posted Date: 22 May 2006    Resource Type: Articles    Category: Web Applications
Author: Rajendra kumar YerraMember Level: Gold    
Rating: Points: 10



Introduction



Generally we use Authentication and Authorization for security in our applications.
But what we have to do if we want to transfer data from one place to another place with security, there comes the use of Cryptography.

What is Cryptography?



1. The discipline which embodies principles, means and methods for the transformation of data in order to hide its information content, prevent its undetected modification, or prevent its unauthorized use.


2. The conversion of data into a secret code for protection of privacy using a specific algorithm and a secret key. The original text, or “plaintext”, is converted into a coded equivalent called “ciphertext” via an encryption algorithm. The ciphertext can only be decoded (decrypted) using a predefined secret key.

Why Cryptography?



If you want to send Data to your friend over a network which is highly confidential. There is no guarantee that the data you are sending will reach to him correctly. Some third persons may modify that information. So to transmit data over networks
We can use Cryptography. .net frame work contains several classes to work with cryptography in your application. To use cryptography in your applications you have to add the following namespace as reference



using System.Security.Cryptography;



Cryptography provides the following features

1. Prevents Data being transferred from reading by unknown persons and third parties.
2. Prevents Data being transferred from unknown modifications.
3. Makes sure that data is coming from the proposed location.

Types of Cryptography



Cryptography are several types. We can use cryptography in our applications in the following ways

1. Symmetric Cryptography
2. Asymmetric Cryptography
3. Digital Signatures
4. Hashing

Let us about each type of Cryptography

Symmetric Cryptography



It is also called as Secret Key Encryption since the data is encrypted using a single ‘Secret Key’. This key is known only to sender and receiver of data. At first sender encrypts the data with the secret key and the receiver decrypts the data send by the sender with the same Key. Both the sender and receiver must be care about the key , they must keep the key in secret otherwise third parties can also decrypt the data if they know the key.


ASymmetric Cryptography



This Encryption is different form Symmetric Encryption since it uses two keys
Public Key
Private Key

The public key is not maintained secret where all private keys are kept secret and confidential by the owner of the key.
if the data encrypted by the private key should be decrypted by the public key and
if the data encrypted by the public key should be decrypted by the Private key only.

Generally to transmit the data you have to encrypt it with public key and this data can be decrypted only with corresponding private key.

Hence this Encryption also called as Public Key Encryption.

Digital Signatures



Digital signatures utilize public key cryptography and one-way hash functions to produce a signature of the data that can be authenticated, and is difficult to forge or repudiate.

Digital Signatures are used to verify and identity of the sender and ensure data integrity. Generally they are used with Asymmetric Key Encryption (Public key Encryption)

A block of data attached to a message that serves to "digitally sign" the message; it is transmitted along with the message to a recipient. The purpose of the digital signature is to identify the sender, verify the message has not been altered in transit, and provide support for no repudiation. It is a two-step cryptographic process: first, the message to be transmitted undergoes a hash algorithm (for example, SHA-1) to obtain a message digest (or hash value).

Digital Signature has three advantages
1. Authenticity
2. Integrity
3. Non-repudiation




Hashing



Hash algorithms create a fixed length output for a given. If any one changes the original data even a bit then the hash generated will be different from the original hash. Hash algorithms are generally used in Digital Signatures.

The .Net Framework contains several method and classes to implement the above specified type of encryption in System.Security.Cryptography.

Summary



This Article explains the following

1. What is cryptography?
2. Why we need Cryptography?
3. Types of Cryptography? And their explanation














Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: WEB SERVICES
Previous Resource: Caching in ASP.NET
Return to Discussion Resource Index
Post New Resource
Category: Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use