Bitcoin FE Covenants: Transaction Rules Built Into Cryptographic Signing Keys
Bitcoin covenants without a consensus change face a cryptographic wall
Functional encryption offers an unusual route to Bitcoin covenants: place spending rules inside the mechanism that produces a signature, so Bitcoin nodes can keep checking transactions with their existing signature rules. The appeal is clear. The practical obstacle is larger: the cryptography needed to make the design expressive enough for Bitcoin remains far beyond usable scale.
That tradeoff matters because changing Bitcoin’s consensus rules requires coordination across node operators, miners, developers and economic participants. The difficulty of reaching that agreement has contributed to a conservative base layer. Researchers have therefore explored ways to impose covenant-like restrictions without asking nodes to adopt new consensus behavior.
In May 2024, Jeremy Rubin, who authored the OP_CTV proposal in BIP-119, described one such approach in “FE’d Up Covenants”. Instead of adding covenant logic to Bitcoin Script, the proposal uses functional encryption, or FE, to limit what a signing key can authorize.
How a restricted signing key would work
In conventional public-key cryptography, a private key can sign any message accepted by the signature scheme. An FE-based design would constrain the signing operation itself. Its functional key would produce a valid Bitcoin signature only for transactions that meet a specified spending policy. Nodes would verify that signature with OP_CHECKSIG, as they do today, so the construction wouldn’t require a soft fork.
FE is a way to grant narrowly scoped access to encrypted information. A master secret can generate functional keys, each tied to a particular computation. Given a ciphertext containing a secret value, a functional key reveals the output of its assigned function without exposing the underlying value in plaintext.
Researchers Dan Boneh, Amit Sahai and Brent Waters first formalized FE in 2011. Constructions for arbitrary functions followed in 2013, but their polynomial runtime came with costs vastly beyond current computing capacity and relied on new, untested multilinear-map assumptions. Work published in 2021 offered constructions based on better-established cryptographic assumptions, a theoretical step toward implementation rather than evidence of practical readiness.
For a covenant, the relevant function is a signing operation. It takes a private key and a transaction, then returns a Bitcoin signature. Since the operation depends on both inputs, Rubin’s construction relies on multi-input FE. A covenant that allows one fixed spending transaction, similar to OP_CTV, needs those two inputs. A more expressive policy can take additional inputs, represented in Rubin’s design as f(k, tx, program, proof).
The function doesn’t sign with the supplied private key directly. It derives a separate key pair by tweaking the key with a hash of the covenant policy. The resulting signature is valid for that tweaked public key, rather than the original public key P. That binding is what ties the signature to the specific spending conditions.
Setup and address generation add a trust assumption
The system begins with a setup authority. It creates a Bitcoin key pair, consisting of private key k and public key P, and an FE key pair, consisting of master secret msk and public key mpk. It publishes P and mpk, encrypts k to mpk, and derives the functional key for f from msk.
Then the authority must destroy k and msk. If it retains either secret, it could create spends that bypass the covenant. This trust requirement is a central cost of the arrangement: the design depends on the authority’s secure setup and deletion. Once setup is complete, the same published materials can support the creation of an indefinite number of covenants.
Each covenant gets its own key pair, produced by tweaking the base pair with the hash of its spending policy. The tweaked private key stays inside f and is never disclosed. Anyone who knows the policy hash can derive the corresponding public key and generate a receiving address.
In practice, that address would commit to a 2-of-2 script. Spending would require both the FE-produced signature and a signature from a key controlled by the user. The second signature prevents someone else from initiating a transaction merely because it satisfies the covenant’s policy.
To spend, the signer supplies a transaction that follows the policy and encrypts it to mpk. The signer combines that ciphertext with the encrypted private key and the published functional key to evaluate f. The function signs using the policy-tweaked key. If a transaction violates the policy, a signature would correspond, at best, to a different tweaked public key that doesn’t control the funds; f could also reject the transaction outright.
Zero-knowledge proofs extend the policy’s reach
Rubin’s general construction goes beyond the fixed transaction template associated with OP_CTV. Its function accepts a program that checks a condition on the transaction at spend time, along with a zero-knowledge proof that the program accepts the transaction.
The proof is an engineering aid for FE, not a new covenant capability by itself. Without it, f would need to interpret and execute arbitrary programs over transactions, making the function expensive to evaluate under FE. With a succinct proof, f only needs to verify that the computation passed. That could let a fixed function support complicated policies, including conditions based on off-chain computation results.
This flexibility comes with demanding cryptographic requirements. Goldwasser and colleagues introduced multi-input FE in 2014 using indistinguishability obfuscation, and the two concepts are known to imply one another. Ananth and Jain showed in 2015 that compact FE for general circuits also yields obfuscation. In practical terms, the covenant proposal relies on a primitive at least as difficult to build as indistinguishability obfuscation.
Available demonstrations remain toy-scale. In 2017, Carmer, Malozemoff and Raykova reported that obfuscating a 12-bit pseudorandom function took 3.7 hours. The circuit had about 62,000 gates and a 64-bit key, making it far smaller than the ECDSA signing operation needed for Bitcoin transactions involving 256-bit numbers. The resulting program occupied 120 GB, and one evaluation took 67 minutes while using 128 GB of RAM. The authors described the results as “still far from practical.” Those costs would fall on the party producing the signature, not on Bitcoin nodes, but that distinction doesn’t make the computation usable.
Efficiency remains the dividing line
FE systems that are practical today support narrow function classes, such as the inner products studied by Abdalla and colleagues in 2015. They don’t cover the ECDSA signing operation Bitcoin covenants need. Rubin’s paper acknowledges both the immature state of the cryptography and the trusted setup as drawbacks.
That leaves a sharp engineering tradeoff. FE covenants could move policy enforcement into a signing key and avoid a consensus change, but the required primitive is still impractical. CTV-style opcodes are much more efficient in transaction bytes and verification, though they require a base-layer change. For now, FE is a useful design direction and a clear illustration of how far cryptographic enforcement can reach in theory; its near-term value depends on whether the underlying primitives can become dramatically smaller and faster.
Related work has explored alternatives. Rubin’s “Un-FE’d Covenants” proposes approximating covenant behavior with oracle signers bonded through BitVM. [alloc]init’s Bitcoin PIPEs began in 2024 as an FE design and shifted in 2026 to witness encryption, a concept introduced in earlier research. These approaches point to the same practical question: how much covenant behavior can Bitcoin gain without placing an unworkable burden on its cryptography or consensus process?