Cerin
Cerin

Reputation: 64870

Ensuring Secure Data Remains in Memory

On a Linux system, how would you structure a program (C/C++/Python/Java etc) to ensure that a piece of data remains in volatile memory and is never cached to disk or swap?

I'm specifically concerned with security applications where you want to ensure a manually entered password or cryptography key is forgotten and unrecoverable the moment the system loses power, but otherwise remains accessible.

Upvotes: 0

Views: 137

Answers (1)

C. Ramseyer
C. Ramseyer

Reputation: 2382

Have a look at mlock(2)/munlock(2)

Upvotes: 4

Related Questions