---
source: https://iinventedlight.com/library/notes/praxis-witness-encryption-np.md
title: "Praxis: practical witness encryption for NP, with Lean proofs"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Praxis: Practical Witness Encryption for NP, arXiv:2611.28552); Apache-2.0 (psivesely/praxis-lean README)"
attribution: "Summary by iinventedlight (AI-assisted). Sources: arXiv:2611.28552; praxis-lean README."
author: "iinventedlight (AI-assisted)"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Lean build not run and no ciphertext generated (2026-11-24); paper and README claims only."
category: ai-research
topic_area: "ai-research: Praxis witness encryption for NP"
tags: ["witness-encryption", "cryptography", "groth16", "lean"]
client: Librarian
sources:
  - id: S1
    title: "Praxis: Practical Witness Encryption for NP"
    publisher: "arXiv (Tse, Vanjani, Vesely)"
    url: https://arxiv.org/abs/2611.28552
    accessed: 2026-11-24
    license: "CC-BY-4.0"
  - id: S2
    title: "praxis-lean (repository README)"
    publisher: "psivesely on GitHub"
    url: https://github.com/psivesely/praxis-lean
    accessed: 2026-11-24
    license: "Apache-2.0"
---
# Praxis: practical witness encryption for NP
**Answer:** Witness encryption encrypts a message to an NP statement; whoever holds a witness for the statement can decrypt. Praxis, by David Tse, Nikhil Vanjani and Psi Vesely (Byzantine Research and Stanford University; arXiv:2611.28552, submitted 21 November 2026), is a scheme for all of NP with costs the authors call practical. They prove it extractable in the bilinear generic group and random oracle models under Module-SIS.

## Concrete costs (the paper's instantiation)

- Praxis encrypts to a Groth16 verifier on BN254, set up honestly; that one verifier serves every NP relation at the same cost.
- At 100-bit security the ciphertext is 7.88 GiB.
- Encryption takes 2^34.2 base-field multiplications; decryption with a Groth16 proof takes 2^33.0 on average.
- Against Hair and Sahai's constructions, for the same Groth16 statement and 100-bit security, the ciphertext size and encryption cost fall by over ten orders of magnitude, and decryption by over six.

## How it works (one line each)

- It starts from the rank-gap template of Hair and Sahai, but fixes the gap instead of raising it.
- Decryption therefore ends with a search that is exponential but concretely fast: O(2^(λ/4) N^(1/4)) expected operations for N Boolean unknowns at λ-bit security.
- A quadratic arithmetic program makes the hidden matrix low rank, so the ciphertext holds factors of width two, which a pairing multiplies.

## What the Lean proofs cover

- Lean 4 proofs of correctness and extraction at the instantiation's parameters.
- The development builds with Lean v4.33.1 and Mathlib v4.33.1, has no sorry, and each theorem uses only propext, Classical.choice and Quot.sound.
- Messages and seeds have 256 bits in Lean and 100 in Table 4.
- Left to the paper: both theorems at other parameters.
- Left to the paper: the reductions' running time, since Lean counts only an adversary's oracle calls.
- Faithfulness of the definitions is checked by reading, as for every formalization.

## How to build it

```sh
lake exe cache get && lake build
```

## Caveat

The setup of the Groth16 verifier must be honest.

## See also

- [lean-proof-checking](https://iinventedlight.com/library/notes/lean-proof-checking/)
- [post-quantum-cryptography](https://iinventedlight.com/library/notes/post-quantum-cryptography/)

## Claims

- id: C1
  claim: Whoever holds a witness can decrypt.
  source: S1
  evidence: "whoever holds a witness can decrypt"

- id: C2
  claim: The authors give Lean 4 proofs of correctness and extraction.
  source: S1
  evidence: "We give Lean 4 proofs of correctness and extraction"

- id: C3
  claim: Messages and seeds are 256 bits in Lean, 100 in Table 4.
  source: S2
  evidence: "messages and seeds have 256 bits in Lean and 100 in Table 4"

- id: C4
  claim: Section 6.4 of the paper describes the Lean formalization.
  source: S2
  evidence: "Section 6.4 of the paper describes the formalization."

## Sources

- [S1] https://arxiv.org/abs/2611.28552 (CC-BY-4.0)
- [S2] https://github.com/psivesely/praxis-lean (Apache-2.0)

License: CC BY 4.0. Summary by iinventedlight (AI-assisted).

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
