That is Half 6 within the technical article sequence about Bitcoin covenants by Cointelegraph Analysis. To learn the earlier article, click on right here.
Altering Bitcoin’s consensus guidelines just isn’t merely a technical course of. It requires that the community’s node operators, miners, builders and financial actors coordinate round a change. This coordination is troublesome to realize, which is why Bitcoin’s base layer has regularly ossified.
Researchers have spent the final a number of years investigating whether or not covenant habits might be enforced with out touching consensus guidelines. In Might 2024, Jeremy Rubin, the unique writer of the OP_CTV proposal (BIP-119), provided a solution in a paper titled FE’d Up Covenants. His design proposed utilizing practical encryption (FE) to maneuver the covenant out of Bitcoin Script and into the signing key.
In strange public-key cryptography, a personal key can signal any message. In hypothetical FE-based covenants, signing can be restricted to a predefined set of legitimate transactions. Bitcoin nodes would confirm the signature with OP_CHECKSIG precisely as they do in the present day, obviating the necessity for a smooth fork.
Practical encryption: keys that solely signal what the foundations permit
Practical encryption (FE) generalizes public-key encryption. In strange cryptographic schemes, a personal key can be utilized to completely decrypt a ciphertext and arrive on the plaintext. In FE, a grasp secret is as an alternative used to challenge subsidiary practical keys, every of which reveals just one chosen perform of the plaintext. The holder of the practical key for a perform f and the ciphertext of a secret x can compute f(x) however by no means will get to disclose x as a plaintext message.
Within the educational literature, FE was first formalized by Dan Boneh, Amit Sahai and Brent Waters in 2011. Constructions for arbitrary features adopted from 2013, with polynomial runtime however overheads far past the assets of present computing expertise. Moreover, their safety rested on new, untested constructing blocks known as multilinear maps. Solely in 2021 did researchers develop constructions from well-founded cryptographic assumptions, which might in precept open the door to sensible implementations of FE.
The f in an FE scheme may be any feasibly computable perform. Nevertheless, in Bitcoin covenant constructions, f is a signing perform. Its output is a Bitcoin signature for a transaction tx. As a result of this signature depends upon each a personal key and the transaction that’s being signed, it takes no less than two inputs, which is why Rubin’s design makes use of multi-input FE. For a covenant that solely permits a single spending transaction, akin to OP_CTV, two inputs suffice. Normal, expressive constructions take extra arguments, as in Rubin’s f(okay, tx, program, proof).
Crucially, f doesn’t signal immediately with the non-public key okay that’s provided in an encrypted type. As an alternative, the perform derives a brand new key pair by tweaking okay with a hash of the covenant’s spending coverage. Signatures produced by f are legitimate for the tweaked public key, not for the bottom public key P itself.
Establishing FE-based covenants
To allow FE-based covenants from these primitives, a setup authority is required. It generates a Bitcoin key pair (the non-public key okay and the general public key P) in addition to an FE key pair (the grasp secret msk and the FE public key mpk). It publishes P, mpk, okay encrypted to mpk, and the practical key for f, which it derives from msk. The setup authority then must be trusted to destroy okay and msk. In any other case, it might signal spends that violate the covenant. With this setup accomplished, an indefinite variety of new covenants could also be created.
Each covenant has its personal devoted key pair, obtained by tweaking (okay, P) with the spending coverage. The non-public key of this tweaked key pair exists solely inside f and isn’t revealed. The general public key may be derived from P by anybody who is aware of the hash of the specified spending coverage. This fashion, covenant receiving addresses may be generated. In follow, the receiving deal with would decide to a 2-of-2 script that requires a signature from a key the person controls alongside the FE signature. That is to maintain unauthorized events 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 coverage and encrypts it to mpk. Utilizing the encrypted tx, along with the encrypted okay and the practical key printed by the authority, they will then consider f. The perform f indicators tx with okay tweaked by the hash of the spending coverage. A transaction that breaks the spending coverage of the deal with that holds the cash might at greatest be signed for another, in a different way tweaked public key that doesn’t management the funds.The perform f will also be designed to dam such a signature outright.

The overall model of FE-based covenants with f(okay, tx, program, proof) is strictly extra expressive than OP_CTV. The overall perform proposed by Rubin takes a program that checks a situation on the transaction at spend time, and a zero-knowledge proof that this system accepts the transaction.
This zero-knowledge proof facilitates the implementation of the FE scheme, however doesn’t add to it conceptually. A single mounted f works both manner. With out the proof, f must be a basic interpreter that runs any given program on tx itself. Such an f is massive and expensive to guage below FE. With the proof, f solely has to confirm a succinct proof. This might make it doable to implement arbitrarily advanced covenants with out the necessity for extra complexity in f. The proof additionally lets a spending coverage rely upon knowledge exterior the transaction, comparable to the results of an off-chain computation.
Why FE-based covenants stay infeasible for now
Goldwasser et al. (2014) launched multi-input FE and constructed it on indistinguishability obfuscation. Multi-input FE and obfuscation are identified to indicate each other. Ananth and Jain (2015) confirmed that even single-input FE for basic circuits yields obfuscation as soon as it’s made compact. The cryptographic primitive this design wants is subsequently no less than as arduous to construct as so-called indistinguishability obfuscation itself. Implementations of this precept stay at toy scale.
Carmer, Malozemoff and Raykova (2017) wanted 3.7 hours to obfuscate a 12-bit pseudorandom perform, 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 house, and an analysis ran for 67 minutes with 128 GB of RAM. The price of implementing such a scheme would fall on whoever produces the signature, not on Bitcoin nodes. The authors known as this “nonetheless removed from sensible.”
Moreover, FE schemes which might be sensible cowl solely slender perform lessons, such because the internal merchandise of Abdalla et al. (2015), and the kind of ECDSA signing required for Bitcoin covenants just isn’t amongst them. Rubin’s paper concedes this level and lists under-developed cryptography and the setup belief assumption amongst its downsides. CTV-style opcodes stay much more environment friendly in bytes and verification, however require a base-layer change.
In our subsequent article, we flip to Un-FE’d Covenants, which Rubin proposed to approximate covenant habits with out counting on impractical FE schemes. It replaces FE with oracle signers bonded by means of BitVM. [alloc]init’s Bitcoin PIPEs started in 2024 as an FE design and moved in 2026 to witness encryption. This proposal can even be lined in a follow-up article.