zkSecurity Opens zkGolf Contest to Shrink Midnight's SHA-256 Circuit
zkSecurity has added a Midnight Network challenge to zkGolf, tasking human and AI entrants with shrinking Midnight's SHA-256 circuit, with every submission judged by Lean 4 machine-checked proofs.

Outputs
zkSecurity added a Midnight Network challenge to zkGolf on December 1, per the Midnight Foundation
Every submission must pass a Lean 4 proof check; both humans and AI agents may enter
zkSecurity's clean-midnight repository documents formal verification of Midnight's Halo2 SHA-256 preimage circuit
Lean proofs cover soundness and completeness for every 24-byte message; the verifying key matches the Rust-derived one
Midnight's SHA-256 circuit is the contest baseline; only cost reductions that pass the Lean check count
zkSecurity has added a challenge built on Midnight Network code to zkGolf, its contest for optimising zero-knowledge circuits, the Midnight Foundation announced in a December 1 post on X. The task targets Midnight's SHA-256 circuit, the component that underpins proofs demonstrating a statement is true without exposing the underlying data.
The rules are strict by construction. zkSecurity describes zkGolf as a platform to "golf zero-knowledge circuits" that are verified in Lean. Every submission, whether written by a human developer or an AI agent, must pass a check in Lean 4, a proof assistant that mathematically confirms the code is correct. A cheaper design only counts if it still does exactly the same job.
What has already been proven?
Separately from the contest, zkSecurity has published formal verification work on Midnight's proving stack. The company's public clean-midnight repository documents formal verification of Midnight's Halo2 circuits, including a SHA-256 preimage circuit. The stakes are concrete: a wrong circuit could accept false statements, so machine-checked soundness is the operational safeguard here.
According to the repository, the Lean proofs cover soundness, meaning the circuit's public output is the SHA-256 hash of the message. They also cover completeness for every 24-byte message. One caveat deserves attention: completeness is established for 24-byte messages specifically, and the repository does not state broader message lengths were verified. That is a narrower guarantee than a casual reader might assume.
The repository also reports that the verifying key derived in Lean matches the one derived in Rust. That cross-implementation match matters operationally, because Midnight's production stack runs on Rust while the proofs live in Lean; a mismatch between the two would make the formal guarantee theoretical rather than practical. zkSecurity claims they align, though the claim rests on the repository's own documentation rather than an independent audit.
What does the contest actually require?
The Midnight Foundation says Midnight's SHA-256 circuit serves as the baseline. Entrants must reduce the circuit's cost, in computational terms, while preserving identical behaviour. The Lean check is the arbiter: an optimisation that alters what the circuit proves fails the submission, regardless of how cheap it becomes.
The contest format signals a broader shift in how zero-knowledge infrastructure is audited. Instead of relying solely on manual review, zkSecurity routes correctness through a proof assistant, and it opens participation to AI agents as well as human developers. Whether machine-generated submissions can match the rigour of hand-written circuits remains unproven; the contest itself will supply the first evidence.
For Midnight, cheaper circuits translate directly into lower proof-generation costs for applications built on the network. The foundation has not quantified the expected savings, so any estimate of the payoff is premature.
The contest is open now, with submissions judged automatically by the Lean 4 verifier as they arrive. Whether optimisations of this kind reach Midnight's production circuits depends on follow-up integration work that neither party has yet detailed.
In plain terms: a security firm has invited the public to make Midnight's cryptography cheaper, and a machine-checked proof, not a reviewer's judgement, will decide who succeeds.
via cryptonews.net (Source)
More from Elena Vasquez
Show full bio
Staff writer covering regulation, policy and their impact on crypto and web3 industry at Mempool Brief.
2,099 articles