Skip to content

Instantly share code, notes, and snippets.

@surg0r
surg0r / gist:67efa9dab596b092fe311cd33b376a59
Last active June 16, 2019 11:33
Extending Lamport signatures using hash-chain and merkle tree
Typically to obtain multiple signatures using the lamport one-time signature a series of keypairs are glommed together and put in a merkle tree. Each base leaf of the merkle tree can one-time sign and with the corresponding merkle tree proof the merkle tree root hash may act as a public key. Increasing the number of lamport one-time signatures increases the size of the tree.
Briefly, a Lamport signature works like (leaving out merkle tree):
Consider a 2 bit message = "01"
If we have four 32 byte seeds: seedA, seedB, seedC, seedD, two per message bit
Each seed may be hashed to provide: seed1h, seed2h, seed3h, seed4h
The public key for the signature is all of the seed hashes..i.e. seedAh, seedBh, seedCh, seedDh
To sign the two bit message "01", seedA and seedD are revealed..
To verify seedA and seedD are hashed to confirm they match seedAh and seedDh in the public key..
Q010500a24102f3b0f70bf5daada7219f19e58bde71cb4215f2b548bddf8706f6a34e8c6c46e2c9
01050074125ee41fe295318a79d31b45894c1aacee4b8bf7819e02976b3b48b467cccfee5ef296f89718cbe49ac5a019458794bfba9a10c6be4816a476bc37dbce48ba
### Keybase proof
I hereby claim:
* I am surg0r on github.
* I am pwaterland (https://keybase.io/pwaterland) on keybase.
* I have a public key ASBJuP3wD1patGjyFR6phFKBW3njlyJ4gZ8PFYrP1ZTRQwo
To claim this, I am signing this object: