|
| 1 | +# Public timestamping and proof of existence |
| 2 | + |
| 3 | +This repository includes an automated workflow that creates OpenTimestamps proofs for commits and releases. Below are recommended steps and background to create stronger, verifiable timestamps for your work. |
| 4 | + |
| 5 | +## Why GitHub timestamps alone are not always sufficient |
| 6 | +- Git commit metadata includes author and committer dates, which can be changed locally before pushing. |
| 7 | +- GitHub release publish times are recorded by GitHub servers and are more trustworthy than local commit dates. |
| 8 | +- For cryptographic, tamper-evident proof, combine signed commits/tags with an external timestamping system such as OpenTimestamps or a commercial TSA (RFC3161). |
| 9 | + |
| 10 | +## Recommended practice |
| 11 | +1. Create GPG-signed commits or tags |
| 12 | + - Configure GPG and git (example): |
| 13 | + - `git config user.signingkey <your-key-id>` |
| 14 | + - `git config commit.gpgsign true` |
| 15 | + - `git commit -S -m "Your signed commit message"` |
| 16 | + - For signed tags: |
| 17 | + - `git tag -s v1.0.0 -m "Release version 1.0.0"` |
| 18 | + |
| 19 | +2. Use GitHub Releases for major milestones |
| 20 | + - Tag and sign a release version: |
| 21 | + - `git tag -s v1.0.0 -m "Release 1.0.0"` |
| 22 | + - `git push origin v1.0.0` |
| 23 | + - Create a GitHub Release from the tag with release notes. |
| 24 | + - The workflow will automatically stamp the release commit. |
| 25 | + |
| 26 | +3. Manual OTS stamping (optional, for extra verification) |
| 27 | + - Export a commit SHA to a file: |
| 28 | + - `git rev-parse HEAD > sha.txt` |
| 29 | + - `ots stamp sha.txt` |
| 30 | + - Keep `sha.txt` and `sha.txt.ots` together as your proof. |
| 31 | + |
| 32 | +4. Verifying an OTS proof |
| 33 | + - Install the OpenTimestamps client and run: |
| 34 | + - `ots verify sha.txt` |
| 35 | + - The proof will show that the SHA existed at or before the anchored blockchain time. |
| 36 | + |
| 37 | +## Automation in this repo |
| 38 | +- The workflow `.github/workflows/ots-stamp.yml` stamps the commit SHA on push and publishes the proof as an artifact named `ots-proof-<commit-sha>`. |
| 39 | +- To download the proof: |
| 40 | + 1. Go to the GitHub Actions tab |
| 41 | + 2. Click on the workflow run for your commit |
| 42 | + 3. Download the artifact from the artifacts section |
| 43 | + 4. Extract and verify with `ots verify commit-sha.txt` |
| 44 | + |
| 45 | +## More information |
| 46 | +- OpenTimestamps documentation: https://opentimestamps.org |
| 47 | +- GPG signing guide: https://docs.github.com/en/authentication/managing-commit-signature-verification |
| 48 | +- RFC3161 timestamping: https://www.ietf.org/rfc/rfc3161.txt |
0 commit comments