trailofbits / trailofbits/break-golf

verify: spoc128

Open
#2 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Challenge: spoc128
Budget (queries): 3
Advantage: 1/1
Claimed score: 1.58 bits

Notes: none

Solve.lean
/-
A submission that verifies and wins nothing.

The null adversary: ask no questions, always answer "ideal". Its signed advantage
is exactly 0, so `Wins budget 0` is *true* and provable, the file elaborates
cleanly, and `#print axioms` reports only propext, Classical.choice, Quot.sound.

It is still worth nothing. score = log2(budget / advantage^e) is infinite at
advantage 0: an attack that refutes 0 bits of security refutes nothing. The board
rejects the submission form for it (`non_positive`) rather than the Lean.

Use this to test the honest-but-worthless path: a real proof of a real statement
that is not a break.
-/
import Golf.Challenges.SpoC128DS.Challenge

namespace Solution.SpoC128DS

open RandomSystems.CR18
open RandomSystems.Golf.Instances.SpoC128DS

def solution : Challenge.SpoC128DS.Solution where
  strategy := fun _ _ => none
  verdict := fun _ => false
  wins := by
    have h : Challenge.SpoC128DS.score.advantage = 0 := by
      simp [Golf.Score.advantage, Challenge.SpoC128DS.score]
    rw [h]
    exact Golf.Attack.wins_zero_of_reject _ _ (fun _ _ _ => rfl)

end Solution.SpoC128DS

Opened from the break golf board. The verifier builds its own copy of
Challenge.lean; the declarations above are checked against the types pinned
there, then #print axioms is compared with the challenge's permitted list.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Golf.Challenges.SpoC128DS.Challenge and the imported challenge definitions referenced by Solve.lean. Check how the verifier pins the solution types and permitted axioms, then determine the requested board outcome; the issue does not specify a code change beyond presenting a verifying submission.

Written by the indexing model from the issue text.

Assessment

Domain
cryptography
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.