in reply to Handling encryption safely

Thanks a bunch for the replies so far..

What it is I'm going to code is a system for storing passwords protected by one master key. A secure password list. It will run on my desktop system (a laptop running linux), and possibly other unix systems as well.

I am the sole user of my desktop machine, so in that case, noone should be able to get root access, providing I don't mess up in which case my passwords would be subject to change anyway..

I'm not looking for absolute security here, since I know a great deal about computer security i know that to be a unobtainable situation. What I wan't is my application to be secure enough to store my passwords/passphrases..

Thank's again!

Replies are listed 'Best First'.
Re: Re: Handling encryption safely
by tachyon (Chancellor) on Oct 29, 2003 at 11:25 UTC

    Don't encrypt the passwords then. One way hash them with MD4, MD5 et al plus a secret string. Don't have the secret string in plaintext anywhere, just hack the C source of one of these modules to append the secret key, compile it and destroy the source! Of course with a decent decompiler you can still see the string so build it on the fly from a number of function calls so the chars are spread all over the source/binary. Throw in some XORs, a few dummy function calls, the odd blind alley, random library calls.....all the usual tricks. Decompile the binary an have a look to make sure the compiler has not undone your good works.

    Now even if I extract the secret key I am still faced with the task of brute forcing the password hashes. The only loss is that you can't send users a password reminder, you have to do a reset - but hey if they could remember the old one they would not have needed the reminder!

    *nix and even M$ store passwords as hashes not reversibly encrypted strings. It just raises the bar that bit higher.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print