Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

Encrypting data allows it to be stored on non-secure media or transmitted on a non-secure network without compromising the data. The encryption function of CryptoAPI encrypts data by using an encryption key. To decrypt the data, the corresponding decryption key must be used.

The following list shows the two methods of encrypting data with the encryption function:

Symmetric Encryption

Using the same key makes this encryption method very fast; however, to maintain tight security, the keys must be changed frequently.

CryptoAPI supports block cipher or stream-based symmetric encryption. The following table shows the algorithms that it supports.

Supported stream-based encryption algorithms Supported cipher encryption algorithms

RC2

RC4

DES

3DES

Symmetric encryption requires exchanging a shared secret. When two parties are exchanging information while they are not within physical proximity to each other, this exchange can be accomplished through the use of Diffie-Hellman key exchange or through public-key encryption.

Public-Key Encryption

With public-key encryption, two separate keys are used. A public key is used for encrypting data and the corresponding private key is used for decrypting data.

Because the algorithms for this encryption method are very slow, public-key encryption is usually used in combination with symmetric encryption to encrypt other keys or to digitally sign files.

See Also