From 981a1423a9c5a5746635b8c8aa0bb557abf37fab Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Fri, 22 Dec 2023 17:17:24 -0800 Subject: [PATCH] Add bip-internalkey --- bip-internalkey.mediawiki | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 bip-internalkey.mediawiki diff --git a/bip-internalkey.mediawiki b/bip-internalkey.mediawiki new file mode 100644 index 0000000000..0a3049b9df --- /dev/null +++ b/bip-internalkey.mediawiki @@ -0,0 +1,68 @@ +
+  BIP: TBD
+  Layer: Consensus (soft fork)
+  Title: INTERNALKEY
+  Author: Brandon Black 
+  Comments-Summary: No comments yet.
+  Status: Draft
+  Type: Standards Track
+  Created: 2023-12-22
+  License: PD
+
+ +==Abstract== + +This BIP describes a new tapscript opcode (OP_INTERNALKEY) which pushes the +taproot internal key to the stack. + +==Specification== + +When verifying taproot script spends having leaf version 0xc0 (as defined in +BIP342), OP_INTERNALKEY replaces OP_SUCCESS187 (0xbb). OP_INTERNALKEY pushes +the taproot internal key, as defined in BIP341, to the stack. + +==Motivation== + +When building taproot output restrictions, especially those secured by an +aggregate key representing more than 1 signer, where the parties may wish to +collaborate on signing with the taproot internal key, but only with additional +script restrictions. In this case, OP_INTERNALKEY saves 32 bytes of witness +space. + +In cases where script path spending is not desired, the internal key may be set +to a NUMS point whose bytes would otherwise be required in a tapscript. This +could be used with any hash locked transaction, for example, to save 32 witness +bytes. + +==Reference Implementation== + +A reference implementation is provided in provided here: + +https://github.com/brandonblack/bitcoin/commit/aa94c2865badc9bef86c29c330d4da77f341c0f2 + +==Backward Compatibility== + +By constraining the behavior of an OP_SUCCESS opcode, deployment of the BIP can +be done in a backwards compatible, soft-fork manner. If anyone were to rely on +the OP_SUCCESS behavior of OP_SUCCESS187, OP_INTERNALKEY would invalidate their +spend. + +==Deployment== + +TBD + +==Credits== + +Jeremy Rubin described most of the ideas for OP_INTERNALKEY to me. + +==References== + +[https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki BIP 341] Taproot + +[https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki BIP 342] Tapscript + +==Copyright== + +This document is placed in the public domain. + +