Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Encryption and decryption using Certificate store across machines

Encryption and decryption using Certificate store across machines

Scheduled Pinned Locked Moved C#
csharphelpdatabasesql-servervisual-studio
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    talisker77
    wrote on last edited by
    #1

    Hi, I have created a certificate both private and public key (created using MS SQL Server, and Visual Studio Tools), which I have imported into the Certificate Store under Trusted People, Machine Level. I have a program that encrypts sensitive data on that server, using the private/public key. I kan run the same program to decrypt data encrypted on the same machine, but when I run the program on another computer (using the same private key, in this case the pfk file) I'm getting error when I run decryption. I also discovered that when I use the certificate store certificate to encrypt, and load the pfk file into my program to use that private key to decrypt the same data I fail to decrypt it. I'm using .net X509Certificate lib, with RSA provider and CSParameters, on Windows Platform, both XP and windows server 2003. I have read some worring comments that using certificate store to encrypt data, you have to decrypt this data using the same machine. Would this be the case, I'm not able to find any threads on the internet about this issue. If there is an issue with encryption/decryption across machines using the certificate store facilities, which method would you recommend to ensure decryptablilty across machines? I'm writing the code in C#, but it could be any managed code in .net. Hope some here have some fact and tips in this case. Thanks,

    E 1 Reply Last reply
    0
    • T talisker77

      Hi, I have created a certificate both private and public key (created using MS SQL Server, and Visual Studio Tools), which I have imported into the Certificate Store under Trusted People, Machine Level. I have a program that encrypts sensitive data on that server, using the private/public key. I kan run the same program to decrypt data encrypted on the same machine, but when I run the program on another computer (using the same private key, in this case the pfk file) I'm getting error when I run decryption. I also discovered that when I use the certificate store certificate to encrypt, and load the pfk file into my program to use that private key to decrypt the same data I fail to decrypt it. I'm using .net X509Certificate lib, with RSA provider and CSParameters, on Windows Platform, both XP and windows server 2003. I have read some worring comments that using certificate store to encrypt data, you have to decrypt this data using the same machine. Would this be the case, I'm not able to find any threads on the internet about this issue. If there is an issue with encryption/decryption across machines using the certificate store facilities, which method would you recommend to ensure decryptablilty across machines? I'm writing the code in C#, but it could be any managed code in .net. Hope some here have some fact and tips in this case. Thanks,

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      From what I have read on using Key Stores you need to access the one one the local machine. That is why I normally store keys in a db or such of my own creation. One of the biggest limitations of PGP, IMHO, is the limited manner in which there key store works; Windows suffers a similar fate.

      Need a C# Consultant? I'm available.
      Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups