Secret Key (Symmetric) Encryption

Secret key encryption, also called symmetric encryption because of its two-way nature, relies on something called a shared secret or secret key. Before discussing code, consider a hypothetical scenario:

Bob wants to send information to John, but Bob doesn't want anyone to be able to intercept the communication and be able to read the information being sent. To accomplish this, Bob comes up with a secret code that he uses to encrypt his message. Bob makes sure that John has this secret code through some means. When John receives the encrypted message, John can use that same secret key to decrypt the message that Bob sent.

There are two important aspects of this type of encryption:

  • There is a secret shared between ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.