[hashcash] about hashcash -a option

  • From: Adam Back <adam@xxxxxxxxxxxxxxx>
  • To: hashcash <hashcash@xxxxxxxxxxxxx>
  • Date: Wed, 20 Jul 2005 16:38:01 -0400

[Didn't see this to approve because of the volume of junk in the admin
msgs; didn't get posted direct because of the subscription address --
we need hashcash on the list!].

Anonymous wrote:
> I was minting my hashcash tokens via a cron job, and I became
> concerned that my tokens were leaking information by their constant
> creation time.  So I tried using the -a flag with "-a -3d" and it
> varied the day, but not the time of day.  Then I tried using "-a
> -86400s" but the expiration still seemed not be random.  Then I
> shifted to minting at random times of the day using resubmitting
> jobs with "at".  Again, no change.  Finally I looked into what the
> expiration time was, and it was always at midnight UTC.

The default is that the time of minting is normally only given in
days, and in UTC (aka GMT).  So when you say -a -3d it will subtract
between 0 and 72 hours, and then get rounded down to the nearest whole
day (UTC).  (I notice you put "-a -3" which subtracts between 0 and 3
seconds, need to specify the units).

So actually that in itself (rounding to beginning of day) even without
-a hides somewhat when the msg was sent.

So examples, default, no -a.

X-Hashcash: 1:20:050720:foo@xxxxxxx::aIZClPts2y7o1c8w:51ij

So as it is only giving the day, month, year, there is no statement of
what time it was created during the day.  This is treated as 00:00
UTC/GMT on that day.

Now if we give -a -3d we get after a few tries samples of different

X-Hashcash: 1:20:050718:foo@xxxxxxx::ws8bPvdYN+dG2+R6:0Pah
X-Hashcash: 1:20:050719:foo@xxxxxxx::FninRruyZsQLsyzD:a0s
X-Hashcash: 1:20:050720:foo@xxxxxxx::lQ7v5Q4BYpZdB8jF:+5H

If we really want to specify time in more detail (only reason I would
see is if the stamps expire very fast -- like 1 day or such, where
rounding down to beginning of day would lose a big chunk of stamp
validity) you can give -z <width> so to the second:

"-a -3d -z 12" we get:

X-Hashcash: 1:20:050720010444:foo@xxxxxxx::S/VU99LItTQK3uCG:1q/v
X-Hashcash: 1:20:050718045245:foo@xxxxxxx::Ja18mFgHhs6qN8X0:9B9q
X-Hashcash: 1:20:050719031331:foo@xxxxxxx::iMEZSLjLl4HszYK1:92uK


Other related posts:

  • » [hashcash] about hashcash -a option