I launched TimeCert a few years ago and haven’t given it much love since. Now I’m pleased to announce the official relaunch of it.
TimeCert is a really tiny and light web application that does one thing and does it well. It records and presents the time it first saw something. If you look at the bottom of this post you can see a small TimeCert iframe which tells you the first time timecert saw this article.
The main application of this is really for intellectual property protection. But there are also various other applications. Lets say you’ve been blogging about an idea for a while and all of a sudden someone hits you with a Patent Infringement Suit. You know it could happen. Well TimeCert provides evidence as a trusted third party that you actually wrote your blog posts when you did.
One thing to remember though is that TimeCert can’t back date any existing content. It only knows the first time it was presented with the data.
API
The API is so simple that it’s not even funny. First of all you need to create a SHA1 hex digest of the data you want timestamped. This is easy in most languages. In Ruby it’s:
require 'digest/sha1'
@digest=Digest::SHA1.hexdigest @your_data
Just perform a HTTP GET to TimeCert to one of the urls below changing DIGEST to the digest you created above:
- http://timecert.org/DIGEST for end user link
- http://timecert.org/DIGEST for use in an iframe
- http://timecert.org/DIGEST.time for a plain text file with ini style parameters
- http://timecert.org/DIGEST.ini for a plain text file with ini style parameters
- http://timecert.org/DIGEST.xml for xml
- http://timecert.org/DIGEST.yml for yaml
- http://timecert.org/DIGEST.yml for json
The easiest way to use it in a web application is to embed an iframe in your page like I’ve done here:
<iframe src="http://timecert.org/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.iframe" width="450px" height="30px"></iframe>
This saves you from manually doing a TimeCert request as the timestamp is created on the TimeCert server when the page is displayed the first time.
Best practices in Rails
To do this from Rails first create a digest method on your model:
def digest
Digest::SHA1.hexdigest("#{title}\n#{body}\n#{extended}")
end
Note this is from my blog, I’ve decided that the important content in a blog article is title, body and extended. I’m also using the raw textile data to create this. This is the safest as an update to a textile library could change the digest completely and thus create a newer timestamp.
You could also create a separate digest column and updated it an before_save. I’ll leave that task as an exercise to the reader.
Next create a helper method:
def timecert_link(article)
"<div class=\"timecert\"><iframe src=\"http://timecert.org/#{article.digest}.iframe\" width=\"450px\" height=\"30px\"></iframe></div>"
end
Now you can just include it in your views like this:
<%=timecert_link(article)%>
It would be great if someone with PHP/Python experience could create a similar example. I would expect it to be extremely simple to create a WordPress plugin to do this automatically, if someone is up to the challenge.
Open Source
This is not really a money making operation, it’s just a service that I feel is important to have. Therefore I’ve open sourced it and you can find it on GitHub. I think this is an important part of being trusted. This allows anyone with ruby knowledge to verify that I’m not doing anything strange. It also opens it up to potential competitors, which I’m absolutely cool about.
TimeCert is written in Ruby using Merb and DataMapper.