I am working on a project with qt, I need to save data(file path and password) permanently so I can get it or modify it any time even when I exit my application and rerun it.
I thought to solve it with an encrypted xml file but I want to do it without trace.
I am working on a project with qt, I need to save data(file path
Share
You either use a file or some other platform specific database mechanism, like Windows’ registry. But then it would leave a trace; you can’t hope to store something locally and don’t leave a trace without rootkiting the operating system (and even that would leave a trace in the hardware, after all, you are writing your data to the drive).
One thing you can hope to do without leaving a trace, is to store the data remotely in some server via the network, since network activity usually is not logged (but can be observed), but I can see 2 problems with this approach:
1) it may be pose some privacy concern to your user (if I were an user of your application, I would not like too see my data sent over the wire to an unknown server);
2) how could you identify the information so that you can retrieve it? You could use some hash with the user name and computer hard drive id and network interfaces MAC adresses, but if some of these change, the data would be lost. You could also generate an unique id for each installation of your application, but it would require you to store that ID locally, and that would be a trace.
Local cryptography to prevent reading/tampering with the data is inherently insecure, because you will need to have some repeatable mean to retrieve the key. How would you do it? If you simply hardcode it in your application, it is easily retrievable by some binary file reader. It can’t be on a file named ‘key.txt’, for obvious reasons. You can compute it at runtime with some complicated algorithm, but you will always need to have it loaded into memory at some point, from where it can be retrieved by someone willingly enough.