[hashcash] Re: hashcash v1 support (and 1.02 rpms up on site)

  • From: Adam Back <adam@xxxxxxxxxxxxxxx>
  • To: hashcash <hashcash@xxxxxxxxxxxxx>
  • Date: Wed, 11 Aug 2004 08:18:47 -0400

Note the following value definition change:

version 0 format: value is number of leading 0 bits

version 1 format:

the v1 format has an explicit version field which I'll call
$claimed_value.  Then $measured_value is the number of leading 0 bits.

But the actual value used should be calculated based on those two
inputs as follows:

$value = $measured_value >= $claimed_value ? $claimed_value : 0

ie you do not get lucky and get more than planned number of bits some
of the time, if it has more than the required number of 0 bits it gets
knocked back to the claimed bits.  On the other hand if it has less
bits than claimed it is worthless (0 value).

(This works because you can't change the claimed_value bits field
without re-computing the stamp from scratch).

More v1 format handling:

Just ignore the ext field for now (unless you want to get fancy, it's
format is described in the man page and at some later version we will
try to make a convenient mechanism to hook in 3rd user supplied
handlers for different extensions).  The random field is just for
avoiding collisions between multiple stamps to the same recipient.
The counter field starts at 0 and increases until a partial hash
collision with the required number of leading bits (or more) is found.
(You can count out of sequence if it is convenient).

I'm trying to collect developer related info here:

        http://www.hashcash.org/dev/

Adam

On Wed, Aug 11, 2004 at 08:04:41AM -0400, Adam Back wrote:
> So we have now rpm and source for version 1 hashcash format.  The
> new format is in the soon to be released spamassassin 3.0.
> [...]

Other related posts: