Better HN
topnewbestaskshowjobs
Log inSign up

shrecshrec

4 karma · joined Feb 11, 2026 (9mo ago) · 12 submissions

Submissions

comment 8mo ago · link · parent

i'm working on this two projects: https://github.com/shrec/Exorcist and https://github.com/shrec/UltrafastSecp256k1

2.

We Built UltrafastSecp256k1 Up to 51% Faster ECC Across x86,ARM64,and RISC-V

5 points · by shrecshrec · 9mo ago · discuss

comment 9mo ago · link · parent

UltrafastSecp256k1 is an open-source C++20 secp256k1 library built for throughput. No dependencies — no Boost, no OpenSSL. Just a conforming C++20 compiler.

GPU benchmarks (RTX 5060 Ti, kernel-level): • ECDSA Sign: 4.88 M/s (204.8 ns/op, RFC 6979 + low-S) • ECDSA Verify: 2.44 M/s (Shamir + GLV) • Schnorr Sign: 3.66 M/s (BIP-340) • Schnorr Verify: 2.82 M/s (BIP-340 + GLV) • Field Mul: 4,142 M/s (0.2 ns/op)

4 GPU backends: CUDA, OpenCL, Metal, ROCm (HIP). 12+ platform targets: x86-64, ARM64, RISC-V, WASM, iOS, Android, ESP32-S3, ESP32, STM32, plus all 4 GPU backends.

Key features: • Dual-layer security: variable-time FAST path for throughput, constant-time CT path for secret-key operations (no secret-dependent branches) • Stable C ABI (ufsecp) with 45 exported functions — FFI bindings for C#, Python, Go, Rust, Java, Node.js, Dart, PHP, Ruby, Swift, React Native • Full protocol coverage: ECDSA, Schnorr/BIP-340, ECDH, BIP-32/44, MuSig2/BIP-327, Taproot/BIP-341, FROST t-of-n, Pedersen commitments, adaptor signatures, batch verification • 5×52 field representation with __int128 lazy reduction (2.76× faster than 4×64) • Montgomery batch inverse on GPU: 1 inversion + 3(N-1) muls for N elements • Runs on ESP32-S3 in 2.5ms per scalar×G — fast enough for IoT signing

Packages available via npm, NuGet, RubyGems, Maven, and direct downloads for all other languages (pip-ready, cargo-ready, pub-ready, CocoaPods-ready).

Not audited — this is a research project. For production, use bitcoin-core/secp256k1. But if you need raw throughput across heterogeneous hardware, this might be useful.

AGPL-3.0 licensed.

https://github.com/shrec/UltrafastSecp256k1

4.

UltrafastSecp256k1 – 4.88M ECDSA signs/s on GPU zero dependencies 12 platforms(github.com ↗)

2 points · by shrecshrec · 9mo ago · 1 comment

comment 9mo ago · link · parent

I've built a comprehensive secp256k1 library in C++20 with zero external dependencies. Everything — SHA-256, SHA-512, Keccak-256, RIPEMD-160, Base58, Bech32 — is implemented from scratch.

Key highlights:

Assembly backends for x64 (MASM/GAS, BMI2/ADX), ARM64, RISC-V SIMD: AVX2/AVX-512 batch operations GPU: CUDA (4.63M kG/s), OpenCL, ROCm/HIP Constant-time layer with separate namespace (no runtime flag switching) Full protocol stack: ECDSA, Schnorr BIP-340, MuSig2, FROST, Adaptor sigs, Pedersen commitments Complete Bitcoin support: Taproot, Silent Payments, BIP-32/44, all address types 27+ cryptocurrency address generation with auto-dispatch Custom generator/curve context support Runs on: x64, ARM64, RISC-V, ESP32, STM32, WASM, iOS, Android 200+ tests, fuzz harnesses Design philosophy: hot paths are allocation-free, branchless where possible, with explicit buffers and fixed-size POD types. No exceptions/RTTI/virtual calls in compute paths

6.

UltrafastSecp256k1 Zero-dep C++20 secp256k1 with ASM,CUDA, 27 coins,MuSig2,FROST(github.com ↗)

2 points · by shrecshrec · 9mo ago · 1 comment

comment 9mo ago · link · parent

I will be glad to hire any suggestions from everyone abut future improvements and ideas.

comment 9mo ago · link · parent

I implemented a full secp256k1 engine from scratch in C++ and CUDA with zero external dependencies (no GMP, no OpenSSL).

The goal was to explore performance limits of:

Jacobian mixed-add

Batch inversion using Montgomery’s trick

Large-scale scalar stepping

GPU memory coalescing strategies

On RTX 5060 I’m getting ~2.5B mixed-add operations/sec.

Key design decisions:

Little-endian limb layout for hardware efficiency

Big-endian only for visualization

Deterministic memory layout

No dynamic allocation in hot paths

Would love feedback from people working on ECC or GPU math.

9.

Building a Zero-Dependency secp256k1 CUDA Engine from Scratch (2.5B ops/SEC)(github.com ↗)

2 points · by shrecshrec · 9mo ago · 2 comments