Re: Using certificates with WodCrypt - WeOnlyDo Discussion board

Re: Using certificates with WodCrypt (General questions)

by Mark Lancaster, Friday, September 03, 2010, 17:25 (5195 days ago) @ wodDamir

I've tried with you suggested, and got the following results:

Type=RSA
Encryption SecretKey=cert.PublicKey
Decryption SecretKey=cert.PrivateKey
Optimized=True
Error on decryption: Secret Password is not set, or cannot be applied to selected algoritm

Type=RSA
Encryption SecretKey=cert.PublicKey
Decryption SecretKey=cert.PublicKey
Optimized=True
Result: Decrpyted text doesn't match the original plain text.

Type=RSA
Encryption SecretKey=cert.PrivateKey
Decryption SecretKey=cert.PublicKey
Optimized=True
Error on encryption: Secret Password is not set, or cannot be applied to selected algoritm

Type=RSA
Encryption SecretKey=cert.PrivateKey
Decryption SecretKey=cert.PrivateKey
Optimized=True
Error on encryption: Secret Password is not set, or cannot be applied to selected algoritm

Attempting to use Type=DSA always generates the error Selected Type cannot be applied to the method , which makes sense as DSA is a signing algorithm.

I've been through the help file and under the What is... topic is a section called What are the advantages and disadvantages of public-key cryptography over secret-key cryptography? . This makes a reference to a topic called How is RSA used for encryption in practice? but I can't find that in the help anywhere.

There are sections that talk about using a Keys object to generate signatures, so presumably the same methods would apply to encryption and decryption as well. The problem is that there's no obvious way to load a Keys object from a .cer of .pfx file.

If you have any examples of how this can be done that would be greatly appreciated.



Complete thread: