PHP RFC3161 Timestamp Toolkit

This toolkit provides classes and methods for accessing DigiStamp's Timestamp Servers with the PHP programming language.

  • All crytpography is performed with OpenSSL.
  • The class TrustedTimestamps was written by David Müller and slightly modified by us
  • The toolkit is packaged as an example implementation allowing users to upload files for timestamping
  • Retriever.php, and its dependency TrustedTimestamps.php, can be used independently

Before you get started:

You will need either a paid account, or a free evaluation account.

 

Dependencies:

  1. PHP, we have not tested with versions before 5.4
  2. OpenSSL version 1.0+
  3. cURL for PHP

Tasks:

  1. Set your Acct Number and Password in Retreiver.php on line 21
  2. If you are using test TSAs, perform the following global replacements in Retriever.php:
    1. www with supporttest on line 35
    2. tsa1 with tsatest1 on line 35
    3. tsa2 with tsatest2 on line 35
    4. com.digistamp.bundle.pem with com.digistamp.bundle.test.pem on line 24
    5. https:// with http:// on line 21
  3. If you are using the provided HTML interface:
    1. Set your allowed file extensions in UploadFile.php at line 23
    2. Create subdirectory timestampedFiles/
    3. Grant the webserver write permission for the directory timestampedFiles/
  4. You may need to download the latest copy of DigiStamp Root CA certificate com.digistamp.bundle.pem or com.digistamp.bundle.with.legacy.pem
    Details: The public key used to verify the digital signature is normally bundled in the timestamp file. The missing part is the "Root CA" certificate. We use the Root CA certificate to tell OpenSSL to trust timestamp certificates from DigiStamp. This download is commonly done just one time.

       
Please let us know if you have questions or concerns: support@digistamp.com