trashMemory [just curious]

2004-09-16
2012-09-17
  • Alexey Tatarsky

    Alexey Tatarsky - 2004-09-16

    Hi!

    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.

    WBR,
    a-lex

     
    • Rony Shapiro

      Rony Shapiro - 2004-10-17

      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.

      Rony

       
    • Alexey Tatarsky

      Alexey Tatarsky - 2004-10-30

      Thank you!
      I agree that it does no harm.
      a-lex

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks