Bitcoin FE Covenants Move Spending Rules Into Restricted Signing Keys
Functional encryption offers a striking way to enforce Bitcoin spending rules without changing the network’s consensus code: make the signing key produce valid signatures only for transactions that meet a chosen policy. The appeal is clear. Bitcoin nodes would continue checking signatures with OP_CHECKSIG, while the restriction would live in the cryptographic machinery used to create them. The obstacle is equally clear: the cryptography needed for this design remains far beyond practical use.
A covenant hidden inside signature generation
Jeremy Rubin, who originally proposed OP_CTV in BIP-119, described this approach in his May 2024 paper FE’d Up Covenants. Its central move is to place covenant logic in a functional encryption key rather than add new behavior to Bitcoin Script. Since Bitcoin’s base layer changes require coordination across node operators, miners, developers and economic actors, a scheme that works with existing signature checks has obvious appeal.
In conventional public-key cryptography, possession of a private key lets its holder sign messages. Under the proposed functional encryption model, a specially issued key would instead perform a limited computation on encrypted data. For a Bitcoin covenant, that computation is signing: the functional key would generate a signature only when the proposed transaction satisfies the encoded spending condition.
Functional encryption, or FE, generalizes the idea of decrypting information. A master secret can issue keys tied to particular functions. Given an encrypted value x and a key for function f, a holder can learn f(x) without recovering x itself. The system’s promise is controlled computation over encrypted inputs; applying that promise to Bitcoin means allowing a signing operation while keeping the underlying secret key concealed.
FE was formalized in academic work by Dan Boneh, Amit Sahai and Brent Waters in 2011. General-purpose constructions followed from 2013, but their computing demands were far beyond practical limits and their security relied on multilinear maps, a new and untested cryptographic building block. Constructions based on more established assumptions appeared in 2021, opening a theoretical route toward implementation without making Bitcoin-scale use feasible.
How the signing design would work
The function in Rubin’s scheme takes a private key and a transaction as inputs. A covenant limited to one spending transaction, similar in scope to OP_CTV, can be described with those two inputs. A more expressive version adds a program and a proof, written as f(k, tx, program, proof), so that the spending condition can be supplied and checked when coins are spent.
The function doesn’t sign with the supplied key directly. It derives a separate key pair by tweaking the original key with a hash of the spending policy. The resulting signature matches the tweaked public key, while the original public key remains distinct. That separation is what ties the signature to a particular covenant: a transaction that violates one policy could at most produce a signature associated with another tweaked key, which wouldn’t authorize spending the funds held under the intended address.
Creating the system requires a setup authority. It generates a Bitcoin key pair, consisting of private key k and public key P, along with an FE master secret and public key. The authority publishes P, the FE public key, an encrypted form of k, and a functional key derived from the master secret. It must then destroy both k and the master secret. If it retained either secret, it could create spends that bypass the covenant.
Once setup is complete, new policies can be built by tweaking the key pair with each policy’s hash. Anyone who knows the policy can derive its corresponding public key from P and create a receiving address. In practice, that address would commit to a 2-of-2 script: one signature comes from a key controlled by the user, and the other from the FE process. Requiring the user’s signature prevents someone else from triggering a spend merely because the transaction satisfies the covenant.
To spend the coins, a signer encrypts a transaction that follows the policy under the FE public key. The signer combines that encrypted transaction with the encrypted private key and the functional key, then evaluates f to produce the signature. The function could also reject transactions that fail the policy outright. Bitcoin nodes would see a signature for the relevant tweaked public key and validate it through their existing OP_CHECKSIG behavior.
Proofs expand the policy, but not the practical limits
The more general design uses a program to test a condition on the transaction and a zero-knowledge proof that the program accepts. The proof changes the computational burden inside f: without it, f would need to interpret and execute arbitrary programs over transactions, making the FE computation large and costly. With a succinct proof, f only needs to verify that the claimed condition holds.
This structure could let a spending rule depend on information outside the transaction, including the output of an off-chain computation. That makes the design more expressive than a covenant limited to a fixed transaction template. But a compact proof doesn’t remove the fundamental FE challenge; it only gives the scheme a more efficient way to express and check policies if the underlying cryptography becomes workable.
The required primitive is especially demanding. Multi-input FE, introduced by Goldwasser and colleagues in 2014, was built on indistinguishability obfuscation, and the two concepts are closely connected. Later work showed that even compact single-input FE for general circuits can imply obfuscation. In practical terms, a Bitcoin implementation would depend on cryptography at least as difficult to construct as indistinguishability obfuscation.
Existing demonstrations are still at toy scale. In a 2017 experiment, Carmer, Malozemoff and Raykova spent 3.7 hours obfuscating a 12-bit pseudorandom function with about 62,000 gates and a 64-bit key. The resulting program occupied 120 GB, and evaluating it took 67 minutes on a machine with 128 GB of RAM. ECDSA signing over 256-bit numbers, which Bitcoin requires, is a much larger target. The researchers described their result as “still far from practical.”
There’s also a mismatch between the FE schemes that can be built efficiently today and the task this covenant needs. Practical constructions cover narrow functions, such as inner products, rather than ECDSA signing. Rubin’s proposal acknowledges both the immature state of the cryptography and the need to trust the setup authority to destroy its secrets.
What the tradeoff means for Bitcoin
FE covenants offer a way to shift spending restrictions from consensus rules into the machinery that produces signatures. That could avoid a soft fork and leave node verification unchanged, but the signer would bear the enormous cost of the FE computation. The design’s current weaknesses—unavailable performance, a trusted setup and a cryptographic function outside the range of practical FE schemes—make that tradeoff theoretical for now.
By comparison, a CTV-style opcode would require a base-layer change but would be far more efficient in transaction data and verification. The engineering choice is therefore stark: pursue a consensus change with much lighter cryptographic costs, or wait for major advances in FE before a signing-key approach can support real Bitcoin transactions. For the near term, FE is useful as a design boundary: it shows how much covenant behavior can be moved into signatures, and how far the necessary cryptography still has to travel.
Related proposals explore other routes. Rubin’s Un-FE’d Covenants replaces functional encryption with oracle signers bonded through BitVM. [alloc]init’s Bitcoin PIPEs began as an FE design in 2024 and shifted to witness encryption in 2026. These approaches reflect an active search for covenant behavior that can work within Bitcoin’s existing rules, even as the original FE route remains beyond practical reach.