encrypt with C# and decrypt with C++

From: danc (danc_at_discussions.microsoft.com)
Date: 02/11/05

  • Next message: Morten Overgaard: "Authorization Manager and WinForm applications???"
    Date: Fri, 11 Feb 2005 12:53:21 -0800
    
    

    I have a C# web application that will communicate with several C++ clients
    (everything on Windows). The data should be stored encrypted at the web
    application and occasionally sent to specific clients. Ideally, only the
    clients, which will be carefully locked down, should be able to decrypt the
    data; the web application should only be able to encrypt the data to store
    and send it and can never decrypt it (even if somebody completely hacked the
    web app and database).

    1. What encryption SDKs are compabible between C# and C++? Can I use the
    cryptography functions in .NET and the Windows Crypto API on C++ and are the
    generated byte streams compatible?

    2. Can I use public key algorithm to encrypt using private key and give the
    clients the public key to decrypt? From what I can tell in other posts, it
    seems that this may not be possible. If not, any alternative suggestions? I
    would prever avoiding having to do any reencryption once the data is stored
    because that would mean I need a decryption key at the web server.

    I want to keep this simple but absoutely secure (yeah, I know these are
    mutually exclusive requirements).

    Thanks in advance,

    Dan


  • Next message: Morten Overgaard: "Authorization Manager and WinForm applications???"

    Relevant Pages

    • Re: More on learning "Public Key Authentication"
      ... let me say that in public key ... >> encrypt the result with Alice's public key. ... >> is sent to Alice who decrypts the message with her private key (which ... > encrypted with my private key and they can then decrypt it with the ...
      (comp.sys.mac.system)
    • Re: how to have a gpg public key?
      ... Having just a public key doesn't do you much good. ... You need both a private key and a public key; ... can encrypt and decrypt your messages and you are just ...
      (Debian-User)
    • [OT] Re: Basic question about Public Private Key Pairs
      ... > and private keys allow me to decrypt, but vice versa is not possible (or ... a public key and a corresponding private key. ... You can encrypt something with each key; ...
      (microsoft.public.dotnet.security)
    • RE: Cannot decrypt files encrypted using Crypto API on a different
      ... We have a desktop application which is used by many clients. ... send it over to the clients (we don't know anything about their public key). ... from step 2, hExpKey is NULL, blob type is PUBLICKEYBLOB) and send this blob ... encrypt your data with this key ...
      (microsoft.public.platformsdk.security)
    • Re: private to public decrypt now working
      ... would have the private key, all vice presidents would have a public key. ... All vice's could encrypt and only president could decrypt. ...
      (microsoft.public.dotnet.security)