I'm working on a program that will need to store data somewhere on the machine persistently, so that when I close the program the data doesn't disappear. The data is something that I can't hash because the program needs to retrieve it's value.
This database needs to be super secure so that only the program itself can access this storage and nothing else.
Now, SQL seems pretty insecure to me, if you have access to the SQL you have access to every single database contained in it, the only way to go would be to encrypt some of the data I insert but that would lead to store another key for that.
This is the structure of what I need to store:
FileName | Key | GroupOwner
----------|---------------------|-----------
foo.txt | $iv44dsfggsdvav523v | adminGroup
----------|---------------------|-----------
bar.txt | %iihg9v8326h5798v93 | adminGroup
Basically files are stored on a server and encrypted with a key, if anyone were to break in the server they should not be able to read the key and thus decrypt the file but only the program should be able to do that.
Is there any way I can store data that only my program can read and modify?