Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keeping encrypted data in memory

I'm working with a listview control which saves the data using AES encryption to a file. I need to keep the data of every item in listview in std::list class of std::string. should I just keep the data encrypted in std::list and decrypt to a local variable when its needed? or is it enough to keep it encrypted in file only?

like image 460
cpx Avatar asked Jul 11 '26 15:07

cpx


1 Answers

To answer this question you need to consider who your attackers are (i.e. who are you trying to hide the data from?).

For this purpose, it helps if you work up a simple Threat Model (basically: Who you are worried about, what you want to protect, the types of attacks they may carry out, and the risks thereof).

Once this is done, you can determine if it is worth your effort to protect the data from being written to the disk (even when held decrypted only in memory).

I know this answer may not seem useful, but I hope it helps you to become aware that you need to specifically state (and hence know) you your attackers are, before you can correctly defend against them (i.e, you may end up implementing completely useless defenses, and so on).

like image 155
Noon Silk Avatar answered Jul 14 '26 05:07

Noon Silk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!