Hi,

I have been using Digital certificates for encryption and decryption using
c# dot net compact framework 2.0 and i can install the Digital Certificate
in the pocket PC Certificate store using pfxImport.exe.Now i want to verify
that its installed properly. Because i can do encryption using that
certificate but i cant do the decryption with the same, i have tried in many
ways it throw error in API that access the private key from the
certificate.And Also this same code works well in Windows application and
Encrypted data using dot net compact framework get decrypted correctly using
windows application,therefore my code is correct.

i have given my code,

CspParameters cp = new CspParameters();

cp.KeyContainerName = container;----------i feel Container value might me a
prob here.Since the value retrived from API
CertGetCertificateContextProperty which deal with private key

cp.ProviderType = this.providerType;
cp.ProviderName = this.providerName;
cp.KeyNumber = keyspec;
RSACryptoServiceProvider oRSA = new

RSACryptoServiceProvider(cp);
clearkey = oRSA.Decrypt(encdata, false); !!

it am getting an error: "Unknown Error '80007001".


Can anyone give the solution for us.

Thanks