[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a challenge



On Thu, Oct 18, 2001 at 09:11:05AM -0700, Greg Wiley wrote:
> This is just a general idea:
> 
> I'm assuming a 32-bit timestamp.
> 
> You want to encode that value somewhat securely
> with an invertable hash into 16 * 7 = 112 bits
> (less if you can't use control chars).  It has to be
> somewhat resistant to tampering (you gave no
> indication of the degree to which it must resist).
> 
> So you can multiply your timestamp by
> any number < 2^(112-32) = 2^80 =
>  1208925819614629174706176 .
> and still fit in 16 7-bit chars.
> 
> I would pick a prime value < 2^80 and multiply the time
> by it, then format it into 7-bit characters.
> 
> To extract, pack it and divide.
> 
> Does that work?
> 
> Note that to break this, the attacker will have to
> search a fairly large space but not an impossible
> one.  Some of the effectiveness of this will depend
> on how often you change the prime factor.  Also,
> if it is fairly expensive for an attacker to check
> a single value, the search could take a while.
> This also doesn't take into account the value
> of breaking it, i.e. how big is the "prize" for
> finding your prime factor?

If the attacker knows the algorithm (although not the prime number) this is
unfortunately trivial to crack: they just have to guess the time that is
encoded by the timestamp.  :(
-- 
David Roundy
http://civet.berkeley.edu/droundy/



Reply to: