Now available: paper Binary Pebbling Algorithms for In-Place Reversal of One-Way Hash Chains from Nieuw Archief voor Wiskunde, September 2017 issue, in which the main results of the FC 2016 paper are highlighted, with illustrations.
Also available: Financial Crypto 2016 slides.
The sample programs below print the length-2k hash chain with default seed value x = "" (empty input) in reverse.
gcc -O3 -lcrypto
), and Java.
The code closely follows the pseudocode in the paper. Note that the programs start out computing the hash chain in the forward direction, and then loop outputting the reversed hash chain one element at a time.
For downloadable code, see src/readme.txt.
Sample output for k = 3:
30edbc354e8cf656adcddbeefbf3f5073372cdc42e4eca2e797bda8abebb6a05
06adb8ba851d855951490003c3c1fe4d3a2e6cd87a1299208ddfd3949d131657
1bee5a29daf06786a5516d9226b30bbdbf422a7ed475e42c3f930ea04c612091
9ff42bc5a042d3c79a61d7cb6769408fe13b1e5fc30e01e19a100e79109ed688
75d7682c8b5955557b2ef33654f31512b9b3edd17f74b5bf422ccabbd7537e1a
aa6ac2d4961882f42a345c7615f4133dde8e6d6e7c1b6b40ae4ff6ee52c393d0
5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
C code:
Java code:
<
C code:
Java code:
C code:
Java code: