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


In reply to Re: Re: Handling encryption safely by tachyon
in thread Handling encryption safely by bagu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.