BIP340 reference project
BIP340 specifies 64-byte Schnorr signatures over secp256k1. This reference project encodes BIP340 verification as a Longfellow circuit and keeps the application module outside the base library.
Module layout
bip340_witness.hconstructs the private and derived witness values.bip340_verify.hdefines the verification relation.bip340_guard.hchecks guarded conditions used by the circuit.bip340_test.cccovers the installed project target.
Consume the package
cmake
find_package(LongfellowZK CONFIG REQUIRED)
find_package(LongfellowZKBIP340 CONFIG REQUIRED)
target_link_libraries(app PRIVATE LongfellowZKBIP340::bip340)Like ECDSA, BIP340 is currently an interface library. Its public headers are compiled by the consuming C++20 project.
What this reference establishes
The project provides a concrete circuit, witness model, installable CMake target, and test boundary for BIP340 verification. It does not implement the Bitcoin consensus rules surrounding Taproot, transaction validation, wallet policy, multisignatures, or key management.