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

Re: a challenge



On Thursday, October 18, 2001 4:58 AM, madduck@madduck.net wrote:

> goal: a 4-16 byte 7-bit character value that somehow encodes the time
>  of creation such that it can be extracted if the encoding scheme/seed
>  is known. the encoded value should be such that it is mostly
>  impossible to change it so as to yield a later time of creation to be
>  encoded. in general, changing the encoded value may well render the
>  data invalid.

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?

Best,

  -=greg





Reply to: