Debian Codegraph @

hashcash.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>hashcash</title>
5 <link rev="made" href="mailto:root@localhost" />
6 </head>
7
8 <body style="background-color: white">
9
10 <p><a name="__index__"></a></p>
11 <!-- INDEX BEGIN -->
12
13 <ul>
14
15 <li><a href="#name">NAME</a></li>
16 <li><a href="#synopsis">SYNOPSIS</a></li>
17 <ul>
18
19 <li><a href="#mint__create__stamps_">Mint (create) stamps:</a></li>
20 <li><a href="#check_stamps_">Check stamps:</a></li>
21 <li><a href="#speed_estimates_">Speed estimates:</a></li>
22 <li><a href="#purge_database_">Purge database:</a></li>
23 <li><a href="#count_partial_preimage_bits_">Count partial preimage bits:</a></li>
24 <li><a href="#get_resource_name_">Get resource name:</a></li>
25 <li><a href="#get_time_remaining_until_expiry">Get time remaining until expiry</a></li>
26 </ul>
27
28 <li><a href="#description">DESCRIPTION</a></li>
29 <li><a href="#usage_notes">USAGE NOTES</a></li>
30 <ul>
31
32 <li><a href="#minting_stamps">Minting stamps</a></li>
33 <li><a href="#checking_stamps">Checking stamps</a></li>
34 <li><a href="#double_spending_protection">Double Spending Protection</a></li>
35 <li><a href="#purging_periodically_vs_on_next_access">Purging Periodically vs on Next Access</a></li>
36 <li><a href="#speed_estimates">Speed Estimates</a></li>
37 <li><a href="#notes">Notes</a></li>
38 </ul>
39
40 <li><a href="#options">OPTIONS</a></li>
41 <li><a href="#examples">EXAMPLES</a></li>
42 <ul>
43
44 <li><a href="#creating_stamps">Creating stamps</a></li>
45 <li><a href="#examining_stamps">Examining Stamps</a></li>
46 <li><a href="#verifying_stamps">Verifying Stamps</a></li>
47 <li><a href="#double_spending_prevention">Double Spending Prevention</a></li>
48 <li><a href="#stamp_expiry">Stamp Expiry</a></li>
49 <li><a href="#purging_old_stamps">Purging old stamps</a></li>
50 <li><a href="#purging_old_stamps_on_demand">Purging old stamps on Demand</a></li>
51 </ul>
52
53 <li><a href="#stamp_format__version_1_">stamp format (version 1)</a></li>
54 <li><a href="#files">FILES</a></li>
55 <li><a href="#exit_status">EXIT STATUS</a></li>
56 <li><a href="#author">AUTHOR</a></li>
57 <li><a href="#see_also">SEE ALSO</a></li>
58 </ul>
59 <!-- INDEX END -->
60
61 <hr />
62 <p>
63 </p>
64 <h1><a name="name">NAME</a></h1>
65 <p>hashcash - hashcash anti-spam / denial of service counter-measure tool</p>
66 <p>
67 </p>
68 <hr />
69 <h1><a name="synopsis">SYNOPSIS</a></h1>
70 <p>
71 </p>
72 <h2><a name="mint__create__stamps_">Mint (create) stamps:</a></h2>
73 <p><strong>hashcash</strong> <em>-m</em> [ [ <em>options</em> ] [ <em>resource</em> ... ] ... ]</p>
74 <p>
75 </p>
76 <h2><a name="check_stamps_">Check stamps:</a></h2>
77 <p><strong>hashcash</strong> <em>-c</em> [ [ <em>options</em> ] <em>-r resource</em> ... ] [ <em>stamp</em> ... ]</p>
78 <p>
79 </p>
80 <h2><a name="speed_estimates_">Speed estimates:</a></h2>
81 <p><strong>hashcash</strong> <em>-s</em> [ <em>options</em> ] [ <em>-b bits</em> ]</p>
82 <p>
83 </p>
84 <h2><a name="purge_database_">Purge database:</a></h2>
85 <p><strong>hashcash</strong> <em>-p now</em> [ <em>-j resource</em> ] [ <em>-k</em> ] [ <em>-t time</em> ] [ <em>-u</em> ]</p>
86 <p>
87 </p>
88 <h2><a name="count_partial_preimage_bits_">Count partial preimage bits:</a></h2>
89 <p><strong>hashcash</strong> <em>-w</em> [ <em>options</em> ] [ <em>stamp</em> ... ]</p>
90 <p>
91 </p>
92 <h2><a name="get_resource_name_">Get resource name:</a></h2>
93 <p><strong>hashcash</strong> <em>-n</em> [ <em>options</em> ] [ <em>stamp</em> ... ]</p>
94 <p>
95 </p>
96 <h2><a name="get_time_remaining_until_expiry">Get time remaining until expiry</a></h2>
97 <p><strong>hashcash</strong> <em>-l</em> [ <em>options</em> ] <em>-e period</em> [ <em>stamp</em> ... ]</p>
98 <p>
99 </p>
100 <hr />
101 <h1><a name="description">DESCRIPTION</a></h1>
102 <p>Hashcash is a denial-of-service counter measure tool. Its main
103 current use is to help hashcash users avoid losing email due to
104 content based and blacklist based anti-spam systems.</p>
105 <p>The hashcash tool allows you to create hashcash stamps to attach to
106 emails you send, and to verify hashcash stamps attached to emails you
107 receive. Email senders attach hashcash stamps with the X-Hashcash:
108 header. Vendors and authors of anti-spam tools are encouraged to
109 exempt mail sent with hashcash from their blacklists and content based
110 filtering rules.</p>
111 <p>A hashcash stamp constitutes a proof-of-work which takes a
112 parameterizable amount of work to compute for the sender. The
113 recipient can verify received stamps efficiently. This package also
114 includes a sha1 implementation which is equivalent in functionality to
115 the sha1sum program available on some systems.</p>
116 <p>The hashcash proof-of-work function is to compute partial hash
117 preimages (the SHA1 hash function is used). By choosing the number of
118 bits of the preimage that are equal to 0, the work required to compute
119 a partial preimage can be made arbitrarily expensive -- from fractions
120 of a second to minutes or hours. The verification is efficient
121 requiring the same small cost whatever the preimage size.</p>
122 <p>For more detailed discussion of other applications hashcash has been
123 used for see <a href="http://www.hashcash.org/">http://www.hashcash.org/</a></p>
124 <p>
125 </p>
126 <hr />
127 <h1><a name="usage_notes">USAGE NOTES</a></h1>
128 <p>In this man page a resource name is the name of the service or address
129 the stamp is created for. In the case of email, the resource name is
130 the recipient's email address in the form <a href="mailto:[email protected].">[email protected].</a></p>
131 <p>
132 </p>
133 <h2><a name="minting_stamps">Minting stamps</a></h2>
134 <p>The <em>-m</em> flag must be given to mint a stamp.</p>
135 <p>The resource name (recipient's email address) to mint the stamp
136 against can be passed as an argument, or if omitted is read from
137 stdin. If stdin is a tty the user is prompted, if stdin is a pipe the
138 resource name is just silently read. The desired preimage size can
139 be specified with the -b option. If no preimage size is specified,
140 the default is 20 bits. See also the <em>-b default</em> option.</p>
141 <p>
142 </p>
143 <h2><a name="checking_stamps">Checking stamps</a></h2>
144 <p>The <em>-c</em> flag must be given to check a stamps expiry. The stamp to
145 check can be given as an argument to <code>hashcash</code>. If no stamp is
146 given the stamp is read from stdin. If stdin is a tty the user will
147 be prompted, if stdin is a pipe the stamp is just silently read. A
148 resource name (the recipient's email address) can be given with the
149 <em>-r</em> option. If a resource name is given the resource name is
150 compared to the resource name in the stamp, if they do not match, the
151 stamp is rejected.</p>
152 <p>Note: if no resource name is given the stamp is anyway checked to see
153 if it is otherwise valid, but it could be minted for a different
154 resource, which would allow stamps to be reused across different
155 resources, so hashcash will return unchecked exit code on exit.</p>
156 <p>Stamps are by default considered to be valid for 28 days. The validity
157 period can be changed using the <em>-e</em> flag.</p>
158 <p>If the stamp has expired or has a date in the future the stamp is
159 rejected and the program exits immediately.</p>
160 <p>If a required preimage size is given with the <em>-b</em> flag, the stamps value
161 is computed and compared, if the stamp has insufficent value it is rejected,
162 and the program exits immediately. If the <em>-b</em> flag is not given, the
163 stamp is checked to see if it is otherwise valid, but hashcash will return
164 unchecked exit code on exit.</p>
165 <p>If the stamp is double spent the stamp is rejected. Double spending
166 protection is discussed in more detail below in
167 <a href="#double_spending_protection">Double Spending Protection</a>. If double spending protection is not
168 enabled, the stamp could be double spent, so hashcash will return
169 unchecked exit code (exit code 2) on exit.</p>
170 <p>The <em>-w</em> flag can be used to request that the number of bits of the
171 preimage are counted and displayed. The <em>-n</em> flag can be used to
172 request that the resource name in the stamp is parsed out and
173 displayed. The <em>-l</em> flag can be used to request the number of
174 seconds until expiry of the stamp is output.</p>
175 <p>The program will only return exit codes valid or invalid if the <em>-c</em>
176 flag is used, the <em>-b</em> flag is used, <em>-d</em>, <em>-r resource</em> are used.
177 These are the minimum set of options necessary to fully check the
178 validty of a stamp. If these criteria are not met, the program will
179 return exit code unchecked (exit code 2) on exit. (See also the <em>-y</em>
180 flag.)</p>
181 <p>
182 </p>
183 <h2><a name="double_spending_protection">Double Spending Protection</a></h2>
184 <p>If the <em>-d</em> flag is used when checking stamps, a database of spent
185 stamps is kept.</p>
186 <p>By default stamps expire after 28 days, without expiry the database
187 would grow indefinately. You can specify an alternate expiry period
188 with the <em>-e</em> flag. The recommended (and default) expiry period for
189 email is 28 days. After the expiry period amount of time, the stamp
190 is anyway considered expired and may be purged from the database to
191 save space. (See <a href="#purging_periodically_vs_on_next_access">Purging Periodically vs on Next Access</a> for how to
192 purge stamps.)</p>
193 <p>For efficiency reasons a stamp is verified before it is checked in the
194 database; if it is otherwise invalid no database activity will occur.</p>
195 <p>Note: The decision about how long the stamp should be considered valid
196 is up to the verifier. If it is too short it is possible for some
197 applications that the stamp will expire before arriving at the
198 recipient (eg with email.) The suggested value of 28 days should be
199 safe for normal email delivery delays. The choice is a trade-off
200 between database size and risk of expiry prior to arrival, and depends
201 on the application.</p>
202 <p>Note: Different stamps in the same database can have different
203 validity periods, so for example stamps for different resources with
204 different validity periods can be stored in the same database, or the
205 recipient may change the validity period for future stamps without
206 affecting the validity of old stamps.</p>
207 <p>
208 </p>
209 <h2><a name="purging_periodically_vs_on_next_access">Purging Periodically vs on Next Access</a></h2>
210 <p>To purge old stamps periodically while checking stamps use the <em>-p
211 period</em> option to purge no sooner than the given time period since the
212 last purge. Purging can be used with the <em>-k</em> option to purge
213 unexpired stamps also, and with the <em>-j resource</em> flag to purge only
214 stamps for the given resource.</p>
215 <p>There are circumstances where it may be inconvenient to purge stamps
216 on the next access, for example if there is a large double spend
217 database which takes some time to purge, and the response time of the
218 hashcash checker is important. To avoid this problem, purging can be
219 done separately using just the <em>-p now</em> option to request just the
220 purge operation. On unix for example you could call <a href="#item_hashcash__2dp_now"><code>hashcash -p
221 now</code></a> in a cron job once per day, or on demand when disk was running
222 low.</p>
223 <p>
224 </p>
225 <h2><a name="speed_estimates">Speed Estimates</a></h2>
226 <p>The <em>-s</em> flag requests measurement of how many preimage can be
227 tested per second. No stamp is minted, or verified.</p>
228 <p>If the <em>-b</em> flag is used with this option, instead an estimate of how
229 many seconds it would take to mint a stamp of the given size in bits
230 is computed. To find out how much time it will take to mint a default
231 sized stamp use <em>-s -b default</em>.</p>
232 <p>
233 </p>
234 <h2><a name="notes">Notes</a></h2>
235 <p>All informational output is printed on stderr. Minted stamps, and
236 results of stamp verification and timing are printed on stdout. The
237 quiet flag <em>-q</em> suppresses all informational output. The <em>-v</em> flag
238 requests more informational output. The requested output, which is
239 the only information that is output in quiet mode (when <em>-q</em> is
240 specified) is printed on standard output. If stdout is a pipe, or
241 when quiet mode is in effect the output is printed without description
242 (ie just bits, just seconds, just resource).</p>
243 <p>
244 </p>
245 <hr />
246 <h1><a name="options">OPTIONS</a></h1>
247 <dl>
248 <dt><strong><a name="item__2dc"><em>-c</em></a></strong><br />
249 </dt>
250 <dd>
251 Check the expiry information of stamps given as an argument or on
252 stdin. (Use with <em>-b</em>, <em>-d</em> and <em>-r resource</em> to fully check
253 stamps).
254 </dd>
255 <p></p>
256 <dt><strong><a name="item__2dm"><em>-m</em></a></strong><br />
257 </dt>
258 <dd>
259 Mint stamps with the resources given as arguments or on stdin.
260 </dd>
261 <p></p>
262 <dt><strong><a name="item__2db_bits"><em>-b bits</em></a></strong><br />
263 </dt>
264 <dd>
265 When minting a stamp, create a preimage of at least this many bits.
266 When verifying a stamp require that it have a preimage of at minimum
267 this many bits, otherwise reject it. If omitted the default is used.
268 </dd>
269 <dd>
270 <p>When checking stamps, require that the stamps have this many bits.</p>
271 </dd>
272 <dd>
273 <p>The default number of bits can be specified with <em>-b default</em>. Bits
274 relative to the default can also be specified with <em>-b +n</em> for n bits
275 more than the default and <em>-b -n</em> for n bits less than the default.</p>
276 </dd>
277 <dd>
278 <p><em>-b default</em>, <em>-b +0</em> and <em>-b -0</em> are all equivalent.</p>
279 </dd>
280 <dd>
281 <p>When doing the speed test <em>-s</em>, can to measure speed of default
282 token with <em>-s -b default</em>.</p>
283 </dd>
284 <p></p>
285 <dt><strong><a name="item__2dr_resource"><em>-r resource</em></a></strong><br />
286 </dt>
287 <dd>
288 When minting stamps, the resource name (recipient's email address) to
289 mint the stamp against can be given either with <em>-r resource</em> or as
290 an argument to <code>hashcash</code>.
291 </dd>
292 <dd>
293 <p>When checking stamps, the resource name (your own email address) is
294 given with the <em>-r</em> option. If the resource name is given it is
295 checked against the resource name in the stamp, and if they do not
296 match the stamp is rejected. Note if the resource name is not given,
297 stamps for other resources would be accepted, and therefore hashcash
298 returns exit code unchecked (exit code 2) on exit.</p>
299 </dd>
300 <p></p>
301 <dt><strong><a name="item__2do"><em>-o</em></a></strong><br />
302 </dt>
303 <dd>
304 When verifying stamps multiple resources can be given. By default the
305 resources are just checked one by one until a matching valid resource is
306 found. However when you use wildcards or regular expressions (see <em>-E</em>),
307 it is useful to be able to specify that one resource overrides another. For
308 example this: <em>-b15 -r <a href="mailto:[email protected]">[email protected]</a> -o -b10 *@dev.null</em> states that mail
309 to address <em><a href="mailto:[email protected]">[email protected]</a></em> requires 15 bits, but mail to <em>*@dev.null</em>
310 requires only 10 bits. If we omitted the <em>-o</em> override relationship
311 between the two resources, a stamp of 10 bits would be accepted for address
312 <em><a href="mailto:[email protected]">[email protected]</a></em> because while it would be rejected as having insufficient
313 bits under the first rule, it would be accepted under the 2nd rule. The
314 <em>-o</em> option allows you avoid this problem.
315 </dd>
316 <p></p>
317 <dt><strong><a name="item__2de_time"><em>-e time</em></a></strong><br />
318 </dt>
319 <dd>
320 Expiry period for spent stamps. While checking stamps (using the <em>-c</em>
321 flag), if the stamp was minted more than the specified amount of time ago,
322 it is considered expired. If this option is not used, by default stamps
323 expire after 28 days. The expiry period is given in seconds by default (an
324 argument of 0 means forever). A single character suffix can be used to
325 specify alternate units (m = minutes, h = hours, d = days, M = months, y = Y
326 = years, and s = seconds).
327 </dd>
328 <dd>
329 <p>If used with the <em>-d</em> option, the spent stamp and its expiry period
330 is recorded in the database. See the <em>-p</em> option for description of
331 how to purge stamps from the database.</p>
332 </dd>
333 <dd>
334 <p>While minting stamps, the <em>-e</em> flag can have an effect on the
335 resolution of time created in the stamp. Without the <em>-e</em> option,
336 the default resolution is days (time format: YYMMDD). Alternate
337 formats based on range of expiry period are as follows:</p>
338 </dd>
339 <dd>
340 <p>While minting you can also given an explicit time width with the <em>-z</em>
341 option instead. (<em>-z</em> overrides <em>-e</em> if both are given. If neither
342 are given the default is 6 chars (time format: YYMMDD)).</p>
343 </dd>
344 <dd>
345 <p>The rules for automatically determining appropriate time width from
346 <em>-e</em> if no <em>-z</em> option is given are:</p>
347 </dd>
348 <ul>
349 <li><strong><a name="item_period__3e_3d_2_years_then_time_format_yy_is_used_">period &gt;= 2 years then time format YY is used rounded down
350 to the nearest year start;</a></strong><br />
351 </li>
352 <li><strong><a name="item_2_years__3c_period__3c_3d_2_months_then_time_forma">2 years &lt; period &lt;= 2 months then time format YYMM is
353 used rounded down to the nearest month start;</a></strong><br />
354 </li>
355 <li><strong><a name="item_2_months__3c_period__3c_3d_2_days_then_time_format">2 months &lt; period &lt;= 2 days then time format YYMMDD is
356 used rounded down to the begining of the nearest day;</a></strong><br />
357 </li>
358 <li><strong><a name="item_2_days__3c_period__3c_3d_2_minutes_then_time_forma">2 days &lt; period &lt;= 2 minutes then time format
359 YYMMDDhhmm is used rounded down to the begining of the nearest minute;</a></strong><br />
360 </li>
361 <li><strong><a name="item_period__3c_2_minutes_then_time_format_yymmddhhmmss">period &lt; 2 minutes then time format YYMMDDhhmmss is used in
362 seconds.</a></strong><br />
363 </li>
364 </ul>
365 <p>Note the rounding down is based on UTC time, not local time. This can
366 lead to initially suprising results when rounding down to eg days in
367 time zones other than GMT (UTC = GMT). It may be clearer to
368 understand if you use the <em>-u</em> option.</p>
369 <dt><strong><a name="item__2dz_width"><em>-z width</em></a></strong><br />
370 </dt>
371 <dd>
372 The <em>-z</em> option is for use during minting and allows user choice of
373 width of time width field. See also the <em>-e</em> option given in
374 combination with <em>-m</em> to specify an implicit time field width under
375 the description of the <em>-e</em> flag. Valid widths are 6,10 or 12 chars
376 corresponding respectively to: YYMMDD, YYMMDDhhmm, and YYMMDDhhmmss
377 rounded down to the nearest day, or minute respectively.
378 </dd>
379 <dd>
380 <p>Note the rounding down is based on UTC time, not local time. This can
381 lead to initially suprising results when rounding down to eg days in
382 time zones other than GMT (UTC = GMT). It may be clearer to
383 understand if you use the <em>-u</em> option.</p>
384 </dd>
385 <p></p>
386 <dt><strong><a name="item__2dg_period"><em>-g period</em></a></strong><br />
387 </dt>
388 <dd>
389 The <em>-g</em> option is for use when checking hashcash stamps with the
390 <em>-c</em> option and specifies a grace period for clock skew, ie if a
391 hashcash stamp arrives with a date in the future or in the past it
392 will not be rejected as having a futuristic date (or as being expired)
393 unless it is more futuristic (or has been expired for longer) than
394 this period. The default is 2 days, which means as long as the
395 sending system's clock is no more than 2 days ahead (or 2 days behind)
396 of the receiving system's clock, the hashcash stamp will still be
397 accepted.
398 </dd>
399 <dd>
400 <p>The default units for grace period are seconds. A single character
401 suffix can be used to specify alternate units (m = minutes, h = hours,
402 d = days, M = months, y = Y = years, and s = seconds).</p>
403 </dd>
404 <p></p>
405 <dt><strong><a name="item__2dd"><em>-d</em></a></strong><br />
406 </dt>
407 <dd>
408 Store stamps in a double spend database. If stamp has been seen
409 before it will be rejected even if it is otherwise valid. The default
410 database file is <em>database.sdb</em> in the current directory. Only
411 otherwise valid stamps will be stored in the database. Only fully
412 validated stamps will be stored in the database, unless the <em>-y</em>
413 option is given.
414 </dd>
415 <p></p>
416 <dt><strong><a name="item__2df_dbname"><em>-f dbname</em></a></strong><br />
417 </dt>
418 <dd>
419 Use <em>dbname</em> instead of default filename for double spend database.
420 </dd>
421 <p></p>
422 <dt><strong><a name="item__2dp_period"><em>-p period</em></a></strong><br />
423 </dt>
424 <dd>
425 Purges the database of expired stamps if the given time period has
426 passed since the last time it was purged. As a convenience <em>-p now</em>
427 is equivalent to <em>-p 0</em> both of which mean purge now, regardless of
428 when the database was last purged.
429 </dd>
430 <dd>
431 <p>If used in combination with <em>-j resource</em> only the stamps minted for
432 the given resource are purged.</p>
433 </dd>
434 <dd>
435 <p>If used in combination with <em>-k</em> all stamps even un-expired stamps
436 are purged. Can be used in combination with <em>-t time</em> to expire as
437 if the current time were the given time.</p>
438 </dd>
439 <p></p>
440 <dt><strong><a name="item__2dk"><em>-k</em></a></strong><br />
441 </dt>
442 <dd>
443 Use with option <em>-p</em> to request all stamps are purged rather than
444 just expired ones.
445 </dd>
446 <p></p>
447 <dt><strong><a name="item__2dj_resource"><em>-j resource</em></a></strong><br />
448 </dt>
449 <dd>
450 Use with option <em>-p</em> to request that just stamps matching the given
451 resource name are to be purged, rather than the default which is to
452 purge all expired stamps. If the resource name is the empty string,
453 all stamps are matched (this is equivalent to omitting the <em>-j</em>
454 option).
455 </dd>
456 <dd>
457 <p>Note the <em>-E</em>, <em>-M</em> and <em>-S</em> type of match flags also apply to
458 resources given with the <em>-j resource</em> flag.</p>
459 </dd>
460 <p></p>
461 <dt><strong><a name="item__2ds"><em>-s</em></a></strong><br />
462 </dt>
463 <dd>
464 Print timing information only, and don't proceed to create a stamp.
465 If combined with <em>-b bits</em> flag print estimate of how long the
466 requested preimage size would take to compute, if <em>-s</em> given by
467 itself, just prints speed of the preimage finder. To print an
468 estimate of how long the default number of bits would take use <em>-b
469 default</em>.
470 </dd>
471 <p></p>
472 <dt><strong><a name="item__2dh"><em>-h</em></a></strong><br />
473 </dt>
474 <dd>
475 Print short usage information.
476 </dd>
477 <p></p>
478 <dt><strong><a name="item__2dv"><em>-v</em></a></strong><br />
479 </dt>
480 <dd>
481 Print more verbose informational output about the stamp minting or
482 verification. (If -v is the only argument, prints the tool version
483 number.)
484 </dd>
485 <p></p>
486 <dt><strong><a name="item__2dv"><em>-V</em></a></strong><br />
487 </dt>
488 <dd>
489 Prints tool version number.
490 </dd>
491 <p></p>
492 <dt><strong><a name="item__2dq"><em>-q</em></a></strong><br />
493 </dt>
494 <dd>
495 Batch mode. Prints no information other than output. This option
496 overrides the <em>-v</em> option.
497 </dd>
498 <p></p>
499 <dt><strong><a name="item__2dx"><em>-X</em></a></strong><br />
500 </dt>
501 <dd>
502 When minting, prints the hashcash email X-header 'X-Hashcash: ' before
503 the stamp. Without this option just the bare stamp is printed.
504 </dd>
505 <dd>
506 <p>When checking, after scanning stamps given as arguments, scans stdin
507 for lines starting with the string 'X-Hashcash:', and uses the rest of
508 the matching line as the stamp. Only the lines up to and ending at
509 the first blank line are scanned (see also <em>-i</em> flag which can be
510 used to override this). A blank line is the separator used to
511 separate the headers from the body of a mail message or USENET
512 article. This is meant to make it convenient to pipe a mail message
513 or USENET article to hashcash on stdin.</p>
514 </dd>
515 <p></p>
516 <dt><strong><a name="item__2dx_extension"><em>-x extension</em></a></strong><br />
517 </dt>
518 <dd>
519 An extension string composed of name value sets. The extension format
520 is described below in the section on the hashcash stamp format. This
521 allows users to define their own stamp extensions which are hashed
522 into the stamp, verified by recipients that support them, and ignored
523 by recipients that don't support them. Note the extension hook
524 mechanism has not yet been implemented. This will come in a
525 subsequent release.
526 </dd>
527 <p></p>
528 <dt><strong><a name="item__2di"><em>-i</em></a></strong><br />
529 </dt>
530 <dd>
531 When checking and using the <em>-X</em> flag, ignore the blank line
532 boundary between headers and body of the message, and check for
533 stamps in the body too if one is not found in the headers.
534 </dd>
535 <p></p>
536 <dt><strong><a name="item__2dt_time"><em>-t time</em></a></strong><br />
537 </dt>
538 <dd>
539 Pretend the current time is the time given for purposes of minting
540 stamps, verifying stamps and purging old stamps from the database.
541 Time is given in a format based on UTCTIME format
542 YYMMDD[hhmm[ss]].
543 </dd>
544 <dd>
545 <p>Time is expressed in local time by default. Use with <em>-u</em> flag to
546 give time in UTC (GMT).</p>
547 </dd>
548 <dd>
549 <p>You can also give time relative to the current time by prefixing the
550 argument with + or -. The default units for relative time are
551 seconds. A single character suffix can be used to specify alternate
552 units (m = minutes, h = hours, d = days, M = months, y = Y = years,
553 and s = seconds).</p>
554 </dd>
555 <dd>
556 <p>Note: when time is expressed in local time, if there is daylight
557 savings in your timezone, there are one or two ambiguous hours per
558 year at the time of change from daylight savings time to normal time.</p>
559 </dd>
560 <p></p>
561 <dt><strong><a name="item__2du"><em>-u</em></a></strong><br />
562 </dt>
563 <dd>
564 Input and output absolute times in UTC (GMT) instead of local time.
565 </dd>
566 <p></p>
567 <dt><strong><a name="item__2da_period"><em>-a period</em></a></strong><br />
568 </dt>
569 <dd>
570 Add (or subtract if number is negative) a random value from the
571 current time before minting the stamp. This hides the time the stamp
572 was created, which may be useful for anonymous users. Note adding
573 (rather than subtracting) a random time may be risky if the stamp
574 takes less than the added time to arrive as the recipient will reject
575 stamps with time stamps in the future.
576 </dd>
577 <p></p>
578 <dt><strong><a name="item__2dn"><em>-n</em></a></strong><br />
579 </dt>
580 <dd>
581 Print resource name parsed from stamp being verified. Returns exit
582 code unchecked on exit.
583 </dd>
584 <p></p>
585 <dt><strong><a name="item__2dl"><em>-l</em></a></strong><br />
586 </dt>
587 <dd>
588 Print number of seconds left before stamp expires. Returns exit code
589 unchecked on exit.
590 </dd>
591 <dd>
592 <p>Note: the calculation includes the grace period, so can be up to 2
593 times grace period longer than you might otherwise expect (clock fast
594 but system has to presume it could be slow). If you want to exclude
595 the grace period add <em>-g0</em> to set grace period to 0 for the
596 calculation.</p>
597 </dd>
598 <p></p>
599 <dt><strong><a name="item__2dw"><em>-w</em></a></strong><br />
600 </dt>
601 <dd>
602 Print number of bits of preimage of stamp. Returns exit code
603 unchecked on exit.
604 </dd>
605 <p></p>
606 <dt><strong><a name="item__2dy"><em>-y</em></a></strong><br />
607 </dt>
608 <dd>
609 Returns success if the stamp is valid even if it is not fully checked.
610 Use with <em>-c</em> where not all of <em>-d</em>, <em>-r</em> are specified to get
611 success exit code on valid but partially checked stamp. Similarly can
612 use with <em>-n</em>, <em>-l</em>, <em>-w</em> with same effect.
613 </dd>
614 <p></p>
615 <dt><strong><a name="item__2dm"><em>-M</em></a></strong><br />
616 </dt>
617 <dd>
618 When checking stamps, allow wildcard <em>*</em> matching in the resource
619 name to make it simpler to specify multiple email addresses and to
620 allow matching catch-all addresses and addresses including subdomains.
621 This is the default. See also <em>-S</em>, <em>-E</em> and <em>-C</em>
622 </dd>
623 <p></p>
624 <dt><strong><a name="item__2ds"><em>-S</em></a></strong><br />
625 </dt>
626 <dd>
627 When checking stamps use simple text compare to compare resource names
628 to those in stamps. See also <em>-M</em>, <em>-E</em> and <em>-C</em>.
629 </dd>
630 <p></p>
631 <dt><strong><a name="item__2de"><em>-E</em></a></strong><br />
632 </dt>
633 <dd>
634 When checking stamps use regular expressions to specify resource names
635 to make it simpler to specify multiple email addresses, catch-all
636 addresses, classes of extension addresses and addresses including
637 subdomains. Note regular expression syntax is POSIX style: special
638 characters do not need to be quoted to have their special meaning; but
639 they do have to be quoted with \ to that character in the searched
640 string. The regular expression automatically has ^ added at the
641 beginning and $ added at the end, if they are not specified. The
642 special characters ^ matches the beginning of the resouce, and $
643 matches the end of resource.
644 </dd>
645 <dd>
646 <p>(Note even if compiled with BSD regular expressions, POSIX style
647 syntax is used; also note BSD regular expressions do not support
648 ranges {}.)</p>
649 </dd>
650 <p></p>
651 <dt><strong><a name="item__2dc"><em>-C</em></a></strong><br />
652 </dt>
653 <dd>
654 By default resources are canonicalized to lower case on minting and on
655 checking. The <em>-C</em> flag overrides this so that resources are treated
656 as case sensitive on checking, and not canonizalized on minting.
657 </dd>
658 <p></p>
659 <dt><strong><a name="item__2dp"><em>-P</em></a></strong><br />
660 </dt>
661 <dd>
662 Print progress info (number of iterations, expected iterations,
663 percentage done, best stamp size found so far).
664 </dd>
665 <p></p>
666 <dt><strong><a name="item__2do_core"><em>-O core</em></a></strong><br />
667 </dt>
668 <dd>
669 Select hashcash core with that number. Currently 0-9 are valid cores.
670 Not all cores work on all architectures. Eg some are x86 specific
671 assembler, others PPC specific assembler. If a core is not valid
672 hashcash returns failure and explains what happened.
673 </dd>
674 <p></p>
675 <dt><strong><a name="item__2dz_n"><em>-Z n</em></a></strong><br />
676 </dt>
677 <dd>
678 Compress the stamp. This is a time vs space trade off. Larger stamps
679 are faster, but arguably slightly ugly. For fastest stamps (the
680 default) use -Z 0; for partly compressed stamps use -Z 1; for very
681 compressed, but somewhat slow stamps use -Z 2. (Note: due to a late
682 discovered bug, -Z2 is the same as -Z1 for now until I can fix that.)
683 </dd>
684 <p></p></dl>
685 <p>
686 </p>
687 <hr />
688 <h1><a name="examples">EXAMPLES</a></h1>
689 <p>
690 </p>
691 <h2><a name="creating_stamps">Creating stamps</a></h2>
692 <dl>
693 <dt><strong><a name="item_hashcash__2ds"><code>hashcash -s</code></a></strong><br />
694 </dt>
695 <dd>
696 Print timing information about how many preimages the machine can try
697 per second.
698 </dd>
699 <p></p>
700 <dt><strong><a name="item_hashcash__2dsv"><code>hashcash -sv</code></a></strong><br />
701 </dt>
702 <dd>
703 More accurate but quite slow benchmarking of different processor
704 specific minting cores.
705 </dd>
706 <p></p>
707 <dt><strong><a name="item_hashcash__2ds__2db_default"><code>hashcash -s -b default</code></a></strong><br />
708 </dt>
709 <dd>
710 Print how long it would take the machine to compute a default sized
711 preimage (but don't actually compute a preimage).
712 </dd>
713 <p></p>
714 <dt><strong><a name="item_hashcash__2ds__2db_32"><code>hashcash -s -b 32</code></a></strong><br />
715 </dt>
716 <dd>
717 Print how long it would take the machine to compute a 32 bit preimage
718 (but don't actually compute a preimage).
719 </dd>
720 <p></p>
721 <dt><strong><a name="item_hashcash__2dm"><code>hashcash -m</code></a></strong><br />
722 </dt>
723 <dd>
724 Mint a stamp. Will prompt for resource name and mint with default
725 value (number of preimage bits).
726 </dd>
727 <p></p>
728 <dt><strong><a name="item_hashcash__2dm_foo"><code>hashcash -m foo</code></a></strong><br />
729 </dt>
730 <dd>
731 Compute preimage on resource foo. Will mint with default value
732 (number of preimage bits).
733 </dd>
734 <p></p>
735 <dt><strong><a name="item_hashcash__2dm_foo__2db_10"><code>hashcash -m foo -b 10</code></a></strong><br />
736 </dt>
737 <dd>
738 Compute 10 bit preimage on resource foo.
739 </dd>
740 <p></p>
741 <dt><strong><a name="item_hashcash__2da__2d3d"><code>hashcash -a -3d</code></a></strong><br />
742 </dt>
743 <dd>
744 Subtract a random time of between 0 days and 3 days from the stamp's
745 creation time. This is the same fuzz factor used by mixmaster to
746 reduce risk of timing-correlations.
747 </dd>
748 <p></p></dl>
749 <p>
750 </p>
751 <h2><a name="examining_stamps">Examining Stamps</a></h2>
752 <dl>
753 <dt><strong><a name="item_hashcash__2dw_1_3a24_3a040806_3afoo_3a_3a511801694"><code>hashcash -w 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
754 </dt>
755 <dd>
756 Report the value of the stamp (how many bits of preimage) there are.
757 The example is a 24 bit preimage, which takes on average 25 seconds
758 to create on a 3Ghz P4.
759 </dd>
760 <p></p>
761 <dt><strong><a name="item_hashcash__2dmq__2db_10_foo__7c_hashcash__2dw"><code>hashcash -mq -b 10 foo | hashcash -w</code></a></strong><br />
762 </dt>
763 <dd>
764 Create a stamp in batch mode, pass to hashcash on stdin to verify,
765 have it print how many bits there were.
766 </dd>
767 <p></p>
768 <dt><strong><a name="item_hashcash__2dn_1_3a24_3a040806_3afoo_3a_3a511801694"><code>hashcash -n 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
769 </dt>
770 <dd>
771 Report the resource name from the stamp. The resource name in the
772 example is foo.
773 </dd>
774 <p></p>
775 <dt><strong><a name="item_hashcash__2dl__2de_30y_1_3a24_3a040806_3afoo_3a_3a"><code>hashcash -l -e 30y 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
776 </dt>
777 <dd>
778 Report how long until the stamp expires if it expires in 30 years from
779 its creation date. (Note dates too far into the future run into the
780 2038 end of Epoch, which is the unix time analog of the y2k bug).
781 </dd>
782 <p></p></dl>
783 <p>
784 </p>
785 <h2><a name="verifying_stamps">Verifying Stamps</a></h2>
786 <dl>
787 <dt><strong><a name="item_hashcash__2dc_1_3a24_3a040806_3afoo_3a_3a511801694"><code>hashcash -c 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
788 </dt>
789 <dd>
790 Check if the stamp is valid. Note as we are not checking the stamp in
791 a double spend database, and did not specify a resource name or
792 required number of bits of preimage and hashcash will consider the
793 stamp not fully checked, and it will report it as valid but not fully
794 unchecked, or as invalid if there is any problem with the stamp.
795 </dd>
796 <p></p>
797 <dt><strong><a name="item_hashcash__2dc__2db24_1_3a24_3a040806_3afoo_3a_3a51"><code>hashcash -c -b24 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
798 </dt>
799 <dd>
800 Check that the value of the stamp is greater or equal to 24 bits.
801 This example has 24 bit value. If you increase the requested number
802 of bits or replace the stamp with one with less than 24 bit preimage
803 the stamp will be rejected.
804 </dd>
805 <p></p>
806 <dt><strong><a name="item_hashcash__2dc__2db24__2dr_foo_1_3a24_3a040806_3afo"><code>hashcash -c -b24 -r foo 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
807 </dt>
808 <dd>
809 As above check if the stamp has sufficient value, but in addition
810 check that the resource name given matches the resource name in the
811 stamp.
812 </dd>
813 <p></p></dl>
814 <p>
815 </p>
816 <h2><a name="double_spending_prevention">Double Spending Prevention</a></h2>
817 <p>The examples given in <a href="#verifying_stamps">Verifying Stamps</a> can be modified to keep a
818 double spend database so that the same stamp will not be accepted
819 twice. Note a stamp will only be checked in and added to the database
820 if it is otherwise valid and fully checked (a required number of bits
821 of preimage has been specified and a resource has been specified).</p>
822 <dl>
823 <dt><strong><a name="item_hashcash__2dcd__2db_10__2dr_foo_1_3a24_3a040806_3a"><code>hashcash -cd -b 10 -r foo 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
824 </dt>
825 <dd>
826 Check the stamp and add to double spent database if it's valid (has
827 correct resource name and sufficient value).
828 </dd>
829 <p></p>
830 <dt><strong><code>hashcash -cd -b 10 -r foo 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></strong><br />
831 </dt>
832 <dd>
833 Try to double spend the stamp. It will be rejected as double spent.
834 </dd>
835 <p></p></dl>
836 <p>
837 </p>
838 <h2><a name="stamp_expiry">Stamp Expiry</a></h2>
839 <p>To prevent the double spend database growing indefinately, the
840 recipient can request that stamps be no older than a specified period.
841 After expiry old stamps can dropped from the double spend database as
842 they will no longer be needed -- expired stamps can be rejected based
843 purely on their old date, so the space taken by expired stamps in the
844 double spend database can be saved without risk of accepting an
845 expired though otherwise valid stamp.</p>
846 <p>The third field of the stamp is the UTC time since 1st January 1970.
847 The default time format is YYMMDD, time rounded down to the nearest
848 day. The default validity period is 28 days.</p>
849 <p>You can provide an alternative validity period with the <em>-e</em> option.</p>
850 <dl>
851 <dt><strong><a name="item_hashcash__2dcd__2db_10__2de_2d__2dr_foo_1_3a24_3a0"><code>hashcash -cd -b 10 -e 2d -r foo 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></a></strong><br />
852 </dt>
853 <dd>
854 Try verifying an old stamp, the above stamp was created 11 Aug 2002.
855 </dd>
856 <dd>
857 <p>We gave option <em>-e 2d</em> so the stamps expiry date is 2 days after
858 creation, which is now in the past.</p>
859 </dd>
860 <dd>
861 <p>Note: if the creation time is expressed in the stamp in days, the
862 precise creation date is the begining of the specified day in UTC time
863 (similarly for alternate units the creation time is rounded down to
864 the begining of the unit it is expressed in). For units in days, for
865 example, this may mean depending on your time zone that the stamp
866 appears to be considered invalid in under the specified expiry period
867 in days relative to your relative view of what day it is, as the
868 calculation is based on current time in UTC, and the creation time of
869 the stamp is expressed in UTC time.</p>
870 </dd>
871 <p></p>
872 <dt><strong><code>hashcash -cd -b 10 -r foo 1:24:040806:foo::511801694b4cd6b0:1e7297a</code></strong><br />
873 </dt>
874 <dd>
875 Test whether the stamp is otherwise valid, apart from having expired.
876 Omitting the <em>-e</em> tells hashcash that the stamp will never expire.
877 An expiry period of forever can also be given explitly like this: <em>-e
878 0</em>, where an expiry period of 0 means forever.
879 </dd>
880 <p></p></dl>
881 <p>
882 </p>
883 <h2><a name="purging_old_stamps">Purging old stamps</a></h2>
884 <p>If the <em>-c</em>, <em>-d</em> options are used together, each time a stamp is
885 checked, if it is valid and all of the mandatory aspects of the stamp
886 are verified (preimage bits check, resource name check) then the
887 stamp and its expiry period is written to the database file. The
888 default expiry period if an expiry period is not given explicitly with
889 the <em>-e</em> option is 28 days (ie stamps expire after 4 weeks).</p>
890 <p>First mint and then add a stamp:</p>
891 <dl>
892 <dt><strong><a name="item_hashcash__2dm__2db_10_foo__2de_1m__3e_stamp"><code>hashcash -m -b 10 foo -e 1m &gt; stamp</code></a></strong><br />
893 </dt>
894 <dd>
895 Note: we specified an expiry on minting in this example, to ensure
896 that the stamp creation time is given in high enough resolution in the
897 stamp that the stamp will not be considered expired at time of
898 creation. (Recall the default resolution is in days, a stamp created
899 with a creation time rounded down to the beginging of the day is
900 unlikely to be considered valid 1 minute later unless you mint it at
901 midnight UTC time.)
902 </dd>
903 <p></p>
904 <dt><strong><a name="item_hashcash__2dcd__2de_1m__2db_10__2dr_foo__3c_stamp"><code>hashcash -cd -e 1m -b 10 -r foo &lt; stamp</code></a></strong><br />
905 </dt>
906 <dd>
907 The stamp expires in 1 minute. Wait 1 minute and then explicitly
908 request that expired stamps be purged:
909 </dd>
910 <p></p>
911 <dt><strong><a name="item_hashcash__2dp_now"><code>hashcash -p now</code></a></strong><br />
912 </dt>
913 <dd>
914 Then try resubmitting the same stamp:
915 </dd>
916 <p></p>
917 <dt><strong><code>hashcash -cd -e 1m -b 10 -r foo &lt; stamp</code></strong><br />
918 </dt>
919 <dd>
920 and the stamp will be rejected anyway as it has expired, illustrating
921 why it was not necessary to keep this stamp in the database.
922 </dd>
923 <dd>
924 <p>With the default database (the sdb format) the database contents are
925 human readable, so you can view their contents by cating them to the
926 terminal:</p>
927 </dd>
928 <p></p>
929 <dt><strong><a name="item_cat_hashcash_2esdb"><code>cat hashcash.sdb</code></a></strong><br />
930 </dt>
931 <dd>
932 to see that the stamp really is added and then after puring
933 subsequently purged due to expiry.
934 </dd>
935 <p></p></dl>
936 <p>
937 </p>
938 <h2><a name="purging_old_stamps_on_demand">Purging old stamps on Demand</a></h2>
939 <p>As a convenience you can purge at the same time as checking stamps by
940 using the <em>-p</em> option with the <em>-c</em> option.</p>
941 <dl>
942 <dt><strong><a name="item_hashcash__2dm__2db_10_foo__3e_stamp"><code>hashcash -m -b 10 foo &gt; stamp</code></a></strong><br />
943 </dt>
944 <dt><strong><a name="item_hashcash__2dcd__2dp_now__2de_1__2db_10__2dr_foo__3"><code>hashcash -cd -p now -e 1 -b 10 -r foo &lt; stamp</code></a></strong><br />
945 </dt>
946 <dd>
947 It may be inefficient to purge stamps on every use as the entire
948 database has to be scanned for expired stamps. By giving a time
949 period to the <em>-p</em> option, you can tell <code>hashcash</code> to purge no more
950 frequently than that time period since the previous purge.
951 </dd>
952 <dd>
953 <p>For example:</p>
954 </dd>
955 <p></p>
956 <dt><strong><a name="item_hashcash__2dcd__2dp_1d__2de_1__2db_10__2dr_foo__3c"><code>hashcash -cd -p 1d -e 1 -b 10 -r foo &lt; stamp</code></a></strong><br />
957 </dt>
958 <dd>
959 tells <code>hashcash</code> to purge any expired stamps no more than once per
960 day.
961 </dd>
962 <p></p>
963 <dt><strong><a name="item_hashcash__2dp_1m__2dj_foo"><code>hashcash -p 1M -j foo</code></a></strong><br />
964 </dt>
965 <dd>
966 tells <code>hashcash</code> to purge only expired stamps matching resource foo
967 once per month.
968 </dd>
969 <p></p>
970 <dt><strong><a name="item_hashcash__2dp_now__2dk"><code>hashcash -p now -k</code></a></strong><br />
971 </dt>
972 <dd>
973 tells <code>hashcash</code> to purge all stamps (expired and unexpired) now.
974 </dd>
975 <p></p></dl>
976 <p>
977 </p>
978 <hr />
979 <h1><a name="stamp_format__version_1_">stamp format (version 1)</a></h1>
980 <p>The current stamp format is version 1. This tool can verify hashcash
981 version 0 stamps also, but version 0 stamps are no longer created as
982 they are being phased out in favor of the more extensible v1 stamp
983 format.</p>
984 <dl>
985 <dt><strong><a name="item_ver_3abits_3adate_3aresource_3a_5bext_5d_3arand_3a"><em>ver</em>:<em>bits</em>:<em>date</em>:<em>resource</em>:[<em>ext</em>]:<em>rand</em>:<em>counter</em></a></strong><br />
986 </dt>
987 </dl>
988 <p>where</p>
989 <dl>
990 <dt><strong><a name="item_ver__3d_1"><em>ver</em> = 1</a></strong><br />
991 </dt>
992 <dt><strong><a name="item_bits__3d_how_many_bits_of_partial_2dpreimage_the_s"><em>bits</em> = how many bits of partial-preimage the stamp is claimed to have</a></strong><br />
993 </dt>
994 <dt><strong><a name="item_date__3d_yymmdd_5bhhmm_5bss_5d_5d"><em>date</em> = YYMMDD[hhmm[ss]]</a></strong><br />
995 </dt>
996 <dt><strong><a name="item_string"><em>resource</em> = resource string (eg IP address, email address)</a></strong><br />
997 </dt>
998 <dt><strong><a name="item_ext__3d_extension__2d_2d_ignored_in_the_current_ve"><em>ext</em> = extension -- ignored in the current version</a></strong><br />
999 </dt>
1000 <dd>
1001 Format of extension:
1002 </dd>
1003 <dl>
1004 <dt><strong><a name="item__5bname1_5b_3dval1_5b_2cval2_2e_2e_2e_5d_5d_3b_5bn">[name1[=val1[,val2...]];[name2[=val1[,val2...]]...]]</a></strong><br />
1005 </dt>
1006 <dd>
1007 Note the value can also contain =. Example extension (not a real one):
1008 </dd>
1009 <dd>
1010 <pre>
1011 name1=2,3;name2;name3=var1=2,var2=3,2,val</pre>
1012 </dd>
1013 <dd>
1014 <p>Which would be extension name1 has values 2 and 3; extension name2 has
1015 no values; extension name3 has 3 values ``var1=2'', ``var2=3'', ``2'' and
1016 ``val''. The hashcash extension may interpret the values as it sees fit
1017 eg ``var1=2'' could be the value of an option to the extension name3.</p>
1018 </dd>
1019 <p></p></dl>
1020 <dt><strong><a name="item_rand__3d_string_of_random_characters_from_alphabet"><em>rand</em> = string of random characters from alphabet
1021 a-zA-Z0-9+/= to avoid preimage with other sender's
1022 stamps</a></strong><br />
1023 </dt>
1024 <dt><strong><a name="item_counter__3d_to_find_a_stamp_with_the_desired_numbe"><em>counter</em> = to find a stamp with the desired number of
1025 preimage bits need to try lots of different strings
1026 this counter is incremented on each try.
1027 The Counter is also composed of characters from the
1028 alphabet a-zA-Z0-9+/=. (Note an implementation is
1029 not required to count sequentially).</a></strong><br />
1030 </dt>
1031 </dl>
1032 <p>
1033 </p>
1034 <hr />
1035 <h1><a name="files">FILES</a></h1>
1036 <dl>
1037 <dt><strong><a name="item_hashcash_2esdb"><em>hashcash.sdb</em></a></strong><br />
1038 </dt>
1039 <dd>
1040 default double spend database
1041 </dd>
1042 <p></p></dl>
1043 <p>
1044 </p>
1045 <hr />
1046 <h1><a name="exit_status">EXIT STATUS</a></h1>
1047 <p><code>hashcash</code> returns success (exit code 0) after successfully minting a
1048 stamp, after fully checking a stamp and finding it valid, and after a
1049 timing test.</p>
1050 <p>If when checking a stamp it is found to be invalid (due to being
1051 malformed, being expired, having insufficient value, having a date in
1052 the future, or being double spent), <code>hashcash</code> returns failure (exit
1053 code 1).</p>
1054 <p>If insufficient options are given to fully check a stamp, if the stamp
1055 is otherwise valid return unchecked (exit code 2). If the <em>-y</em> flag
1056 is given and hashcash would normally return unchecked, exit code
1057 success is returned instead.</p>
1058 <p>If any exception occurs (file read failure for database checking or
1059 corrupted database contents) an exit status of 3 is returned.</p>
1060 <p>
1061 </p>
1062 <hr />
1063 <h1><a name="author">AUTHOR</a></h1>
1064 <p>Written by Adam Back &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</p>
1065 <p>
1066 </p>
1067 <hr />
1068 <h1><a name="see_also">SEE ALSO</a></h1>
1069 <p>sha1sum(1), sha1-hashcash(1), sha1(1), <a href="http://www.hashcash.org/">http://www.hashcash.org/</a></p>
1070
1071 </body>
1072
1073 </html>