UltrafastSecp256k1/packaging
Vano Chkheidze 3105dc10d6
fix: schnorr parity, CFL hardening, MIT license (#48)
## Changes
- schnorr verify Y-parity fix
- CFL fuzz_point hardened (ASan/UBSan only, no arithmetic assertions)
- cmake sanitizer detection (no -O3 override in CFL builds)
- normalizes_to_zero full normalization for 52-bit path
- normalize_weak before zero-check in mixed-add
- inverse_safegcd + from_jac52 Z=0 guards
- MIT license migration (31 files AGPL -> MIT)
2026-02-27 19:45:10 +04:00
..
arch fix: schnorr parity, CFL hardening, MIT license (#48) 2026-02-27 19:45:10 +04:00
debian fix: schnorr parity, CFL hardening, MIT license (#48) 2026-02-27 19:45:10 +04:00
rpm fix: schnorr parity, CFL hardening, MIT license (#48) 2026-02-27 19:45:10 +04:00
README.md audit: add AUDIT_COVERAGE.md + ASCII cleanup + CT fixes 2026-02-25 19:14:21 +04:00

Linux Distribution Packaging

This directory contains packaging files for building native packages on various Linux distributions.

Debian / Ubuntu (.deb)

# Install build dependencies
sudo apt install debhelper cmake ninja-build g++ pkg-config

# Build package from source tarball
dpkg-buildpackage -us -uc -b
# -- or use CPack --
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DSECP256K1_BUILD_SHARED=ON -DSECP256K1_INSTALL=ON
cmake --build build
cd build && cpack -G DEB

Produces:

  • libufsecp3_<ver>_<arch>.deb -- shared library
  • libufsecp-dev_<ver>_<arch>.deb -- headers + static lib + cmake/pkgconfig

Fedora / RHEL / CentOS (.rpm)

# Install build dependencies
sudo dnf install cmake ninja-build gcc-c++ rpm-build

# Build RPM from spec
rpmbuild -ba packaging/rpm/libufsecp.spec
# -- or use CPack --
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DSECP256K1_BUILD_SHARED=ON -DSECP256K1_INSTALL=ON
cmake --build build
cd build && cpack -G RPM

Arch Linux (AUR)

# From the packaging/arch/ directory:
cd packaging/arch
makepkg -si

The PKGBUILD downloads the source tarball, builds with CMake+Ninja, runs tests, and installs to /usr.

Generic install (any distro)

cmake -S . -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DSECP256K1_BUILD_SHARED=ON \
    -DSECP256K1_INSTALL=ON \
    -DSECP256K1_INSTALL_PKGCONFIG=ON \
    -DSECP256K1_USE_ASM=ON
cmake --build build -j$(nproc)
ctest --test-dir build --output-on-failure
sudo cmake --install build
sudo ldconfig

After install, applications can find the library via:

  • pkg-config: pkg-config --cflags --libs ufsecp
  • CMake: find_package(ufsecp 3 REQUIRED)

Package naming convention

Distro Runtime Development
Debian/Ubuntu libufsecp3 libufsecp-dev
Fedora/RHEL libufsecp libufsecp-devel
Arch libufsecp (included in main package)