Hi All,
I don't have much idea on Crypto API. I have some doubts regarding the
same. I am planning to use public/private key mechanism to encrypt the
application specific data. I wanted to encrypt the data in a centralized
location and i need to distribute this data to client machines through CD.
When ever user wants the data, Client side application needs to decrypt the
same. While distributing the application, I will distribute the public key.
Here I am not planning to use the certificates. But I need to use the
Crypto API for encryption and decryption.
Questions:
1. How to prepare public key and private key pair.
2. Which API I need to use to encrypt the data with private key and decrypt
the data with public key.

Thanks in advance,
Reddy.

Re: Regarding encryption and Decryption by Michel

Michel
Tue Mar 02 08:17:11 CST 2004

If you don't have experience in CryptoAPI, I would suggest using
CAPICOM (which leverages most of useful underlying CryptoAPI capability)
to encrypt your data. You can very easily write scripts to sign any content, and
distribute scripts to your end users to decrypt that content.

If you encrypt arbitrary data, you will be using a secret *symmetric* key to
do the bulk encryption. The hard part is securely distributing the credentials to
access that encryption key so your users can decrypt your encrypted content.

The simplest approach is to use password-based encryption, say using CAPICOM
EncryptedData. However, this requires your users knowing some password .. the
hard part, particularly is you don't know who your users are!

Alternatively (as in S/MIME encrypted email) you can encrypt that symmetric key
using each recipients (or their machines) unique public RSA key, but that requires
each of your users to have an issued public/private key pair .. the difficult part.

If you want to use raw CryptoAPI, the following sample uses BOTH approaches
above:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/example_c_program_encrypting_a_file.asp

- Michel Gallant
MVP Security

"Reddy" <Chandrakanth2002@hotmail.com> wrote in message
news:u9CQLyFAEHA.2300@TK2MSFTNGP10.phx.gbl...
> Hi All,
> I don't have much idea on Crypto API. I have some doubts regarding the
> same. I am planning to use public/private key mechanism to encrypt the
> application specific data. I wanted to encrypt the data in a centralized
> location and i need to distribute this data to client machines through CD.
> When ever user wants the data, Client side application needs to decrypt the
> same. While distributing the application, I will distribute the public key.
> Here I am not planning to use the certificates. But I need to use the
> Crypto API for encryption and decryption.
> Questions:
> 1. How to prepare public key and private key pair.
> 2. Which API I need to use to encrypt the data with private key and decrypt
> the data with public key.
>
> Thanks in advance,
> Reddy.
>
>