Skip to main content

File Reference

This page gives the content of each file that the commands write. The directory names are the names that the procedures use. audit-tally writes the same files of each command in the directories of Files of audit-tally.

Common rules​

  • The files are JSON, except configuration.borsh. A JSON object that has format_version uses version 1.
  • A message is the original signed bytes of a bulletin board or electoral log record, encoded in base64 without padding. The commands check the signature of each message. Do not change a message.
  • Personal data in the tables shows if the file contains voter IDs, hashed voter identifiers, user names or receipts. Keep these files private. See Report and Remove the Copies.
  • Fields of the limitations, limits, limitation and assurance types are text. They tell what the command did not check. Copy them into the audit report.
WARNING

Do not edit a file and then use it again. A change of one byte changes its digest, and the next command stops with a digest mismatch.

Files of the audit image (backups and output)​

The audit image reads the backups directory at /backups and writes to the output directory at /output. The procedures use ~/audit/backups and ~/audit/output:

~/audit/
├── audit-notes.txt you write it
├── backups/ read only for the audit
│ ├── backup-digests.txt you write it
│ ├── hasura.dump, keycloak.dump, b3.dump, immudb.tar.gz
│ └── b3-blobs.tar.gz only for a board that stores messages in files
└── output/ must be empty before the audit
├── restore/ the messages of the restore
└── the files of audit-tally
File in output/restoreContentPersonal data
restore-hasura.log, restore-keycloak.log, restore-b3.logThe messages of pg_restore for each copy.No
postgres-init.log, immudb.log, b3-server.logThe messages of the database servers of the copies. b3-server.log shows the password of the PostgreSQL copy, which the container removed.No

The copies are inside the container. Docker removes them when the command stops. The files of output belong to the owner of backup-digests.txt.

Files of audit-tally (tally)​

audit-tally writes all files of the audit in its output directory. With the audit image, it is ~/audit/output:

tally/
├── tally-plan.json
├── immudb-export/ only without --electoral-log-export
├── scopes/
│ ├── 001/
│ │ ├── scope.json
│ │ ├── postgres-export/
│ │ ├── prepared-audit/
│ │ └── audit-report.json
│ └── 002/ ...
├── history/
│ └── <election ID>.json
├── braid/
│ └── verify.log
├── audit-record.json
└── public-summary.json
File or directoryContentPersonal data
tally-plan.jsonThe scopes that the command made from the tally. See tally-plan.json.No
immudb-export/The files of export-electoral-log. See Files of export-electoral-log.Yes
scopes/<NNN>/scope.jsonThe scope of an election and area, with one contest or all contests for combined ballot formats. See scope.json.No
scopes/<NNN>/postgres-export/The files of export-ballot-audit for the scope.Yes
scopes/<NNN>/prepared-audit/The audit bundle of the scope.Yes
scopes/<NNN>/audit-report.jsonThe report of ballot-audit for the scope.Yes
history/<election ID>.jsonThe report of audit-cast-history for one election.Yes
braid/verify.logThe output of the Braid verifier.No
audit-record.jsonThe record of the audit. See audit-record.json.No
public-summary.jsonThe summary that you can publish. See public-summary.json.No

The scopes are numbered from 001, in the order of election, area and contest.

tally-plan.json​

FieldContent
tenant_id, election_event_id, tally_session_idThe tally.
board_nameThe name of the event board.
policyunweighted, weighted or delegated, from the configuration of the tally.
scopes[]One object for each scope: directory, election_id, area_id, contest_id, tally_session_contest_id, base_batch, batches and scope_sha512, the digest of its scope.json.
tally_batchesAll batches of the scopes.
board_ballot_batchesAll batches with Ballots statements on the board.
hasura_snapshot, b3_snapshotThe database, the restore reference, the time of the read and the read-only settings of each read.

audit-record.json​

FieldContent
source_revisionThe source code revision of the command.
started_at, finished_atThe time of the start and of the end of the audit.
inputsThe tally ID, the two keys, the restore reference of each copy, and the addresses and directories that you gave.
tally_plan, public_summaryThe digest (sha512) and the size (bytes) of tally-plan.json and of public-summary.json.
statusThe status of the full audit. See Read the Results.
steps[]One object for each step. See the table below.
braid_batchesThe batches that the command gave to the Braid verifier.
limitationsText. What the audit does not prove.

Each object of steps has these fields:

FieldContent
stepThe command: export-electoral-log, export-ballot-audit, prepare-ballot-audit, ballot-audit, audit-cast-history or verify.
scopeThe directory of the scope, for example scopes/001. Only for the steps of a scope.
election_idThe election. Only for audit-cast-history.
commandThe command line. Paths in the output directory are relative to it. Empty if the step did not run.
exit_codeThe exit status of the command. null if the command did not start or did not run.
statusThe status of the step.
outputsThe digest of each file that the step wrote, by path.
messageThe messages of the command, or the cause of not_run. Only if there is a message.
note

