UltrafastSecp256k1 v3.14.0

Archived from the original topic ↗

Added — Language Bindings (12 languages, 41-function C API parity)

  • Java — 22 new JNI functions + 3 helper classes (RecoverableSignature, WifDecoded, TaprootOutputKeyResult): full coverage of ECDSA sign/verify, DER encoding, recovery, ECDH, Schnorr, BIP-32, BIP-39, taproot, WIF, address encoding, tagged hash

  • Swift — 20 new functions: DER encode/decode, recovery sign/recover, ECDH, tagged hash, BIP-32/39, taproot, WIF, address encoding

  • React Native — 15 new functions: DER, recovery, ECDH, Schnorr, BIP-32/39, taproot, WIF, address, tagged hash

  • Python — 3 new functions: ctx_clone(), last_error(), last_error_msg()

  • Rust — 2 new functions: last_error(), last_error_msg()

  • Dart — 1 new function: ctx_clone()

  • Go, Node.js, C#, Ruby, PHP — already complete (verified, no changes needed)

  • 9 new binding READMEs — c_api, dart, go, java, php, python, ruby, rust, swift

  • Selftest report API — SelftestReport and SelftestCase structs in selftest.hpp; tally() refactored for programmatic reporting

Fixed — Documentation & Packaging

  • Package naming corrected across all documentation — libsecp256k1-fast* → libufsecp* (apt, rpm, arch); CMake target secp256k1-fast-cpu → secp256k1::fast; linker flag -lsecp256k1-fast-cpu → -lfastsecp256k1; pkg-config Libs -lsecp256k1-fast-cpu → -lfastsecp256k1

  • RPM spec renamed — libsecp256k1-fast.spec → libufsecp.spec

  • Debian control — source libufsecp, binary packages libufsecp3/libufsecp-dev

  • Arch PKGBUILD — pkgname=libufsecp, provides=('libufsecp')

  • 3 existing binding READMEs fixed — Node.js, C#, React Native: removed inaccurate CT-layer claims (C API uses fast:: path only)

  • README dead link — INDUSTRIAL_ROADMAP_WORKING.md → ROADMAP.md

Fixed — CI / Build

  • -Werror=unused-function — added [[maybe_unused]] to get_platform_string() in selftest.cpp

  • Scorecard CI — pinned ubuntu:24.04 by SHA digest in Dockerfile.local-ci

24 Febcreated
5 Marlast reply
9replies
2users

This sounds pretty cool, and I’d be interested to see how it performs in Hornet Node’s IBD. Do you have any benchmark results, e.g. how many signature verifications per second?

Links here in case you missed it: https://delvingbitcoin.org/t/hornet-utxo-1-a-custom-constant-time-highly-parallel-utxo-database/2201

↳ in reply to #2

hello please join to our Discord channel and we can discuss all detail you are interested. yes i have many banchmarks on different devices and platforms you also can see them on git repo but i have more new improovments that not released yet will be today or max in 2 days working on self code auditing to check and test all edge cases

↳ in reply to #4

4.88 M ECDSA signs/s * 2.44 M ECDSA verifies/s * 3.66 M Schnorr signs/s * 2.82 M Schnorr verifies/s – single GPU (RTX 5060 Ti) this is GPU benchmark

↳ in reply to #4

I think it would be helpful and meaningful if you showed like-for-like comparative performance between your optimized library and the baseline libsecp256k1 implementation used by Bitcoin Core for instance. A useful metric would be number of ECDSA verifications per second, and then some discussion of where performance gains were made and where the remaining bottlenecks are for bandwidth.

↳ in reply to #5

Nice that you have both CPU and GPU versions. Is the GPU version using CUDA, OpenCL, or some other platform, and is it vendor-specific?

↳ in reply to #8

i have all platform support CUD and OpenCL also Apple Metal too

Benchmark: UltrafastSecp256k1 vs libsecp256k1 on BIP-352 scanning pipeline