I've poked around a bit in SuperSearch and on Google, but I either I can't seem to hit on the right terms, or no one is discussing this.
I'm thinking about writing a cryptographic GUI (probably Tk) application in Perl; the plaintext will obviously have to be in memory at some point so that it can be displayed. However, once the user no longer needs to see the plaintext, I'd like to ensure that it gets entirely cleared from memory so that it cannot be examined later without decrypting it again.
Additionally, I'm concerned about the plaintext ending up in swap.
Is there anything I can do in Perl to ensure this kind of memory security? Or will I have to dust the rust off my C skills to get this to work?
Am I barking up the wrong tree by doing something like:
?my $plaintext = decrypt($ciphertext, $key); # .. display plain text, wait for user to close .. $key = '0' x length($key); $plaintext = '0' x length($plaintext);
Thanks in advance to anyone who can point me in the right direction!
In reply to Can I do secure memory management in Perl scripts for cryptographic applications? by radiantmatrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |