GnuPG <-> RSACryptoServiceProvider key translation

From: Roy Pardee (rpardee_at_comcast.net)
Date: 08/06/04

  • Next message: Hernan de Lahitte: "Re: Validating Encrypted Data"
    Date: 6 Aug 2004 12:56:56 -0700
    
    

    Greetings all,

    I'm trying to create a .net program that can decrypt files that will
    be rsa-encrypted with the gnupg program (on mac os X, if that's
    important).

    I've got hold of a copy of gpg, generated a key pair & sent my public
    key to my correspondent.

    I thought I would try to use
    System.Security.Cryptography.RSACryptoServiceProvider to decrypt the
    incoming files. The problem I'm having is in translating my private
    key, which gpg spits out as encoded text, like so (this is a portion
    of my public key, but the private key looks much the same):

    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: GnuPG v1.2.1 (MingW32) - WinPT 0.7.96rc1

    mQGiBEC06YQRBACNnZ5FZorejPPpR9j8V3YmPO8Plxq6p0Qpx/2SXG7YOfmoQFIV
    gWaFQjnk/Su3+isoTa7gevezP0arR4tXUThZhyNlzZ4UKPya+tGUcy49LRBd3YUS
    Wl8G+rJBSN5JJc4mbwBkUh0pq0QVsrqQ4DMO6VwfAuYqZDw72LouEUy7FwCg/ADm
    -----END PGP PUBLIC KEY BLOCK-----

    into something I can feed into the various parameters of the
    RSAParameters object (which is where I gather that should go--is that
    right?).

    Can anybody advise me on how to do this? Is my ultimate goal
    possible?

    Thanks!

    -Roy


  • Next message: Hernan de Lahitte: "Re: Validating Encrypted Data"

    Relevant Pages

    • Re: making administrator account the DRA in XP Profession
      ... decrypt files as the RA. ... The .cer file contains the certificate and only the ... The .pfx file would contain the private key. ... I wish to be able to access to them from the admin account. ...
      (microsoft.public.windowsxp.security_admin)
    • Re: EFS
      ... and private key in case when system on the first machine ... Export the user's certificate and private key on ... >> It is possible to decrypt files on one w2k system that ...
      (microsoft.public.win2000.file_system)
    • Re: Getting rid of my Certification Authority
      ... private key or the DRA certificate and private key, ... Decommissioning a CA does not decrypt files. ... Running this on the CA will remove them and I'll be okay? ...
      (microsoft.public.security)
    • Re: CAUTION: Moving EFS certificate from Vista to XP
      ... Does this posting belong to the one "How to decrypt files that i can ... with certificates from another operating system. ... protect their private key. ...
      (microsoft.public.windows.file_system)