I was looking through the Password Safe sources, and was surprized by how trashMemory() function works (it overwrites specified memory region several times, using different values as a filler).
I understand why there's need to do such thing to a persistent storage such as HDD, but what is the reason for doing it with RAM-based buffers?
Please forgive me this stupid question, and thanks in advance for your answer.
Actually, this is a pretty good question.
I've inherited this function (and its use) from the codebase I've taken over, and I have every reason to believe that it's from the original version from Counterpane Labs.
Whether this is a countermeasure against a known attack against DRAM or SRAM, or a carry-over from the known practice of "scrubbing" magnetic disk media this way, I really cannot say.
Since this is by no means a performance bottleneck, I see no reason to remove it.
I agree that it does no harm.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.