Bitcoin FE Covenants: How They Work and Why They Stall13 min read2,568 words

Bitcoin FE Covenants: How They Work and Why They Stall

Learn how functional encryption could enforce Bitcoin spending rules without a soft fork—and why the cryptography and setup costs still make it impractical.

Bitcoin FE covenantsBitcoin covenantsfunctional encryptionBitcoin soft forkBitcoin cryptography
Bitcoin FE Covenants: How They Work and Why They Stall

Bitcoin FE Covenants: Putting Spending Rules in the Signing Key

A Bitcoin covenant limits how coins can be spent. Usually the debate is about where to enforce that limit: change Bitcoin's consensus rules, or use some other mechanism that constrains what a key can authorize. Functional-encryption covenants - often "FE covenants" - take the second route. The goal is to make a signing key produce signatures only for transactions that fit a specified spending policy.

The appeal is obvious: Bitcoin nodes could still verify the resulting signature using the rules they already have, so you might not need a soft fork. But "no protocol change" doesn't automatically mean "easy to deploy." The cryptography required to make the key behave this way is still far from practical, and the setup brings its own trust assumptions along for the ride.

This article lays out the idea in operational terms: what functional encryption contributes, how an FE covenant spend would be produced, what kinds of policies this design could express, and why the costs matter. The core distinction is between a neat trick for avoiding a consensus change and a system that can safely and efficiently hold real users' funds.

What are Bitcoin FE covenants?

A covenant is a rule attached to a Bitcoin output that constrains what a future spend is allowed to do. It might require a particular destination, a specific transaction structure, or some condition that has to be satisfied before the coins move. This is useful for things like structured custody, vaults, and workflow-style transaction systems - but putting "general covenant behavior" directly into Bitcoin's base layer raises questions of governance and engineering.

Bitcoin nodes accept transactions according to consensus rules. If you want new restrictions at that layer, you need coordination across developers, node operators, miners, businesses, and users. A soft fork can add new restrictions while staying compatible with older nodes, but it's still a protocol change.

FE covenants aim for a different lever: keep consensus verification as-is and restrict what kind of signature a given output's key can produce.

From a general signing key to a restricted signer

In ordinary public-key cryptography, a private key can sign any message that produces a valid signature under the scheme. The network checks the signature against the public key and the message; it doesn't normally try to infer the private key's intent or enforce an application-specific "spending policy."

Functional encryption changes what a key can compute and what it can reveal. In the FE setting, a master secret can generate a functional key tied to a particular function. Given an encrypted input, that functional key can compute the function's output without revealing the underlying secret in the usual plaintext sense.

For a Bitcoin covenant, the function is the signing operation. In simplified terms, it takes an encrypted secret and a proposed transaction, then outputs a signature only for the "allowed" way to sign. The function can be designed so the signature is valid for a public key derived from the base key and tied to a hash of the spending policy. If a transaction violates the policy, the key should not be able to generate a signature that effectively controls the coins at the covenant address.

So the promise isn't that Bitcoin nodes learn a brand-new covenant rule. It's that the cryptographic construction limits which transaction signatures can be generated in the first place.

Why the distinction matters

That shifts where enforcement happens, not whether it exists. Someone still has to define the policy. The signing mechanism still has to behave correctly. And users still need a way to understand what they're authorizing.

The difference is that policy enforcement is built into the signer's construction, rather than added as a new consensus opcode. That can be helpful when a protocol upgrade is politically or operationally hard. But it's not "free." You trade a network-wide rule for a cryptographic setup and signing process that has to be correct, secure, and operationally manageable.

How would an FE covenant work in practice?

This kind of system needs more than a wallet key. It starts with a setup authority that generates two things: a Bitcoin key pair and the FE material needed to evaluate the restricted signing function. The authority then publishes enough information for users and signers to interact with the system: the public key, FE public parameters, an encrypted form of the private key, and the functional key used for restricted signing.

This authority is the first big trust question. After setup, it must destroy the original Bitcoin private key and the FE master secret. If it keeps the private key, it may be able to sign spends that bypass the covenant. If it keeps the master secret, it may be able to generate additional functional keys or otherwise undermine the restrictions, depending on how the scheme is built.

