in reply to perl / math: integer obfu

Me again. Yes, the obfu is important here. I suppose I could use the straight base 60 approach (above) here and tack on a few digits of checksum to make it less guessable, but again, I have the sense MD5 or something similar might solve my problem here a little more securely, but I don't quite understand it...
rkg

Replies are listed 'Best First'.
Re: Re: perl / math: integer obfu
by thor (Priest) on Jul 26, 2003 at 13:26 UTC
    The problem with using MD5 in this case is that MD5 is a one-way function. That is to say that it is easy to calculate the MD5 value of a given input, but it is hard to obtain the original input given the MD5 value.

    However, if you have a user input a value, you can store the MD5 value. Then, to validate that the user enters the same value next time, you calculate the MD5 value of the new input and check it against what was stored originally. This scheme is used to validate passowrds in every Unix system that I know (though MD5 isn't always the algorithm used). Also,

    Yes, the obfu is important here
    Are you hoping to implement "security through obscurity"? Some would liken that to locking a safe with a piece of tape. While it keeps the casual observer from figuring it out, someone who is determined enough will break it.

    thor