Chapter 6 Encryption, Hashing, and Creating Keys

Team Fly 

Page 139

Chapter 6
Encryption, Hashing, and Creating Keys

THE.NET ENCRYPTION FEATURES are among the most useful of the framework classes, but are rarely mentioned in books and articles. There's nothing terribly difficult about employing these classes, but perhaps there are a couple of reasons that most authors avoid this topic. First, many people are only vaguely familiar with the concepts underlying cryptography, and some of those concepts can be indeed complex. Second, the best word to describe the current state of affairs in computer security is probably havoc.

Computer security divides into two primary categories: safety (protection from attack), as described in the previous chapter, and privacy (concealing information), which is the topic of this chapter.

Fortunately, there are extremely simple solutions to both of these security dangers. If you are concerned that a virus might erase your hard drive or otherwise mess up your machine, simply back up your data frequently (and also make use of the System Restore feature in XP in case the virus goes after the Registry and other key files, as some do).

If you are concerned that someone might read your private files, simply encrypt them.

All too often, however, these simple security measures are not practical. In many business situations, the majority of employees are incapable of managing their own backup or encryption needs. Either the IT department has to intervene, or these processes must be in some way automated for the ordinary user.

In this chapter you'll see how to use the .NET encryption classes to programmatically encrypt, decrypt, and manage keys. This can provide the foundation for writing applications that automate the job of encrypting and decrypting files. You can also use these techniques to build encryption features into your own programs.

The Main Problem

The primary problem when enforcing workplace security policies is the creation and management of passwords. A user types in a character-based secret string that can (and should) contain digits as well. Then that password is usually transformed into an all-digit key that is used by the computer to encrypt or decrypt a file. In public key encryption systems, random keys are

Team Fly 


Visual Basic  .NET Power Tools
Visual Basic .NET Power Tools
ISBN: 0782142427
EAN: 2147483647
Year: 2003
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net