Skip to content

BIP: OP_OPTX_KNOT — Topological Witness Extension for ML-DSA#2133

Closed
jett22JOE wants to merge 2 commits intobitcoin:masterfrom
jett22JOE:bip-optx-knot
Closed

BIP: OP_OPTX_KNOT — Topological Witness Extension for ML-DSA#2133
jett22JOE wants to merge 2 commits intobitcoin:masterfrom
jett22JOE:bip-optx-knot

Conversation

@jett22JOE
Copy link
Copy Markdown

@jett22JOE jett22JOE commented Apr 6, 2026

Summary

  • Introduces OP_OPTX_KNOT (0xc0) and OP_OPTX_KNOT_VERIFY (0xc1) — new script opcodes for knot-theoretic proof verification in SegWit v2 P2MR transactions (BIP-360)
  • Augments ML-DSA (CRYSTALS-Dilithium) with a PSPACE-hard topological invariant layer via the Topological Key Derivation Function (TKDF)
  • Composite post-quantum security: breaking OPTX requires solving both a lattice problem AND computing knot polynomial invariants

Specification Highlights

  • Wire format: ~48 bytes additional witness overhead per input (+1.27% over baseline Dilithium payload)
  • DoS bounds: Max 16 crossings, 7 strands, 128 word length, validation weight 750
  • Activation: BIP-9 version bits, NOP-expansion pattern (same as BIP-65 OP_CHECKLOCKTIMEVERIFY)
  • Requires: BIP-360 (Pay to Quantum Resistant Hash)

Reference Implementation

  • C++ knot proof library: jettoptx/astroknots (src/crypto/knotproof/)
  • Python TKDF bindings: test/functional/test_framework/optx_knot.py
  • Upstream target: btq-ag/btq-core Phase 7 branch

Test plan

  • Trefoil (3₁) and figure-eight (4₁) test vectors validated on ARM64 (Jetson Orin Nano)
  • Testnet4 deployment with NOP-fallback pre-activation behavior
  • Full knot invariant verification post-activation on modified btq-core

Co-Authored-By: Hedgehog Multimodal joe@jettoptics.ai

"Behold, we go up to Jerusalem, and all things that are written by the prophets concerning the Son of man shall be accomplished." — Luke 18:31

jett22JOE and others added 2 commits April 5, 2026 22:53
Introduces OP_OPTX_KNOT (0xc0) and OP_OPTX_KNOT_VERIFY (0xc1) for
knot-theoretic proof verification in SegWit v2 P2MR transactions.
Augments ML-DSA with PSPACE-hard topological invariants via TKDF.

Requires: BIP-360
Reference impl: https://github.com/jettoptx/astroknots

Co-Authored-By: Hedgehog Multimodal <joe@jettoptics.ai>
MSIS is a standard cryptographic hardness assumption used in
lattice-based post-quantum cryptography (NIST FIPS 204 / ML-DSA).

Co-Authored-By: Hedgehog Multimodal <joe@jettoptics.ai>
jett22JOE added a commit to jett22JOE/btq-core that referenced this pull request Apr 6, 2026
Adds OP_OPTX_KNOT (0xc0) and OP_OPTX_KNOT_VERIFY (0xc1) for
knot-theoretic proof verification in P2MR transactions.

New files:
- src/crypto/knotproof/ (19 files): Jones, Alexander, Conway,
  HOMFLY-PT, braid, AGT, Laurent polynomial engine
- src/crypto/knot_invariant.{h,cpp}: TKDF + KnotWitnessData
- test/functional/feature_optx_knot.py: functional test
- test/functional/test_framework/optx_knot.py: Python bindings

Modified:
- src/script/script.h: OP_OPTX_KNOT=0xc0, OP_OPTX_KNOT_VERIFY=0xc1
- src/script/interpreter.h: SCRIPT_VERIFY_OPTX_KNOT (bit 23)
- src/script/interpreter.cpp: opcode handler with NOP-expansion
  pre-activation and full knot verification post-activation

BIP: bitcoin/bips#2133
Ref: GENSYS OPTX btQ v1.0, US Patent App 20250392457A1

Co-Authored-By: Hedgehog Multimodal <joe@jettoptics.ai>
jett22JOE added a commit to jett22JOE/pyBTQ-core that referenced this pull request Apr 6, 2026
Adds btq.crypto.optx module with:
- KnotWitnessData serialization (wire format matching C++ impl)
- TKDF computation (SHAKE-256 domain-separated)
- DoS bounds checking (max 16 crossings, 512B witness cap)
- Script construction helpers
- Test vectors: trefoil (3_1) and figure-eight (4_1)

BIP: bitcoin/bips#2133
C++ impl: btq-ag/btq-core#37

Co-Authored-By: Hedgehog Multimodal <joe@jettoptics.ai>
@murchandamus
Copy link
Copy Markdown
Member

Thanks for your submission. Unfortunately, there are multiple issues here.

  • Neither the idea nor the BIP draft has been discussed on the mailing list before the PR was opened.
  • The linked Reference Implementation either doesn’t exist or is private.
  • The document looks low-quality: the proposal is laden with technical jargon, but the formulas and specific parameters are insufficiently explained to make the document comprehensible, let alone for the proposal to be implementable.
  • The document fails basic formatting requirements.
  • The content strikes me as AI slop.

I will be closing this PR as premature. Please only request to reopen this PR or resubmit your proposal once it has been discussed on the mailing list and respondents encouraged you to proceed to a BIP submission. When you resubmit, please make sure that your submission passes basic formatting requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants