From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 04 Dec 2026 04:06:11 -0800 Received: from mail-oo1-f59.google.com ([209.85.161.59]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1xZS3G-000cw3-Me for bitcoindev@gnusha.org; Fri, 04 Dec 2026 04:06:11 -0800 Received: by mail-oo1-f59.google.com with SMTP id 006d021491bc7-71addb06a78sf867251eaf.3 for ; Fri, 04 Dec 2026 04:06:10 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1796385964; cv=pass; d=google.com; s=arc-20260327; b=iM/LAvxY5OgqD3UiZUx5I0rvsk2ZOsmTKCiLLFPELpMiI1tU6BL3XROzE1dW/pbtf+ mIQiksD3W5VqXlsPhRO8BEgKKbYk8EFI3v9ZGgiO1SRcJd2d6Wrw4BKHd25aoCLvFPIU zOX/+IaXkg7YbZw24Aq6Flk7ivJHtpiQCAMh665Ax6LW9LQRxR1PLZStt/zU2RLiKtVG xuM0u/5oMl35xEKpm5xIYQQ1KJzfc16qYcUrvSiYD6NkxUV2kHc2O4F2AiWR1YD/y1wJ oL/bCohDSS+INvX1kCi5+Pcmv7wPrdQgocAXVzYSbCYx02kUq49uq4n++MOD+MzEQ5vg rxnQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:to:subject:message-id:date:from :mime-version:sender:dkim-signature; bh=cxRV70dlBwBrRp2MWr0YOi0siRSdfn9uueImPC6pVrU=; fh=urLw19lQeB1CTTRBWjnCfqpHEE0c+kabvc3PKK+R5G4=; b=STlvhHcA+yanN9G+JOwS6PuytFFHUBw1cBwWkx+77Y7G+CbyuvnDFyVE9LLi5v7Fgq Ez4LWpAezRm7kflmbbL8MSu3nIcrig/vMuU90GzyMm4zyvcjJJZi4fYdKibisjbq9LX0 LSbeicLNV2VInEVRpzjDpS2O28dsqBz7AWjspuSGClrfKzQG7zN8vKPZypGrPSkjQ1SF uiy6F3go3i8BG5PxkFbvB2t3FjFwY35F1lFTD+mzBi8lo2NbHBjaLmlHVQL2TMwh+fW3 UNTmHZnGfXVqwKOyMPC5eLgWenMKjUv42WEfwWw6ZTveKDKS0spVX8uImORVnYbCpOCk qeQg==; darn=gnusha.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@darkinc.co.uk header.s=google header.b=fGgMfJ0l; arc=pass (i=1); spf=pass (google.com: domain of darky@darkinc.co.uk designates 2607:f8b0:4864:20::132e as permitted sender) smtp.mailfrom=darky@darkinc.co.uk; dara=pass header.i=@googlegroups.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20260707; t=1796385964; x=1796990764; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:to:subject:message-id:date:from :mime-version:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cxRV70dlBwBrRp2MWr0YOi0siRSdfn9uueImPC6pVrU=; b=U32ARhbGEVdE2xHgnu3x9skslZyw+3trP9P317gomi2CJArdtLO6MlJpAhxW1zLllT lrAN22AgWSXmIbUyvyxEB7KK/kZ7cG/kLOpMMz5AZ6bVx7VkvDp4n/HTODpEWslPVfhc mqou2rdBrNg0QyXwCx3keyYVDMiq+8oZ7n7F6+A+zn71dO6/ivgxyfiPSB9mPitMCtix fAsCTrBUbPa+CjP/RimqH/0XngN5HecIeMWThKFnPNX2vB+fB32nM9zNLvVB3TMxbExw tTpuN7o9JGkEKkEObNNstJ4g+Sdwf8yRh0IpCgkSDMqumXnq40yNUzw+Kt7Ju8Lo7Qq1 Qjsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796385964; x=1796990764; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:to:subject:message-id:date:from :mime-version:x-gm-gg:x-beenthere:x-gm-message-state:sender:from:to :cc:subject:date:message-id:reply-to:content-type; bh=cxRV70dlBwBrRp2MWr0YOi0siRSdfn9uueImPC6pVrU=; b=qfv3L/eqaHTnPkMq5bxz8VcF8S2Yz5SMgRSr9WKJ6qgK62EmIhgWdXUjWfA3QCMIZU dSbnD5GeWWo4WwPY9WxhWtdkf/5MuIhsjzH3pzYC20jXE+BKKYltAL+/EGXrGuXAbEzV v41tDDeWeWsW02cIl96r/pkAZ9SGTDtboswdsS8yj/OkHmP1OA0zFNlFUJLULSAp9NiW soC8EnJn8TnsWGZoDzngMDUbwWFqkSPcMafXC8rkTByRu12vRUZaqXvHWrcN0zG2LI7q xLD4dq+vqKqhR3cLUmsoSAEftGFIN58U/MSgIdgx51+txG7zow2efh2lFNbzflu690bu b2iw== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=3; AL+hErEN6aU+7fMSCr9YPBj7tIdNcsXKELTaqPyizA9kbSV24GSfzetYM6qnNSBSBYa15Lzc8QNQBH9VnTN3@gnusha.org X-Gm-Message-State: APuU4Z8PIWljS6wqpB1Fb5O+ZPdZWU0LTvgYB9MJZ0FctaHo5tAGxNE/ LjdB7uCMhnRHA7bc8G7ciGCGqvltABrcA8g79vM3zv1YKYD4H2UhEr2n X-Received: by 2002:a05:6820:c5ce:20b0:71a:deda:68ce with SMTP id 006d021491bc7-71bf21b3bf1mr986495eaf.81.1796385964369; Fri, 04 Dec 2026 04:06:04 -0800 (PST) X-BeenThere: bitcoindev@googlegroups.com; h="ATskLdeDoyu4V7+Q5D9GWMzUeABAxLKDIe7Uzgroui1MAtdIXA==" Received: by 2002:a05:687c:56:10b0:49d:ccbd:1d56 with SMTP id 586e51a60fabf-4e3329f259cls833858fac.0; Fri, 04 Dec 2026 04:05:59 -0800 (PST) X-Received: by 2002:a05:6808:3085:b0:57f:c90:bbbf with SMTP id 5614622812f47-57f2071638dmr1647169b6e.34.1796385959381; Fri, 04 Dec 2026 04:05:59 -0800 (PST) Received: by 2002:a05:6808:a5d7:20b0:572:f7eb:ee1 with SMTP id 5614622812f47-57a32c5d3d0msb6e; Fri, 4 Dec 2026 03:29:01 -0800 (PST) X-Received: by 2002:a17:90b:3881:b0:3b3:fd13:683d with SMTP id 98e67ed59e1d1-3b5e064f71emr1214193a91.55.1796383740621; Fri, 04 Dec 2026 03:29:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1796383740; cv=pass; d=google.com; s=arc-20260327; b=sXZidgxEqWSO81V4bYjeA0CPqjOZbWFJlpdjna0vEH5mv990E46lZbq+kIi73yYdJ5 yLvrTkNN/mgx0M6wTsXC4U3HNh6C8dgQJQvJRFXGbOqZ50Pr6IM0qF9WIQi+0u/DZ3xQ oycNh13H7C4SalrX6Cg8nzzoRKLZMu2Wi8vBgbAZelcNdRnAW4n4YOawDujg5UU7Rp4K 6mlcseXjtfst98jHd7eTzTqzDsmWAXU+91Id29X9WeIfb8x7jR2Dcr6uAWKHkIfGb0GQ ccsTdNQ6QCbcYYctoRzLFtMQAR5s3I1MZZziSCAseWgewsq6+ohcpk8iLqRjhYulrPXz JnOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=c03Lc8f7CfVrd3ePWXHlzdJJf4JrNc5ceGxTcxYduFo=; fh=VcGcg+Zjs9gw1uDcHbxsAILhBAcecnbJzZRdxgKVDIc=; b=XVhJfJr37m3KthdIE67xRviko2NdPeUrKM1GKKFHA9PB5qw7fr+uKWICpgwLPJtxrt 6xrpWt0pWe4TbY9cD2ZHo3bgQfNwSamWKtCKw2fOV2u59GI/0eKezyTczhUwF7/94rog 3r2CDjS8HmsgVtAkYvGwTuZuzT8Wanri7YKmy3qk9PKAdNEeO4YrIW//vjt4Aca6pruh Vb77ug/JL5z2LTg4vr5oW83TmlEMoMHHnJ/CJdNckM9/amOqs8uL3a/Jt6KSrGQM7gqU +tS2UMLieOipGTeht34ObFBNOmPaIm0JpIc7JZKMGjXjhdiogmH0OrqVRmK9s8+pu0b5 o5aQ==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@darkinc.co.uk header.s=google header.b=fGgMfJ0l; arc=pass (i=1); spf=pass (google.com: domain of darky@darkinc.co.uk designates 2607:f8b0:4864:20::132e as permitted sender) smtp.mailfrom=darky@darkinc.co.uk; dara=pass header.i=@googlegroups.com Received: from mail-dy1-x132e.google.com (mail-dy1-x132e.google.com. [2607:f8b0:4864:20::132e]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-3b5ddc9c8dfsi46912a91.4.2026.12.04.03.29.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 03:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of darky@darkinc.co.uk designates 2607:f8b0:4864:20::132e as permitted sender) client-ip=2607:f8b0:4864:20::132e; Received: by mail-dy1-x132e.google.com with SMTP id 5a478bee46e88-386c71feeeaso1012066eec.0 for ; Fri, 04 Dec 2026 03:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1796383740; cv=none; d=google.com; s=arc-20260327; b=hhyuQgYWXuWFGzUmnuPoZZuUzddJa+jFlp76QW5M+oNW300Ih/G9egmR5CgODmvqeK E6vntJzfss4cfhtDqJYlu/UOzwvbVVRuQDx+Ca3WWnUhId0vrkzT2kZtllWl0tDJLORW miOQuBBjMuIPOIyZOkL6eYp53BnbUlFVw6tsWdLUNBI9624ASkqKY+Q0m97w4z2ySoKs n1dFgnYWWbgGPcG3l/E63pL58X4P+o5WG5gMRyGstviS0/dKv68GJhL8qCSKLYo4V26L 9EjN/ekQhlVt552E38aIU7lz0Txyf1sCoy60S8e5Dj4LwlV3Wng6cZXuXZQXlpnTO+Zk iMww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=c03Lc8f7CfVrd3ePWXHlzdJJf4JrNc5ceGxTcxYduFo=; fh=VcGcg+Zjs9gw1uDcHbxsAILhBAcecnbJzZRdxgKVDIc=; b=LvEkweY65KvY6rroqosGm4g8qAX6I+CUcDHzN32qoir6s3J/HgfD1NEwfYMie2Chrw imeA7qvNFT7b+UZJyjR7KU0qiW/wN+C0AQ7ltz24SZR3ihf2uq5jWj5KR1q9LhPJu5AK 7wai3apnBphZL1M78gBQm5XRKl4SblBj5KEup7Vk69bWkFIHNdFiudk2SaE0gBshTSmK pOHhEI6NrOlR8X4lQX05veMjyZzzYy5eJO0fgG1MOqOgTnpVy0lnx0SvNBEqjnLzNKCC toXnY5ukRhUEOFXVTG44e5Os6AWjp/ZY7dgaH+5SBExjJu1yxGHWTAqsBQ/c60vtYker f2jg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Gm-Gg: AZFdTZeE7kkmQIhkVqsYfOUJCmv6bgb5J8PaH7PDc6pURjDv2mbLfrHUdOpQzzl1DBZ Oix4e6mNHcWXdbK5lUS9tYxZc1EMKRbFY5QF2VDqM363aFdTG5SoBgw7OxO4uMR2AwObWpXVhKd Hd1Sz1/6z4iDTglPYsyXygbZVVJlwbEtZpyYZQaSpCrzET90tgoPGv7b7wBJrPl1Uxaxt8rXptm 3DI9riiT2TO+OHrBzytJSHAzuKPHH8y+xH0hSwOakZvUxZcK7JScvQq9Lv6gOkZi8Qp+e6xJr8I XdK4YDDqO7E7NngS9ik1GR5YNfN3zwtNroSALZdkDldKUyNmwkVfZu5rjUVIk4KNjDZtH6IM3Gy hjecPT3LyqAZrozDBXnDUvmg7C63TQOhKqNuOglzcFBkXOb5pE0hShY9shzQ= X-Received: by 2002:a05:7301:180c:b0:386:cffd:bda6 with SMTP id 5a478bee46e88-387520190a6mr1813109eec.5.1796383739642; Fri, 04 Dec 2026 03:28:59 -0800 (PST) Received: from 313336824172 named unknown by gmailapi.google.com with HTTPREST; Fri, 4 Dec 2026 03:28:58 -0800 MIME-Version: 1.0 From: "Darky ." Date: Fri, 4 Dec 2026 03:28:58 -0800 X-Gm-Features: Aa3M54qdb-Rhg2k_4FdqCKNOXRgXaUG5iYA5rhgYC_5I__ifJmA-I4vpLgOIrkU Message-ID: Subject: [bitcoindev] Unaudited regtest prototype: P2MR + post-quantum signature opcodes (ML-DSA-44, SLH-DSA-SHA2-128s, Falcon-512) To: bitcoindev@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000ae92a20661cd2ec5" X-Original-Sender: Darky@darkinc.co.uk X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@darkinc.co.uk header.s=google header.b=fGgMfJ0l; arc=pass (i=1); spf=pass (google.com: domain of darky@darkinc.co.uk designates 2607:f8b0:4864:20::132e as permitted sender) smtp.mailfrom=darky@darkinc.co.uk; dara=pass header.i=@googlegroups.com Precedence: list Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com List-ID: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.7 (/) --000000000000ae92a20661cd2ec5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello list, I would like to share an unaudited regtest prototype of BIP-360 Pay-to-Merkle-Root (P2MR) together with a companion set of post-quantum signature opcodes, implemented as patches against Bitcoin Core v32.1. It is intended as a reference for discussion, not as a proposal ready for activation or as something to use with real funds. Independent review has not been done. Feedback is welcome, including on whether this direction is worth pursuing at all. Repository (code, patches, draft, test vectors, and a short brief): https://github.com/DarkincStudio/bitcoin-pq-softfork Motivation ---------- Bitcoin signs with secp256k1 (ECDSA and Schnorr). Shor's algorithm would let a cryptographically relevant quantum computer derive a private key from an exposed public key. That is a problem for outputs whose public key is already on-chain, and for any spend that reveals a public key while it sits in the mempool. SHA-256 and proof of work are a different, weaker story: Grover's algorithm only square-roots the classical search. Relation to BIP-360 ------------------- BIP-360 is by Hunter Beast, Ethan Heilman and Isabel Foxen Duke. This prototype implements their P2MR construction and does not change that specification. BIP-360 v0.12.1 specifies Pay-to-Merkle-Root: a SegWit v2 output whose 32-byte program is a tapscript Merkle root, with no key-path spend (bc1z=E2= =80=A6 / bcrt1z=E2=80=A6). That addresses long-exposure attacks on the output itself= . The BIP text explicitly leaves post-quantum signatures out of scope. This prototype follows that P2MR construction (it passes 13/13 of the official BIP-360 construction vectors; three error-only vectors are skipped, as documented). The PQ opcodes are a companion design, modelled on the informative plan in earlier BIP-360 discussion, and are not part of BIP-360 itself. Opcode numbers, validation costs, and encodings here are proposals, not standards. The draft in the repository is unassigned and has not been submitted as a BIP. Design summary -------------- Two BIP9 deployments, both off by default on every network, including regtest: p2mr bit 3 P2MR outputs pqsig bit 4 PQ signature opcodes inside P2MR leaves The opcodes redefine OP_SUCCESSx 0xd0-0xd8, and only execute inside P2MR leaves: OP_CHECKMLSIG{,VERIFY,ADD} ML-DSA-44 OP_CHECKSLHSIG{,VERIFY,ADD} SLH-DSA-SHA2-128s OP_CHECKFALCONSIG{,VERIFY,ADD} Falcon-512 All verification is done by liboqs 0.16.0, pinned and built as portable C (no AVX2/AVX-512 dispatch, no OpenSSL). The consensus code is a wrapper; it does not implement the schemes itself. Validation weights, derived from a portable-build benchmark, are 150 (ML-DSA-44), 1100 (SLH-DSA-SHA2-128s) and 100 (Falcon-512), against 50 for Schnorr. In PQ-enabled leaves, elements over 520 bytes cannot be duplicated or hashed, so a large signature cannot be re-checked cheaply via OP_DUP. There is a signature cache for valid PQ signatures. On this implementation, the worst-case block of PQ checks went from about 2.9 s (ML-DSA, before the 520-byte rule) to 0.08 s (ML-DSA), 0.26 s (SLH-DSA) and 0.09 s (Falcon-512) on one core. To try the prototype on regtest, start bitcoind with -vbparams=3Dp2mr:0:9223372036854775807 -vbparams=3Dpqsig:0:9223372036854775807 and mine 432 blocks (3 x 144, threshold 108/144). Measured sizes -------------- 1-in/1-out spends, vsize from testmempoolaccept, weight from getrawtransaction, recorded 30 November 2026: Scheme Pubkey Signature vsize weight vs P2TR P2TR key-path 32 B 64 B 111 vB 444 WU 1x ML-DSA-44 1312 B 2420 B 1039 vB 4156 WU 9.36x SLH-DSA-SHA2-128s 32 B 7856 B 2077 vB 8307 WU 18.71x Falcon-512 897 B 666 B 497 vB 1986 WU 4.48x Portable-build single-core verify times, from the same test session, were about 67-73 us (ML-DSA-44), 476-514 us (SLH-DSA-SHA2-128s) and 34-37 us (Falcon-512), versus 27-34 us for BIP-340 Schnorr. Known issues and open questions ------------------------------- These are the main points I would like views on. A longer self-review is in docs/BIP-DRAFT.md in the repository. * liboqs is still an external research library. It is pinned and linked statically, but it has not been audited for use in Bitcoin consensus, and liboqs itself says it is not meant for production use without review. * Falcon-512 here is liboqs Falcon-padded-512, which is round-3 Falcon. It is not FIPS 206 FN-DSA; that standard is not final, and hashing or encoding may differ. If FIPS 206 is adopted later, these opcodes should not change meaning: a new opcode or leaf version would be needed. * Bytes 0xd0-0xd8 overlap Elements/Liquid tapscript opcodes in that range. A new leaf version for PQ leaves may be a cleaner namespace than redefining OP_SUCCESSx. * Two deployments are soft-fork-safe in either order, but if p2mr activates first, outputs whose leaves use 0xd0-0xd8 are anyone-can-spend until pqsig activates. A single combined deployment is an alternative. * The portable build has only been tested on x86-64 Linux (GCC 14). ARM, big-endian, macOS and Windows have not been run. * There is no wallet, descriptor, or PSBT support. Spends are built by the Python test framework. This is an unaudited regtest prototype. Consensus code can lose money if it is wrong. I am asking for feedback, not for anyone to run this on mainnet or to treat it as a finished proposal. Thank you for reading. Dark Inc / DarkincStudio --=20 You received this message because you are subscribed to the Google Groups "= Bitcoin Development Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoindev+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/= CAMaSzvrT6NT4Fh8dg%2B0BxJ_M-MTPgqkEkyHcog5S7aRmYJR7qA%40mail.gmail.com. --000000000000ae92a20661cd2ec5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello list,

I would like to share an unaudited reg= test prototype of BIP-360 Pay-to-Merkle-Root (P2MR) together with a compani= on set of post-quantum signature opcodes, implemented as patches against Bi= tcoin Core v32.1. It is intended as a reference for discussion, not as a pr= oposal ready for activation or as something to use with real funds. Indepen= dent review has not been done. Feedback is welcome, including on whether th= is direction is worth pursuing at all.

Repository (code, patches, dr= aft, test vectors, and a short brief): https://github.com/DarkincStudio/bitcoin-pq-so= ftfork

Motivation
----------

Bitcoin signs with secp25= 6k1 (ECDSA and Schnorr). Shor's algorithm would let a cryptographically= relevant quantum computer derive a private key from an exposed public key.= That is a problem for outputs whose public key is already on-chain, and fo= r any spend that reveals a public key while it sits in the mempool. SHA-256= and proof of work are a different, weaker story: Grover's algorithm on= ly square-roots the classical search.

Relation to BIP-360
-------= ------------

BIP-360 is by Hunter Beast, Ethan Heilman and Isabel Fo= xen Duke. This prototype implements their P2MR construction and does not ch= ange that specification.

BIP-360 v0.12.1 specifies Pay-to-Merkle-Roo= t: a SegWit v2 output whose 32-byte program is a tapscript Merkle root, wit= h no key-path spend (bc1z=E2=80=A6 / bcrt1z=E2=80=A6). That addresses long-= exposure attacks on the output itself. The BIP text explicitly leaves post-= quantum signatures out of scope.

This prototype follows that P2MR co= nstruction (it passes 13/13 of the official BIP-360 construction vectors; t= hree error-only vectors are skipped, as documented). The PQ opcodes are a c= ompanion design, modelled on the informative plan in earlier BIP-360 discus= sion, and are not part of BIP-360 itself. Opcode numbers, validation costs,= and encodings here are proposals, not standards. The draft in the reposito= ry is unassigned and has not been submitted as a BIP.

Design summary=
--------------

Two BIP9 deployments, both off by default on ever= y network, including regtest:

p2mr bit 3 P2MR outputs
pqsi= g bit 4 PQ signature opcodes inside P2MR leaves

The opcodes redefi= ne OP_SUCCESSx 0xd0-0xd8, and only execute inside P2MR leaves:

OP_= CHECKMLSIG{,VERIFY,ADD} ML-DSA-44
OP_CHECKSLHSIG{,VERIFY,ADD} = SLH-DSA-SHA2-128s
OP_CHECKFALCONSIG{,VERIFY,ADD} Falcon-512

A= ll verification is done by liboqs 0.16.0, pinned and built as portable C (n= o AVX2/AVX-512 dispatch, no OpenSSL). The consensus code is a wrapper; it d= oes not implement the schemes itself.

Validation weights, derived fr= om a portable-build benchmark, are 150 (ML-DSA-44), 1100 (SLH-DSA-SHA2-128s= ) and 100 (Falcon-512), against 50 for Schnorr. In PQ-enabled leaves, eleme= nts over 520 bytes cannot be duplicated or hashed, so a large signature can= not be re-checked cheaply via OP_DUP. There is a signature cache for valid = PQ signatures.

On this implementation, the worst-case block of PQ ch= ecks went from about 2.9 s (ML-DSA, before the 520-byte rule) to 0.08 s (ML= -DSA), 0.26 s (SLH-DSA) and 0.09 s (Falcon-512) on one core.

To try = the prototype on regtest, start bitcoind with

-vbparams=3Dp2mr:0:9= 223372036854775807
-vbparams=3Dpqsig:0:9223372036854775807

and = mine 432 blocks (3 x 144, threshold 108/144).

Measured sizes
----= ----------

1-in/1-out spends, vsize from testmempoolaccept, weight f= rom getrawtransaction, recorded 30 November 2026:

Scheme = Pubkey Signature vsize weight vs P2TR
P2TR key-path = 32 B 64 B 111 vB 444 WU 1x
ML-DSA-44 131= 2 B 2420 B 1039 vB 4156 WU 9.36x
SLH-DSA-SHA2-128s 32 B= 7856 B 2077 vB 8307 WU 18.71x
Falcon-512 897 B = 666 B 497 vB 1986 WU 4.48x

Portable-build single-core veri= fy times, from the same test session, were about 67-73 us (ML-DSA-44), 476-= 514 us (SLH-DSA-SHA2-128s) and 34-37 us (Falcon-512), versus 27-34 us for B= IP-340 Schnorr.

Known issues and open questions
-----------------= --------------

These are the main points I would like views on. A lo= nger self-review is in docs/BIP-DRAFT.md in the repository.

* liboqs= is still an external research library. It is pinned and linked statically,= but it has not been audited for use in Bitcoin consensus, and liboqs itsel= f says it is not meant for production use without review.

* Falcon-5= 12 here is liboqs Falcon-padded-512, which is round-3 Falcon. It is not FIP= S 206 FN-DSA; that standard is not final, and hashing or encoding may diffe= r. If FIPS 206 is adopted later, these opcodes should not change meaning: a= new opcode or leaf version would be needed.

* Bytes 0xd0-0xd8 overl= ap Elements/Liquid tapscript opcodes in that range. A new leaf version for = PQ leaves may be a cleaner namespace than redefining OP_SUCCESSx.

* = Two deployments are soft-fork-safe in either order, but if p2mr activates f= irst, outputs whose leaves use 0xd0-0xd8 are anyone-can-spend until pqsig a= ctivates. A single combined deployment is an alternative.

* The port= able build has only been tested on x86-64 Linux (GCC 14). ARM, big-endian, = macOS and Windows have not been run.

* There is no wallet, descripto= r, or PSBT support. Spends are built by the Python test framework.

T= his is an unaudited regtest prototype. Consensus code can lose money if it = is wrong. I am asking for feedback, not for anyone to run this on mainnet o= r to treat it as a finished proposal.

Thank you for reading.

= Dark Inc / DarkincStudio

--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/= msgid/bitcoindev/CAMaSzvrT6NT4Fh8dg%2B0BxJ_M-MTPgqkEkyHcog5S7aRmYJR7qA%40ma= il.gmail.com.
--000000000000ae92a20661cd2ec5--