0
votes

I am a total beginner asp.net cryptography-wise.

I want to send a digitally signed, encrypted message from client to the server.

Every tutorial I found states that "you obtain other person's (server?!?) public key (from its certificate), use that key to encrypt and sign your message and than after that other person receives your message can decrypt it with its private key.

I know how to access client certificate's properties through asp.net's Request object.

My question is - how do I obtain server's public key to start that whole process in the first place.

Am I missing something important?

1
Usually if you have the certificate, you can use PKCS#7/CMS encryption which requires the certificate itself (i.e. you don't need to extract the public key out of the certificate). - Eugene Mayevski 'Callback

1 Answers

-1
votes

As you can see in method for encryption and decryption you can use RSA.