OpenSig / opensig-btc-lib

Blockchain e-sign library
MIT License
4 stars 2 forks source link

Add timestamp getter and verification functions #11

Open dnpotter opened 8 years ago

dnpotter commented 8 years ago

Return the latest block id for the user to include within the file along with the date. Functions as a verifiable timestamp, proving the file was produced after that time. When combined with a signature this proves the file was produced between two dates.

Add a timestamp decoding function that decodes to the block hash and queries the blockchain for the block time.

Could use the complete hash or generate a shorter, reversible 'hash' as a compromise (e.g. take the first x characters of the hash. When assumed that the hash represents a block close in time to the signature then perhaps the first x characters is enough proof).