audit-record.json contains the digests of all files of the audit. Record its digest in the audit notes.

public-summary.json​

The summary contains only IDs of the tally, the board name, statuses, counts and batch numbers. The command removes all text from the selection counts. The summary contains no voter IDs, no receipts and no batch positions.

FieldContent
source_revisionThe source code revision of the command.
tenant_id, election_event_id, tally_session_id, policyThe tally.
statusThe status of the full audit.
scopes[]For each scope: election_id, area_id, contest_id, batches, status, checked_cast_votes, checked_batches, checked_electoral_log_messages, the number of duplicate_selected_receipts and of privacy_warnings, and selection_accounting, the counts of the selection.
cast_vote_history[]For each election: election_id, status, outcome, checked_hasura_rows, checked_signed_cast_vote_log_records, signed_log_records_without_hasura_row and hasura_rows_without_signed_log.
braidThe status of the Braid verifier, the board_name, tally_batches and board_ballot_batches.

A count is null when its step did not run.

Files of export-ballot-audit (postgres-export)​

FileContentPersonal data
scope.jsonAn exact copy of the scope file that you gave.No
cast-votes.jsonAll stored ballots of the area, with all statuses and all revotes, oldest first. One object for each row of the cast_vote table.Yes
cast-vote-history.jsonAll stored ballots of the election in all areas, oldest first. Same format as cast-votes.json.Yes
eligible-voters.jsonThe frozen list of voters that can vote in the area. See eligible-voters.json.Yes
eligibility-reasons.jsonFor each user of the area, if the user can vote and why. See eligibility-reasons.json.Yes
keycloak-source.jsonThe Keycloak data that the list of voters comes from: the realm, the users of the area with their attributes, and the delegations.Yes
board-messages.jsonA list of messages: the configuration, the public key and the Ballots statements of the scope.No
board-source.jsonThe board index row (index), one object for each message with its ID, sender, kind, batch, mix number and digest (rows), and the count check of the board (index_count).No
saved-mapping.jsonThe saved records of the tally: election_event, election, tally_session, tally_session_contest, tally_session_executions and keys_ceremony.No
acquisition.jsonThe record of the export. See acquisition.json.No

Fields of a stored ballot​

cast-votes.json and cast-vote-history.json contain all columns of the cast_vote table. The audit uses these fields:

FieldContent
idThe ID of the stored ballot. The reports call it cast_vote_id.
tenant_id, election_event_id, election_id, area_idThe place of the ballot.
voter_id_stringThe voter ID.
ballot_idThe receipt: the first half of the SHA-512 ballot hash.
contentThe encrypted ballot, as text.
statusThe status of the row, for example valid or discarded.
created_atThe time that the platform stored the ballot.
annotationsOther data of the row, for example voting_channel.

eligible-voters.json​

FieldContent
format_version1
scope_sha512The pin of the scope file.
voters[].voter_idThe voter ID.
voters[].multiplicityThe number of votes that the ballot of this voter counts for: 1, the vote weight, or 1 plus the number of delegations.

eligibility-reasons.json​

FieldContent
source_usersThe number of users of the area.
eligible_usersThe number of voters in eligible-voters.json.
reason_countsThe number of users for each reason. A user can have more than one reason.
decisions[]One object for each user: voter_id, eligible, reasons and multiplicity. A reason is eligible, not_enabled, election_not_authorized or service_account.
delegation_diagnosticsOnly for the policy delegated: delegations from other realms and from users that are not enabled.

acquisition.json​

FieldContent
source_revisionThe source code revision of the command.
statuspostgres_exports_complete_electoral_log_required: the next step is the electoral log export.
filesThe size (bytes) and the digest (sha512) of each file of the directory.
snapshotsFor each copy (hasura, keycloak, b3): the database, the restore reference from connections.json, the time of the read, and the read-only settings.
countsThe number of stored ballots in the area and in the election, of eligible voters and of board messages.
board_index_countThe count of messages that the board index stores, compared with the count that the export found. A difference is not a finding.
cast_vote_history_scopeThe filter of cast-vote-history.json: all areas, all statuses, all revotes.
statement_timeout_secondsThe time limit of each query.
limitationsText. What the export does not prove.
note

The digests in acquisition.json come from the same command that made the files. They show that the files did not change after the export. They do not replace the pins in the audit notes.

Files of export-electoral-log (immudb-export)​

FileContentPersonal data
electoral-log.jsonA list of messages: the signed CastVote records of the election event.Yes
electoral-log-provenance.jsonThe record of the export.No

electoral-log-provenance.json has these fields:

FieldContent
sourcelocal_restored_immudb
databaseThe database that the command read.
read_only_transactiontrue
filterThe statement kind (CastVote), the election event and, if you gave it, the election.
message_countThe number of messages in electoral-log.json.
other_event_messages_excludedThe number of records of other election events that the command left out.
electoral_log_sha512The digest of electoral-log.json.
limitsText. What the export does not prove.

