Let's say I have an encrypted file. Now I decrypt it but since my computer only has SSD, i decrypt it on the SSD drive. Say, I make changes or I finish using the decrypted file so I encrypt it again. But since I am on SSD, there is no way of properly purging the file from the drive without purging the whole drive (and who knows whether that can be trusted). From this, it seems the whole concept of encryption is only useful for transportation but not for secure storage because inevitably, once I need to decrypt I create a vulnerability which is not easily handled. Or am I wrong, is there some simple way?
I was then thinking about software like TrueCrypt (or VeraCrypt today) which can then mount an ecnrypted container, but the problem is, I have no idea what is happening to the file that is being opened, edited etc, is it only read into memory without being decrypted to some temporary space on hard drive and then once changes are made encrypted again without the use of HDD?
Another ideay that came to my mind was to create a special partition for such files and encrypt that partition (but again, am I safe to assume that the files never leave that partition? Of course not considering that I copy them somewhere, but more likely some application using tmp etc).
Can someone help? How I can secure certain files/directories for such instances that the computer is stolen/hacked because even if I encrypt them, certain I use often, make changes, once decrypted, they are exposed even after they are encrypted again?
If this is a known topic, I do apologize and please send me to appropriate places to learn (but I really did not find any information on how to work with encrypted files, also I am not a developper or system programmer so I need something less obscurely written).