Re: No way to encrypt with private key in C#?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Alun Harford" <devnull@xxxxxxxxxxxxxxxxx> wrote in message news:%23n7ijGuZIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
Alun Harford wrote:
Sin Jeong-hun wrote:
Hello.
As far as my naive textbook knowledge goes;
1)if a file is encrypted with the private key, then it can be
decrypted with the public key,
2)if a file is encrypted with the public key, then it can be decrypted
with the private key.

Only (2) is true.

Re-reading the question, they're both true.


No.

1. is not true. I think the OP (and possibly yourself) is confused by the fact that most real systems have two public and two private keys - one for each end of the link. If a file encrypted with the private key could be decrypted with just the public key, it would be a pretty piss-poor security mechanism. What actually happens is that the sender encrypts with the recipient's public key, not his own (public or private) key.


.



Relevant Pages

  • RE: PGP scripting...
    ... cryptosystems, ... In these systems divulging your private key compromises the public ... Here is a quick over view of the public key encryption routines (the ...
    (SecProg)
  • Re: Private & Public Key storage location
    ... with that you complete the 'certificate' to have both public and private key ... To view the complete cert, you access the cert mmc, ... its end & send only the public key to the CA along with the other websites ... The CA never know the private key of the website. ...
    (microsoft.public.inetserver.iis.security)
  • CryptImportKey NTE_BAD_KEY error.
    ... of the private key is just fine but when I try to import the public key I ... // This Asymetric key set will be used to create the Autherization Code. ... delete psBuffer; ...
    (microsoft.public.security)
  • Re: Private & Public Key storage location
    ... client use the public key to ... corresponds to this certiticate' when you view the cert. ... it will has the private key as well. ... installed for your website, it will be sent to all the clients who connect ...
    (microsoft.public.inetserver.iis.security)
  • CryptImportKey NTE_BAD_KEY error.
    ... of the private key is just fine but when I try to import the public key I ... // This Asymetric key set will be used to create the Autherization Code. ... delete psBuffer; ...
    (microsoft.public.platformsdk.security)