This implementation follows the scheme presented by Juels and Wattenberg in 1999 and includes the improvements of Kelkboom et al. in 2011.
Warning: This has not been independently audited and should not be used for productive or even critical applications.
You can easily install it using pip:
pip3 install -U git+https://github.com/cburkert/fuzzy-commitment.git
Have a look at the help:
>>> import fcs
>>> help(fcs.FCS)
A simple usage example:
>>> cs = fcs.FCS[bytes](8, 1)
>>> c = cs.commit(b"\x01") # uses a random message to commit to
>>> cs.verify(c, b"\x03") # Verification succeeds. One bit changed.
True
>>> cs.verify(c, b"\x02") # Verification fails. Two bits changed.
False