locked
How to validate X509Certificate2 certificate against public key? RRS feed

  • Question

  • 1) I generated a specific private/public key pair.

    2) I generate a private certificate using that key and send it to a client (X509Certificate2).

    3) Now when the client sends me a public certificate I want to make sure this certificate was generated with my private key.

    How can I ensure #3?

    Monday, November 2, 2020 4:48 PM

All replies

  • The public key and private key are paired, and they decrypt each other. Public key encryption, private key decryption. Private key digital signature, public key verification. If this certificate is not generated using your private key, it will not pass verification.
    Thursday, November 5, 2020 9:06 AM
  • If this certificate is not generated using your private key, it will not pass verification.
    Right. That's what I am asking about - how can I do this validation in C#?
    Friday, November 6, 2020 1:41 PM