Even if you avoid a soft fork, you're still relying on careful, verifiable key-generation and destruction. "No consensus change" just means you're pushing the hard parts somewhere else.

Creating an address for a spending policy

Each covenant policy is represented by some value - often a hash - that's used to derive a dedicated key pair from the base key. The private part of that derived key isn't handed to users. Instead, it's computed inside the FE signing function.

The corresponding public key can be derived by anyone who knows the policy commitment. That lets you construct a receiving address tied to the policy.

A design can also require an additional signature from a key controlled by the user. In a 2-of-2 setup, the FE signer produces the policy-constrained signature and the user adds their own signature. This matters because "a transaction is permitted by the covenant" doesn't automatically mean "the owner wanted this transaction." The user's key provides an extra authorization step, instead of letting any party produce a permitted spend simply because they can construct it.

Producing a permitted spend

To spend the coins, the transaction has to match the committed policy. The transaction is encrypted to the FE public parameters. Then the functional signing process evaluates the signing function using that encrypted transaction and the encrypted key material.

If the transaction is allowed, the function outputs a signature for the policy-specific public key. Bitcoin nodes then validate the transaction and signature using their normal, existing verification rules.

If the transaction breaks the policy, the function should not produce a signature that actually spends the output. A signature for a different "tweaked" key won't control the coins in the covenant address. Some designs might also refuse to return anything useful - rather than returning a signature that just won't validate for spending.

This is what people mean by "no consensus change" in practice. Nodes still check a conventional signature. The specialized system determines which signatures are available in the first place. It does not mean the transaction can bypass node validation, and it does not replace Bitcoin's transaction rules.

What could FE covenants enforce, and what are the trade-offs?

At the simplest end, an FE covenant looks a lot like a fixed template covenant such as OP_CHECKTEMPLATEVERIFY (proposed in BIP-119). It can constrain a spend to a predetermined transaction structure. That's narrower than a general programming language, but narrow rules are usually easier to reason about, implement, and audit.

More expressive proposals (including work by Rubin and others) describe a function that takes the key, the transaction, a program, and a proof. The program specifies a condition on the transaction, and the proof shows that the condition holds. The FE function then verifies the proof as part of deciding whether it can create the signature.

Why use a proof instead of interpreting a program?

If there were no proof, the FE function would have to interpret arbitrary programs and run them against transaction data. That makes the function itself large and expensive to evaluate. With a succinct zero-knowledge proof, the function can verify that the program accepted the transaction without executing the entire computation itself.

In theory, that setup supports policies that depend on complex conditions or on data derived from off-chain computation. But the proof system adds its own engineering requirements: a proof system, defined program semantics, careful verification, and a clear rule for what data the policy is allowed to rely on.

"More expressive" isn't the same as "better for every use." If a fixed transaction template covers what the product needs, it's often the safer path because it has fewer moving parts. A general policy framework can offer flexibility, but it also adds review and implementation burden. In financial software, every added layer increases the odds of assumptions, edge cases, or tooling failing in the real world.

The trade-off against a protocol change

FE covenants move cost away from Bitcoin node verification and toward setup and signing. Nodes don't evaluate a general policy. The party that produces the signature does the specialized cryptographic work.

That can sound attractive when policies get complex. But a consensus opcode can be efficient and transparent once it's deployed. FE pushes complexity into cryptographic machinery that users often can't inspect as easily. And a base-layer change doesn't come for free - it has coordination and adoption costs. So the decision isn't "soft fork versus free workaround." It's one set of system-wide trade-offs versus another.

A practical way to decide is to start from the policy requirement:

  • If a fixed transaction constraint works, a narrow mechanism is usually easier to evaluate.
  • If you genuinely need expressive conditions, estimate proof and signing costs, then identify who must trust the setup.
  • If you can't answer those questions clearly, you're still in research territory - not a production substitute for a protocol feature.

Why are FE covenants not practical yet?

The main obstacle isn't that researchers can't describe what they want to do. It's that general functional encryption at the scale and performance required for real Bitcoin signing depends on cryptographic constructions that are still too inefficient for everyday use.

The FE function would need to do something close to Bitcoin signing: handle transaction-dependent inputs and meet strict security requirements. General-purpose schemes don't currently offer anything near the performance, memory footprint, and signature latency a wallet or service would need.

