locked
Read a Private Key RRS feed

  • Question

  • HI,

     

    I have a couple of files, the first .cer and the second .key, this files are supouse to be the public key(.cer file) and the private key (.key file) for RSA cryptography.

    I dont have any probleme with the public key file but i just dont found a way to use the .key file with the RSACriptoServiceProvider and use this for encrypt some text, i have try using the the content of the file like a CSPBlob and the method ImportCspBlob of the RSACriptoServiceProvider object or using this like a X509Certificate object but failed.

    Someone could point me in a good direcction to find a solution?

    Friday, January 4, 2008 4:45 AM

All replies

  • Hi Jaimes,

    Did you find any solution at your case? I have one exactly as yours...

     


    JaimePR,
    Friday, June 10, 2011 4:24 PM
  • Hi,

    No one can help you if the format of the .key file is unknown. This is not a standard extension like .pfx or .p12. Is it BASE-64 encoded? In this case, what is its first line? If it is binary, post the first 16 bytes of it so we can try to guess its format.

    Cheers,
    --
    Mounir IDRASSI
    IDRIX
    http://www.idrix.fr


    Mounir IDRASSI IDRIX http://www.idrix.fr
    Wednesday, June 22, 2011 11:26 PM