++ed by:
1 non-PAUSE user
Author image Ashish Gulhati
and 1 contributors


Crypt::HashCash - HashCash Digital Cash


 $Revision: 1.130 $
 $Date: Sat Dec 22 18:42:25 PST 2018 $


HashCash is a digital cash system based on blind signatures, as introduced by David Chaum in [1].

HashCash features a number of optimizations for usability and accessibility, including blind ECDSA signatures which make for more compact coins than blind RSA, and a simple protocol that enables the system to work in a permissionless manner, requiring no user accounts or registration.

The main components of HashCash are: one or more vaults, which issue and verify HashCash coins; the coins themselves; and wallets, which hold and manage coins owned by users.

HashCash coins are blind-signed by a vault and represent specific denominations of some value stored by the vault. They are bearer tokens which can be passed directly from one user to another, and cannot be tracked by the vault.

HashCash coins could be backed by any store of value, some possibilities being precious metals, fiat currencies, gift cards, etc. The distribution includes an implementation of a vault for Bitcoin, which issues HashCash coins backed by Bitcoin.

All messages between wallets and vaults are encrypted, so there's no need for a secure communications channel between them.


To begin with, the keys and configuration details of one or more vaults (in the form of vault configuration files) need to be placed in the "~/.hashcash/vaults" directory (or "$HASHCASHDIR/.hashcash/vaults" if the HASHCASHDIR environment variable is set).

As there are no live public vaults at this time, and the software is in early beta testing, to try the system you can run a local vault yourself. After installing the HashCash distribution, run the command:


This will generate vault keys on its first run. Wait for key generation to complete before starting the wallet, so the vault configuration file is in place for the wallet.

Once the vault has completed key generation, start the wallet with:


Then you can buy or sell HashCash, export coins from your wallet to give to others, or import coins received from others into your wallet. You can also exchange coins for lower denominations, and verify coins you've imported into the wallet.

For more details on testing with a local vault, see the Download page on the website: http://www.hashcash.com/download.html. Pre-built executables for popular OSes are also available from that page.

HashCash coins can be sent to others over any communications channel - email, web, instant messaging, SMS, directly by scanning a QR code. They could even be printed on paper and used just like normal paper currency, though with a higher level of security and privacy.

It's easy to automate the acceptance of HashCash payments on a website (or via email or any other communications channel) using the Business::HashCash module.

It's also quite straightforward, from a technical standpoint, to start a HashCash vault, which could be quite a profitable automated business requiring minimal ongoing time investment. For more details on this visit the website: http://www.hashcash.com.


The Crypt::HashCash module contains a few helper functions. Most of the actual implementation of the system is in other modules, listed in the SEE ALSO section below.


Accepts a single parameter which is an amount to break into coins, and returns the denominations of the minimum number of coins that total up to this amount, as well as the total number of coins. The coin denominations are returned as a hash whose keys are the coin denominations and values are the number of coins of the corresponding denomination.


Accepts a single parameter which is the denomination of a coin to get change for, and returns the denominations of the change coins, as well as the total number of coins. The denominations are returned in a hash, as described above, followed by the total number of coins.









1. Blind Signatures For Untraceable Payments, David Chaum. http://www.hit.bme.hu/~buttyan/courses/BMEVIHIM219/2009/Chaum.BlindSigForPayment.1982.PDF


Ashish Gulhati, <crypt-hashcash at hash.neo.tc>


Please report any bugs or feature requests to bug-crypt-hashcash at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Crypt-HashCash. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Crypt::HashCash

You can also look for information at:


Copyright (c) Ashish Gulhati.

This software package is Open Software; you can use, redistribute, and/or modify it under the terms of the Open Artistic License 2.0.

Please see http://www.opensoftwr.org/oal20.txt for the full license terms, and ensure that the license grant applies to you before using or modifying this software. By using or modifying this software, you indicate your agreement with the license terms.