Functional encryption was formalized in academic work by Dan Boneh, Amit Sahai, and Brent Waters in 2011. Later work explored more general constructions, but those designs came with extreme computational overhead and relied on assumptions that were less familiar. Research in 2021 produced constructions based on more standard cryptographic assumptions, which was an important theoretical step - but it still didn't produce an implementation that's efficient enough for Bitcoin signing.

The connection to indistinguishability obfuscation

General multi-input FE is closely tied to indistinguishability obfuscation, another cryptographic primitive aimed at hiding program internals while preserving behavior. Work by Goldwasser and others established relationships between these areas, and later results showed that compact FE for general circuits can imply obfuscation-like capabilities.

That matters because general obfuscation isn't something most production teams can deploy. For example, a reported 2017 experiment by Carmer, Malozemoff, and Raykova took 3.7 hours to obfuscate a small 12-bit pseudorandom function. The obfuscated program occupied about 120 GB, and one evaluation took 67 minutes using 128 GB of RAM.

This isn't a benchmark of a complete FE covenant system - it's evidence of the underlying scale problem in related machinery. Still, it's a pretty direct illustration of why these techniques can't currently serve as routine signing infrastructure.

Bitcoin signing itself isn't a tiny computation either. A practical construction has to handle real key and transaction operations securely, not just toy circuits. And in practice, FE schemes have mostly been limited to narrower function classes - like inner products - rather than a signing function with the exact structure this covenant design needs.

The costs do not fall on Bitcoin nodes - but they still count

Since nodes only verify the resulting signature, most of the heavy cost falls on the party producing the FE signature. That could be the user's device, a wallet service, a custodian, or another signing provider.

Shifting costs away from consensus verification only helps if the signer can run the work with acceptable latency, memory use, storage demands, and reliability.

Then there's the setup authority assumption. A production deployment would need a credible setup and destruction process for sensitive secrets. It would also need clear answers to questions like: who performs setup, how users verify it, what happens if the authority is compromised, and whether the process can be repeated or audited. These aren't "paperwork details." They directly affect whether people can trust assets locked under the scheme.

So for now, FE covenants are best seen as a research direction: an interesting way to separate application-level spending restrictions from Bitcoin consensus. But they're not a practical mechanism for everyday custody or payments today.

Other proposals try to approximate covenant behavior using different assumptions - for example, oracle signers bonded through BitVM. Those approaches should be judged on their own trust, liveness, and security properties, rather than treated as equivalent implementations of FE.

Conclusion

FE covenants propose a clear architectural idea. Instead of teaching Bitcoin nodes a new spending rule, you constrain the signing key so it can authorize only transactions that satisfy the rule. If the cryptography were efficient and the setup were trustworthy, you could get covenant-like behavior without a soft fork.

Today, those conditions aren't met. General FE and related obfuscation techniques are still too expensive for real signing workloads, and the setup authority introduces a separate security assumption. For teams evaluating covenant designs, the practical path is simple: decide the minimum policy you need, compare the cost and clarity of a narrow consensus feature against the cryptographic costs and trust model of a workaround, and don't treat theoretical expressiveness as production readiness. The "right" design is the one whose failure modes you can explain - and whose costs still make sense when people rely on it.

Frequently Asked Questions

The proposed design aims to avoid a soft fork because Bitcoin nodes would verify signatures using existing rules. The covenant restriction is intended to be enforced by the signing mechanism. That does not remove the need for new software, a setup process or trust analysis; it only avoids changing Bitcoin’s consensus rules for this design.
Functional encryption lets a holder of a specially generated functional key compute a defined result from encrypted inputs without simply revealing the underlying secret. In the covenant proposal, the function is designed to produce a Bitcoin signature only for transactions permitted by a spending policy.
The general proposal is designed to support expressive conditions through a program and a proof that the program accepts a transaction. But theoretical expressiveness does not mean practical support. General FE remains too inefficient for this use, and policies involving off-chain data also depend on how that data is produced and proven.
A dedicated opcode could let nodes enforce a covenant rule efficiently, but it requires a consensus change and broad coordination. FE aims to avoid that change, at the cost of much heavier cryptography and a trusted setup concern. Which trade-off makes sense depends on the application, the required policy and the maturity of the implementation.

Related articles