Storing encryption key / key container

Hans 251 Reputation points
2021-02-20T18:31:29.72+00:00

Hi,

I want to store data encrypted in a SQLite database. This works, but the key for the encryption is in the code. That is wrong.
With googling I have found that you can use a key container. However, if that is created, it will be stored locally on your PC.
I want to put the SQLite database file on a network as well as the app that reads the data. Can you put a key container on the network, let's say in the same folder as the application? Or is there another way (other than the registry) to store a key securely?

Greetings, Hans

Developer technologies | Windows Forms
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Bonnie DeWitt 811 Reputation points
    2021-02-21T19:18:32.227+00:00

    Hi @Hans ,

    Perhaps this will help. I have a blog post with C# code for transporting a KeyContainer from one computer to another:

    transport-rsa-key-containers.html

    Hope it helps.

    ~~Bonnie DeWitt [MVP since 2003]
    http://geek-goddess-bonnie.blogspot.com

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Hans 251 Reputation points
    2021-03-05T18:19:35.483+00:00

    Thanks, I will into it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.