Files of prepare-ballot-audit (prepared-audit)​

FileContentPersonal data
manifest.jsonThe scope, the batches and the selected ballots. See manifest.json.Yes
configuration.borshThe signed configuration of the bulletin board, in binary form.No
cast-votes.jsonThe selected ballots. Each object has voter_id, voting_channel, cast_vote_id, ballot_id and content.Yes
messages.jsonA list of messages: the Ballots statements of the scope.No
electoral-log.jsonA list of messages: the signed records of the selected ballots only.Yes
anchors.jsonThe digests of manifest.json and configuration.borsh, calculated by the same command.No
provenance.jsonThe record of the preparation. See provenance.json.No
selection.jsonThe decision for each stored ballot of the area. See selection.json.Yes
CAUTION

Do not use the digests in anchors.json as pins. The same command wrote them. A changed bundle can contain changed anchors.

manifest.json​

FieldContent
scopeThe scope, the same as scope.scope in scope.json.
batchesThe batches of the scope.
selected[].cast_vote_idThe ID of the stored ballot.
selected[].ballot_idThe receipt.
selected[].content_sha512The digest of the encrypted ballot.
selected[].electoral_log_message_sha512The digest of the signed record of this ballot in the electoral log.
selected[].multiplicityThe number of votes that this ballot counts for.

provenance.json​

FieldContent
source_sha512The pins that you gave for each input file.
anchorsThe same digests as anchors.json.
selection_accountingThe counts of the selection. The same as accounting in selection.json.
tally_annotationsThe comparison with the saved tally. status is checked with the values, not_supplied if you did not give --saved-mapping, or annotations_absent if the saved tally has no annotations.
cast_vote_historyThe history checks. status is checked with the counts, or skipped if you gave --without-cast-vote-history.
board_public_keyThe check of the public key hash of the scope against the bulletin board. status is matched with the number of signed statements, or not_on_board.
collapsed_identical_electoral_log_recordsThe number of identical signed records that the command counted once.
checked_cast_votes, checked_batches, checked_electoral_log_messagesThe numbers of checked items.
legacy_online_channel_inferencesThe number of signed records in the earlier format, without a voting channel. The command used the online channel for them.
limitationsText. What the preparation does not prove.

selection.json​

FieldContent
scope_sha512The pin of the scope file.
accountingThe counts: rows for each reason, eligible voters without a valid vote, selected input positions, exclusions and votes by channel.
rows[].cast_vote_idThe ID of the stored ballot.
rows[].ballot_idThe receipt, as stored. The command checked only the receipts of selected ballots.
rows[].reasonselected, superseded_revote, discarded, no_eligible_voter or outside_scope. See Read the Results.
rows[].latest_scoped_cast_vote_idFor a revote: the ID of the retained cast row for the same voter.
rows[].resolved_multiplicityThe number of votes of the voter, if the voter is in the frozen list.
rows[].receipt_verificationselected_audit_verified or not_checked.
limitationText. What the selection does not prove.

Reports​

ballot-audit and audit-cast-history write the report to the standard output. The procedures keep it in a file.

audit-report.json and lookup.json (ballot-audit)​

FieldContent
scopeThe scope of the bundle.
checked_cast_votes, checked_batches, checked_electoral_log_messagesThe numbers of checked items.
legacy_online_channel_inferencesThe number of signed records in the earlier format, without a voting channel.
receipts[]For each selected ballot: cast_vote_id, ballot_id and locations, the batch and the position of the ballot in the batch.
lookupOnly with --ballot-id. The outcome (selected, excluded, missing or ambiguous) and its details.
duplicate_selected_receipts[]Receipts that more than one selected ballot has. A value here is a finding.
privacy_warnings[]Weighted batches holding one to four ciphertexts: batch, ciphertexts and minimum_for_anonymity.
assuranceText. What the audit proves.
WARNING

The receipts list connects a receipt to a batch position. Do not publish it. In a small batch, the position can show how a person voted.

history-report.json (audit-cast-history)​

FieldContent
outcomeconsistent, contradicted, incomplete or ambiguous.
checked_hasura_rowsThe number of stored ballots that the command checked.
checked_signed_cast_vote_log_recordsThe number of signed records that the command checked.
ignored_other_log_recordsThe number of records of other elections.
signed_log_records_without_hasura_rowSigned records without a stored ballot. A value other than 0 is a finding.
hasura_rows_without_signed_logStored ballots without a signed record. This is incomplete evidence.
ambiguous_row_attribution_groups, ambiguous_log_occurrence_groupsThe numbers of ambiguous groups.
report_filtered, requested_receipt_foundOnly with --ballot-id: the report shows one receipt, and if the command found it.
receipts[]One group for each receipt: ballot_id, cast_vote_ids, the counts of signed records, and the classification. See Check the Cast-Vote History.
source_sha512The pins of the input files.
assuranceText. What the check proves.