Twitterstamp

From meaning
Jump to: navigation, search

The United States Patent and Trademark Office states, ""If the invention has been described in a printed publication anywhere in the world, or if it was known or used by others in this country before the date that the applicant made his/her invention, a patent cannot be obtained."

But, how does one know when something was known? Traditionally, notary publics could be used to notarize a document describing an invention. Such notarization included the date and place of signing. But, this is time consuming and costly.

"Trusted timestamping is the process of securely keeping track of the creation and modification time of a document. Security here means that no one--not even the owner of the document--should be able to change it once it has been recorded provided that the timestamper's integrity is never compromised."

TwitterStamp uses Twitter as a timestamp authority. Twitter is assumed to:

  1. to use a trustworthy source of time.
  2. to include a trustworthy time value for each tweet.
  3. to include a unique integer for each tweet.


Contents

crontab

A cron job is used to dump the database on a monthly basis and then run TwitterStamp on an hourly basis:

# m h  dom mon dow   command
5 0 1 * * /home/meaning/bak/monthly-dump.sh
10 * * * * /home/meaning/bak/twitterstamp.sh

Monthly DB Dump & Hash Script

A Bash script is used to generate a SHA-512 secure hash of the changes to documents in a MediaWiki database.

#!/bin/sh

mysqldump --comments --xml -umeaning -pDB_PASS meaning mw_page mw_revision mw_text > /home/meaning/bak/`date +%Y-%m`.xml

DATE=`date +%Y-%m`
HASH=`sha512sum /home/meaning/bak/$DATE.xml.diff.gz`curl -u meaningdotcom:TWITTER_PASSWORD -d status="`echo $HASH| cut -b1-128`" http://twitter.com/statuses/update.json

Hourly Hash Diff Script

#!/bin/sh

cd /home/meaning/bak
DATE=`date +%Y-%m-%d-%H`
mysqldump --comments --xml -umeaning -pDB_PASS meaning mw_page mw_revision mw_text > $DATE.xml
diff -a `date +%Y-%m`.xml $DATE.xml | gzip >$DATE.xml.diff.gz
rm $DATE.xml
HASH=`sha512sum $DATE.xml.diff.gz`
curl -u meaningdotcom:TWITTER_PASSWORD -d status="`echo $HASH| cut -b1-128`" http://twitter.com/statuses/update.json

The database dumps here are limited to the mw_page, mw_revision, and mw_text tables to conserve disk space.


Advantages of TwitterStamp

  • Automatic. New documents and changes to documents are automatically timestamped.
  • Public or Private. TwitterStamp can be used on public web sites or company intranet sites.
  • No Incremental Costs. Once installed, there are no per-timestamp fees.
  • Open Source. Easily adapted to other databases (Sales, accounting, ERP, etc)
  • Easy Distribution. Timestamps can easily be incorporated into other databases and applications.


See Also


This is a work-in-progress.

Software described on this page is Copyright 2009 Glenn Powers and licensed under the GPL v3

Personal tools