Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- The holder verifier rejects a bundle whose reply token list is empty as an invalid receipt (exit 10). No receipt commits to an empty reply, so such a bundle is not an incomplete reply (exit 13). [Exit codes](verifier/README.md)
- Rename the project to Akashi. The repository moved to `Lucid-Computing/akashi`. The CLI is now `akashi`, the wheel `akashi-verify`, the environment prefix `AKASHI_`, and the service units and paths `akashi*`. Protocol domains, the `x-akashi-receipt` header, `/.well-known/akashi.json` and the `akashi-pickup/1` envelope replace their `vig` forms. Receipts, pickups and verdicts made under the old domains no longer verify, and the reference vectors were regenerated. [Data model](docs/spec/03-data-model.md)
- Document the recorded Maverick request and both offline CLI verdicts with exact measurement boundaries and machine-readable evidence. [Recorded demo](docs/demo/README.md)
- Give contributors a CPU quickstart and issue forms that direct vulnerability reports to the private security channel. [Quickstart](README.md#try-it) · [Security reporting](SECURITY.md)
Expand Down
10 changes: 10 additions & 0 deletions tests/test_holder.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ def test_wrong_original_budget_display_or_identity(self) -> None:
self.assertEqual(verify(self.bundle((2,)), self.trusted).exit_code, 13)
self.assertEqual(verify(self.bundle((200001, 3)), self.trusted).exit_code, 13)

def test_empty_reply_cannot_match_a_signed_transcript(self) -> None:
# A receipt never commits to an empty reply, so an emptied copy is invalid
# evidence, not an incomplete reply, whatever else the bundle carries.
bundle = self.bundle()
bundle["verification"]["reply_token_ids"] = []
self.assertEqual(verify(bundle, self.trusted, now=self.now).exit_code, 10)
del bundle["history"]
bundle["text"] = "anything"
self.assertEqual(verify(bundle, self.trusted, now=self.now).exit_code, 10)

def test_checkpoint_and_inclusion_are_independent(self) -> None:
first = self.bundle()
old = first["history"]["sth"]
Expand Down
2 changes: 0 additions & 2 deletions verifier/holder.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ def verify(
if prompt != raw_ids(verification["prompt_token_ids"]):
return result
result = VerificationResult(10, "RECEIPT_INVALID")
if verification["reply_token_ids"] == []:
return VerificationResult(13, "INCOMPLETE")
reply = raw_ids(verification["reply_token_ids"])
if receipt["transcript_commitment"] != transcript_commitment(
COMMITMENT, profile, budget, receipt["salt"], prompt, reply
Expand Down