Bitcoin Covenants Part 6: FE Covenants — Enforcing covenants through cryptographically restricted signing keys

This is Part 6 in the technical article series about Bitcoin covenants by Cointelegraph Research. To read the previous article, click here.
Changing Bitcoin’s consensus rules is not merely a technical process. It requires that the network’s node operators, miners, developers and economic actors coordinate around a change. This coordination is difficult to achieve, which is why Bitcoin’s base layer has gradually ossified.
Researchers have spent the last several years investigating whether covenant behavior could be enforced without touching consensus rules. In May 2024, Jeremy Rubin, the original author of the OP_CTV proposal (BIP-119), offered an answer in a paper titled FE’d Up Covenants. His design proposed using functional encryption (FE) to move the covenant out of Bitcoin Script and into the signing key.
In ordinary public-key cryptography, a private key can sign any message. In hypothetical FE-based covenants, signing would be restricted to a predefined set of valid transactions. Bitcoin nodes would verify the signature with OP_CHECKSIG exactly as they do today, obviating the need for a soft fork.
Functional encryption: keys that only sign what the rules allow
Functional encryption (FE) generalizes public-key encryption. In ordinary cryptographic schemes, a private key can be used to fully decrypt a ciphertext and arrive at the plaintext. In FE, a master secret is instead used to issue subsidiary functional keys, each of which reveals only one chosen function of the plaintext. The holder of the functional key for a function f and the ciphertext of a secret x can compute f(x) but never gets to reveal x as a plaintext message.
In the academic literature, FE was first formalized by Dan Boneh, Amit Sahai and Brent Waters in 2011. Constructions for arbitrary functions followed from 2013, with polynomial runtime but overheads far beyond the resources of current computing technology. Furthermore, their security rested on new, untested building blocks called multilinear maps. Only in 2021 did researchers develop constructions from well-founded cryptographic assumptions, which could in principle open the door to practical implementations of FE.
The f in an FE scheme can be any feasibly computable function. However, in Bitcoin covenant constructions, f is a signing function. Its output is a Bitcoin signature for a transaction tx. Because this signature depends on both a private key and the transaction that is being signed, it takes at least two inputs, which is why Rubin’s design uses multi-input FE. For a covenant that only permits a single spending transaction, akin to OP_CTV, two inputs suffice. General, expressive constructions take more arguments, as in Rubin’s f(k, tx, program, proof).
Crucially, f does not sign directly with the private key k that is supplied in an encrypted form. Instead, the function derives a new key pair by tweaking k with a hash of the covenant’s spending policy. Signatures produced by f are valid for the tweaked public key, not for the base public key P itself.
Setting up FE-based covenants
To enable FE-based covenants from these primitives, a setup authority is required. It generates a Bitcoin key pair (the private key k and the public key P) as well as an FE key pair (the master secret msk and the FE public key mpk). It publishes P, mpk, k encrypted to mpk, and the functional key for f, which it derives from msk. The setup authority then needs to be trusted to destroy k and msk. Otherwise, it could sign spends that violate the covenant. With this setup completed, an indefinite number of new covenants may be created.
Every covenant has its own dedicated key pair, obtained by tweaking (k, P) with the spending policy. The private key of this tweaked key pair exists only inside f and is never revealed. The public key can be derived from P by anyone who knows the hash of the desired spending policy. This way, covenant receiving addresses can be generated. In practice, the receiving address would commit to a 2-of-2 script that requires a signature from a key the user controls alongside the FE signature. This is to keep unauthorized parties from triggering a transaction permitted by the covenant.

To create an FE signature for a covenant spend, the signer takes a tx that conforms to the spending policy and encrypts it to mpk. Using the encrypted tx, together with the encrypted k and the functional key published by the authority, they can then evaluate f. The function f signs tx with k tweaked by the hash of the spending policy. A transaction that breaks the spending policy of the address that holds the coins could at best be signed for some other, differently tweaked public key that does not control the funds.The function f can also be designed to block such a signature outright.

The general version of FE-based covenants with f(k, tx, program, proof) is strictly more expressive than OP_CTV. The general function proposed by Rubin takes a program that checks a condition on the transaction at spend time, and a zero-knowledge proof that the program accepts the transaction.
This zero-knowledge proof facilitates the implementation of the FE scheme, but does not add to it conceptually. A single fixed f works either way. Without the proof, f would have to be a general interpreter that runs any given program on tx itself. Such an f is large and costly to evaluate under FE. With the proof, f only has to verify a succinct proof. This could make it possible to enforce arbitrarily complex covenants without the need for more complexity in f. The proof also lets a spending policy depend on data outside the transaction, such as the result of an off-chain computation.
Why FE-based covenants remain infeasible for now
Goldwasser et al. (2014) introduced multi-input FE and built it on indistinguishability obfuscation. Multi-input FE and obfuscation are known to imply one another. Ananth and Jain (2015) showed that even single-input FE for general circuits yields obfuscation once it is made compact. The cryptographic primitive this design needs is therefore at least as hard to build as so-called indistinguishability obfuscation itself. Implementations of this principle remain at toy scale.
Carmer, Malozemoff and Raykova (2017) needed 3.7 hours to obfuscate a 12-bit pseudorandom function, a toy circuit of about 62,000 gates with a 64-bit key, far smaller than ECDSA signing on 256-bit numbers. The obfuscated program took 120 GB of disk space, and an evaluation ran for 67 minutes with 128 GB of RAM. The cost of implementing such a scheme would fall on whoever produces the signature, not on Bitcoin nodes. The authors called this “still far from practical.”
Furthermore, FE schemes that are practical cover only narrow function classes, such as the inner products of Abdalla et al. (2015), and the type of ECDSA signing required for Bitcoin covenants is not among them. Rubin’s paper concedes this point and lists under-developed cryptography and the setup trust assumption among its downsides. CTV-style opcodes remain far more efficient in bytes and verification, but require a base-layer change.
In our next article, we turn to Un-FE’d Covenants, which Rubin proposed to approximate covenant behavior without relying on impractical FE schemes. It replaces FE with oracle signers bonded through BitVM. [alloc]init’s Bitcoin PIPEs began in 2024 as an FE design and moved in 2026 to witness encryption. This proposal will also be covered in a follow-up article.