This documents the state machine operation triggered at the selected commit time. This is the low-level documentation. For a higher-level overview, see ServerOperation.md.
This is implemented in commit.py.
Ensure the existence of a master branch and a file pubkey.asc
in the repository.
At the start of the minute determined by commit-at, the following
operations are performed:
- If a file
hashes.logexists, the previous commit cycle did not complete (e.g., because receiving email from the PGP Timestamper timed out): Then create a intermediate (self-signed) commit, so that no commit hash is lost (see sections 4ff.) and then continue here. - If a file
hashes.workexists in the repository, it is renamed tohashes.logsuch that any upcoming requests will start a newhashes.workfor the next cycle. - A short wait (0.1 s) is introduced to ensure that the file contents have settled (i.e., parallel log operations have completed)
If a file hashes.work exists, the mail-address configuration
variable exists (i.e., mail should be sent to the PGP Timestamper) and
no file hashes.mail exists, the following operations are performed:
- Delete
hashes.asc. - Copy
hashes.logtohashes.mail. - Append a blank line to
hashes.mail. - Also append a line
Parent: <commit id>(with the current commit ID of the master branch, i.e., parent of the commit we are just creating) - Send email to the PGP Timestamper.
If a file hashes.mail exists, try to receive a new stamped mail message
for up to 15 minutes.
- If a new message is here, verify that it actually is the message
stamping
hashes.mail. (See ServerOperation.md.) - Write that mail down as
hashes.asc. - Add it to the repository (
git add). - Delete
hashes.mail.
If hashes.log exists and
-
mail-addressis not defined (no PGP Timestamping should occur), -
hashes.ascexists (PGP Timestamping was successful), -
hashes.maildoes not exist at all, or -
15 minutes have passed since
hashes.mailwas created, then perform the following operations: -
Add
hashes.logto the repository (git add), potentially joininghashes.ascthere. -
Create a new signed commit
After completion of section 4 above, perform the following operations:
- Obtain the upstream
zeitgittertimestamps.
After completion of section 5 above, perform the following operations:
- Push the repository to a public repository. You will likely want to
include the
masterand all timestamping branches in this push.
If for some reason steps 2, 3, 5 or 6 fail, they will be included in
the next cycle. Step 6 will push the previous entries while steps 2/3
and 5 will confirm the previous operations thanks to the git hash
chain.
The security implications of not having any independent
certifications in a given cycle will be that a cheating zeitgitter server
will have two periods to backdate timestamps.
However, we assume that the timestampers are in principle trustworthy and the mutual certifications are only needed to allow public audit of that trustworthiness. Therefore, the larger window is not an issue for most applications.