release: restore ZUPT and harden source-only 5.2.2

This commit is contained in:
Cristian Cezar Moisés 2026-08-31 14:14:36 -03:00
commit ff99770bd0
205 changed files with 19627 additions and 13215 deletions

View file

@ -1,56 +1,59 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
libzuptsdk licensing notice
===========================
Copyright (C) 2026 Cristian Cezar Moisés <zupt@riseup.net>
Copyright (C) 2025-2026 Cristian Cezar Moisés
libzuptsdk is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
The libzuptsdk compatibility wrapper, public header, bindings, tests, and build
integration carry this SPDX expression unless a file states otherwise:
libzuptsdk is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
AGPL-3.0-or-later
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see:
The shared and static libraries produced by `make sdk` also incorporate the
bundled VaptVupt compression codec sources identified at repository level by:
https://www.gnu.org/licenses/agpl-3.0.txt
https://www.gnu.org/licenses/agpl-3.0.html
GPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
The built library also contains the two xxHash-derived units identified by:
─────────────────────────────────────────────────────────────────────
BSD-2-Clause
ABOUT THIS LICENSE
It also contains pq-crystals/kyber-derived portions of native ML-KEM under the
upstream option selected by this distribution:
The GNU Affero General Public License v3 (AGPLv3) is a copyleft
license designed for software that may be run as a network service.
It is identical to the GNU General Public License v3, with one
additional requirement (Section 13): if you modify libzuptsdk and
make the modified version available to users over a computer network,
you must offer those users access to the corresponding modified
source code.
CC0-1.0
This protects libzuptsdk against being adopted by SaaS providers as
a private fork without contributing back, while keeping it freely
usable by individuals, small businesses, and the broader open-source
community.
It contains curve25519-donna-derived portions of native X25519 under:
If you write a separate program that is distributed alongside
libzuptsdk (for example, statically linking it into your own
application), the AGPL requires you to license that combined work
under the AGPL as well — which means you must publish the source.
If this is not acceptable for your use case, please contact the
author for commercial licensing options:
BSD-3-Clause
zupt@riseup.net
https://github.com/cristiancmoises/zupt
The built library therefore contains all five scopes and is described for package
metadata by:
─────────────────────────────────────────────────────────────────────
AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0
The full text of the GNU Affero General Public License version 3
should accompany this distribution as a separate file (or you may
download it from the URLs above). It is approximately 35 KB / 619
lines of plain text.
The complete, unmodified public license texts and applicable notices are in:
LICENSE-AGPL-3.0
LICENSE-GPL-3.0
LICENSE-BSD-2-Clause
LICENSE-BSD-3-Clause
LICENSE-CC0-1.0
LICENSE
NOTICE
THIRD-PARTY-NOTICES.md
Preserve per-file SPDX and copyright notices; they are authoritative for files
outside this summary. Published historical revisions may carry different
notices for their exact contents. This current notice does not revoke or
reinterpret a historical grant.
The in-tree libzuptsdk compatibility library is distinct from the separately
packaged system libvuptsdk used by the ZUPT CLI's optional `WITH_SDK=1`
integration.
The applicable copyright holder may offer controlled first-party rights under
a separately executed commercial agreement. This notice grants no commercial
permission and cannot relicense rights the licensor does not control.
Commercial licensing inquiries: sac@securityops.co
Canonical project: https://github.com/cristiancmoises/zupt

View file

@ -1,89 +1,97 @@
# ─────────────────────────────────────────────────────────────────────
# libzuptsdk — public C ABI for Zupt
# ─────────────────────────────────────────────────────────────────────
# SPDX-License-Identifier: AGPL-3.0-or-later
# Source-only build rules for the in-tree libzuptsdk compatibility SDK.
SDK_VERSION_MAJOR = 1
SDK_VERSION_MINOR = 0
SDK_VERSION_PATCH = 0
SDK_SOVERSION = $(SDK_VERSION_MAJOR)
SDK_FULLVERSION = $(SDK_VERSION_MAJOR).$(SDK_VERSION_MINOR).$(SDK_VERSION_PATCH)
SDK_SOVERSION = $(SDK_VERSION_MAJOR)
SDK_FULLVERSION = $(SDK_VERSION_MAJOR).$(SDK_VERSION_MINOR).$(SDK_VERSION_PATCH)
SDK_HDR = sdk/include/zuptsdk.h
SDK_SRC = sdk/src/zuptsdk.c
SDK_MAP = sdk/zuptsdk.map
SDK_PREFIX ?= /usr/local
SDK_HDR = sdk/include/zuptsdk.h
SDK_SRC = sdk/src/zuptsdk.c
SDK_MAP = sdk/zuptsdk.map
SDK_BUILD_DIR = sdk/build
SDK_PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
SDK_LICENSEDIR ?= $(PREFIX)/share/licenses/libzuptsdk
SDK_LICENSE_FILES = LICENSE LICENSE-AGPL-3.0 LICENSE-GPL-3.0 \
LICENSE-BSD-2-Clause LICENSE-BSD-3-Clause LICENSE-CC0-1.0 \
NOTICE THIRD-PARTY-NOTICES.md
# All zupt sources except main.c get rebuilt with -fPIC for the SDK.
# Object files go to sdk/build/ to avoid colliding with the CLI build.
SDK_BUILD_DIR = sdk/build
SDK_PIC_OBJS = $(patsubst src/%.c,$(SDK_BUILD_DIR)/%.o,$(filter-out src/zupt_main.c,$(ZUPT_SOURCES)))
SDK_PIC_OBJS += $(patsubst src/%.c,$(SDK_BUILD_DIR)/%.o,$(VV_SOURCES))
SDK_PIC_OBJS += $(SDK_BUILD_DIR)/zuptsdk.o
# All implementation sources are rebuilt from source as PIC. Objects are kept
# separate from the CLI build so `make -j` may build both safely.
SDK_PIC_OBJS = $(patsubst src/%.c,$(SDK_BUILD_DIR)/%.o,$(filter-out src/zupt_main.c,$(ZUPT_SOURCES)))
SDK_PIC_OBJS += $(patsubst src/%.c,$(SDK_BUILD_DIR)/%.o,$(VV_SOURCES))
SDK_PIC_OBJS += $(SDK_BUILD_DIR)/zuptsdk.o
SDK_PROJECT_CPPFLAGS = -DZUPT_BUILDING_SDK=1 -Isdk/include
SDK_PROJECT_CFLAGS = -fPIC
SDK_SHARED_LDFLAGS ?= -shared \
-Wl,-soname,libzuptsdk.so.$(SDK_SOVERSION) \
-Wl,--version-script,$(SDK_MAP)
SDK_PC_PRIVATE_LIBS ?= $(PROJECT_LDLIBS)
SDK_PIC_FLAGS = -fPIC -DZUPT_BUILDING_SDK=1
# VV files need SIMD flags too
SDK_PIC_VV_FLAGS = $(SDK_PIC_FLAGS) $(VV_SIMD_FLAGS)
SDK_SHARED = sdk/build/libzuptsdk.so.$(SDK_FULLVERSION)
SDK_SHARED_SO = sdk/build/libzuptsdk.so.$(SDK_SOVERSION)
SDK_SHARED_LINK = sdk/build/libzuptsdk.so
SDK_STATIC = sdk/build/libzuptsdk.a
SDK_PC = sdk/build/zuptsdk.pc
# Compile rule for SDK PIC objects (vv_* files need SIMD flags)
$(SDK_BUILD_DIR)/vv_%.o: src/vv_%.c | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CFLAGS) $(SDK_PIC_VV_FLAGS) -I include -c $< -o $@
$(SDK_BUILD_DIR)/vaptvupt_api.o: src/vaptvupt_api.c | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CFLAGS) $(SDK_PIC_FLAGS) -I include -c $< -o $@
$(SDK_BUILD_DIR)/%.o: src/%.c | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CFLAGS) $(SDK_PIC_FLAGS) -I include -c $< -o $@
$(SDK_BUILD_DIR)/zuptsdk.o: $(SDK_SRC) $(SDK_HDR) | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CFLAGS) $(SDK_PIC_FLAGS) -I sdk/include -I include -I src -c $< -o $@
SDK_SHARED = $(SDK_BUILD_DIR)/libzuptsdk.so.$(SDK_FULLVERSION)
SDK_SHARED_SO = $(SDK_BUILD_DIR)/libzuptsdk.so.$(SDK_SOVERSION)
SDK_SHARED_LINK = $(SDK_BUILD_DIR)/libzuptsdk.so
SDK_STATIC = $(SDK_BUILD_DIR)/libzuptsdk.a
SDK_PC = $(SDK_BUILD_DIR)/zuptsdk.pc
$(SDK_BUILD_DIR):
$(Q)mkdir -p $(SDK_BUILD_DIR)
$(Q)mkdir -p "$@"
# Keep ISA flags on the SHA-NI translation unit only. Runtime dispatch in the
# baseline SHA-256 implementation prevents execution on unsupported CPUs.
$(SDK_BUILD_DIR)/zupt_sha256_shani.o: src/zupt_sha256_shani.c $(HEADERS) | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CPPFLAGS) $(PROJECT_CPPFLAGS) $(SDK_PROJECT_CPPFLAGS) \
$(CFLAGS) $(PROJECT_CFLAGS) $(SDK_PROJECT_CFLAGS) $(SHANI_FLAGS) -c -o $@ $<
$(SDK_BUILD_DIR)/vv_%.o: src/vv_%.c $(HEADERS) | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CPPFLAGS) $(PROJECT_CPPFLAGS) $(SDK_PROJECT_CPPFLAGS) \
$(CFLAGS) $(PROJECT_CFLAGS) $(SDK_PROJECT_CFLAGS) $(VV_WARNING_FLAGS) \
$(if $(filter $(SDK_BUILD_DIR)/vv_decoder.o,$@),$(VV_DECODER_WARNING_FLAGS)) -c -o $@ $<
$(SDK_BUILD_DIR)/vaptvupt_api.o: src/vaptvupt_api.c $(HEADERS) | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CPPFLAGS) $(PROJECT_CPPFLAGS) $(SDK_PROJECT_CPPFLAGS) \
$(CFLAGS) $(PROJECT_CFLAGS) $(SDK_PROJECT_CFLAGS) $(VV_WARNING_FLAGS) -c -o $@ $<
$(SDK_BUILD_DIR)/%.o: src/%.c $(HEADERS) | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CPPFLAGS) $(PROJECT_CPPFLAGS) $(SDK_PROJECT_CPPFLAGS) \
$(CFLAGS) $(PROJECT_CFLAGS) $(SDK_PROJECT_CFLAGS) -c -o $@ $<
$(SDK_BUILD_DIR)/zuptsdk.o: $(SDK_SRC) $(SDK_HDR) $(HEADERS) | $(SDK_BUILD_DIR)
$(Q)$(CC) $(CPPFLAGS) $(PROJECT_CPPFLAGS) $(SDK_PROJECT_CPPFLAGS) \
$(CFLAGS) $(PROJECT_CFLAGS) $(SDK_PROJECT_CFLAGS) -c -o $@ $<
# Shared library
$(SDK_SHARED): $(SDK_PIC_OBJS) $(SDK_MAP) $(JAZZ_O)
@echo "[sdk-shared] $@"
$(Q)$(CC) -shared -fPIC \
-Wl,-soname,libzuptsdk.so.$(SDK_SOVERSION) \
-Wl,--version-script,$(SDK_MAP) \
$(LDFLAGS) \
$(SDK_PIC_OBJS) $(JAZZ_O) \
-o $@ $(LDLIBS)
$(Q)cd $(SDK_BUILD_DIR) && ln -sf $(notdir $(SDK_SHARED)) libzuptsdk.so.$(SDK_SOVERSION)
$(Q)cd $(SDK_BUILD_DIR) && ln -sf libzuptsdk.so.$(SDK_SOVERSION) libzuptsdk.so
$(Q)$(CC) $(CFLAGS) $(PROJECT_CFLAGS) $(SDK_PROJECT_CFLAGS) \
$(LDFLAGS) $(PROJECT_LDFLAGS) $(SDK_SHARED_LDFLAGS) \
$(SDK_PIC_OBJS) $(JAZZ_O) -o $@ $(PROJECT_LDLIBS) $(LDLIBS)
$(Q)cd "$(SDK_BUILD_DIR)" && ln -sf "$(notdir $(SDK_SHARED))" "$(notdir $(SDK_SHARED_SO))"
$(Q)cd "$(SDK_BUILD_DIR)" && ln -sf "$(notdir $(SDK_SHARED_SO))" "$(notdir $(SDK_SHARED_LINK))"
# Static library
$(SDK_STATIC): $(SDK_PIC_OBJS) $(JAZZ_O)
@echo "[sdk-static] $@"
$(Q)$(AR) rcs $@ $(SDK_PIC_OBJS) $(JAZZ_O)
$(Q)$(AR) $(ARFLAGS) $@ $(SDK_PIC_OBJS) $(JAZZ_O)
$(Q)$(RANLIB) $@
# pkg-config file
$(SDK_PC): $(SDK_HDR)
$(SDK_PC): $(SDK_HDR) | $(SDK_BUILD_DIR)
@echo "[sdk-pc] $@"
$(Q)mkdir -p $(SDK_BUILD_DIR)
$(Q)printf 'prefix=$(SDK_PREFIX)\n' > $@
$(Q)printf 'exec_prefix=$${prefix}\n' >> $@
$(Q)printf 'libdir=$${exec_prefix}/lib\n' >> $@
$(Q)printf 'includedir=$${prefix}/include\n\n' >> $@
$(Q)printf 'Name: zuptsdk\n' >> $@
$(Q)printf 'Description: Zupt backup compression SDK\n' >> $@
$(Q)printf 'URL: https://git.securityops.co/cristiancmoises/zupt\n' >> $@
$(Q)printf 'Version: $(SDK_FULLVERSION)\n' >> $@
$(Q)printf 'Libs: -L$${libdir} -lzuptsdk\n' >> $@
$(Q)printf 'Libs.private: -lpthread\n' >> $@
$(Q)printf 'Cflags: -I$${includedir}\n' >> $@
$(Q)printf '%s\n' \
'prefix=$(PREFIX)' \
'exec_prefix=$${prefix}' \
'libdir=$(LIBDIR)' \
'includedir=$(INCLUDEDIR)' \
'' \
'Name: zuptsdk' \
'Description: ZUPT source-built compatibility SDK' \
'URL: https://github.com/cristiancmoises/zupt' \
'Version: $(SDK_FULLVERSION)' \
'Libs: -L$${libdir} -lzuptsdk' \
'Libs.private: $(SDK_PC_PRIVATE_LIBS)' \
'Cflags: -I$${includedir}' > "$@"
# Convenience targets
.PHONY: sdk sdk-shared sdk-static sdk-pkgconfig sdk-clean sdk-install \
sdk-verify-symbols sdk-test
sdk-uninstall sdk-verify-symbols sdk-test
sdk: sdk-shared sdk-static sdk-pkgconfig
@ -94,48 +102,53 @@ sdk-static: $(SDK_STATIC)
sdk-pkgconfig: $(SDK_PC)
sdk-clean:
$(Q)rm -rf $(SDK_BUILD_DIR)
$(Q)rm -rf "$(SDK_BUILD_DIR)"
# Symbol leakage verification.
# Pass: every exported text symbol starts with `zuptsdk_`.
# Fail: any symbol that doesn't.
sdk-verify-symbols: $(SDK_SHARED)
@echo "[sdk-verify] checking exported symbols in $(SDK_SHARED)"
$(Q)leaked=$$(nm -D --defined-only $(SDK_SHARED) | grep ' T ' | awk '{print $$3}' | grep -v '^zuptsdk_' || true); \
if [ -n "$$leaked" ]; then \
echo "FAIL: non-zuptsdk symbols exported:"; \
echo "$$leaked"; \
exit 1; \
$(Q)set -eu; \
tmp=$$(mktemp -d "$${TMPDIR:-/tmp}/zupt-sdk-symbols.XXXXXXXX"); \
trap 'rm -rf -- "$$tmp"' EXIT HUP INT TERM; \
nm -D --defined-only "$(SDK_SHARED)" | awk '$$2 == "T" { print $$3 }' | \
sed 's/@.*//' | sort > "$$tmp/exported"; \
grep '^ zuptsdk_' "$(SDK_MAP)" | tr -d ' ;' | sort > "$$tmp/declared"; \
if grep -v '^zuptsdk_' "$$tmp/exported"; then \
echo "FAIL: non-zuptsdk symbols exported" >&2; exit 1; \
fi; \
expected=$$(grep -c '^ zuptsdk_' $(SDK_MAP)); \
exported=$$(nm -D --defined-only $(SDK_SHARED) | grep ' T ' | grep -c '^.* T zuptsdk_' || true); \
echo " $$exported exported / $$expected declared in version script"; \
if [ "$$exported" -lt "$$expected" ]; then \
echo "FAIL: $$((expected - exported)) declared symbols are missing from the .so"; \
nm -D --defined-only $(SDK_SHARED) | grep ' T ' | grep '^.* T zuptsdk_' | awk '{print $$3}' | sort > /tmp/exp; \
grep '^ zuptsdk_' $(SDK_MAP) | tr -d ' ;' | sort > /tmp/decl; \
diff /tmp/decl /tmp/exp; \
exit 1; \
fi; \
echo " PASS: no symbol leakage, all declared symbols exported"
diff -u "$$tmp/declared" "$$tmp/exported"; \
echo " PASS: no symbol leakage and all declared symbols are exported"
# Build & run roundtrip test
# Link and execute without embedding an RPATH. LD_LIBRARY_PATH is scoped to the
# disposable test process and never enters an installed binary.
sdk-test: $(SDK_SHARED)
@echo "[sdk-test] building and running roundtrip"
$(Q)$(CC) $(CFLAGS) -I sdk/include sdk/tests/test_sdk_roundtrip.c \
-Lsdk/build -lzuptsdk \
-Wl,-rpath,'$$ORIGIN/build' \
-o sdk/build/test_sdk_roundtrip $(LDLIBS)
$(Q)cd sdk && LD_LIBRARY_PATH=build ./build/test_sdk_roundtrip
$(Q)$(CC) $(CPPFLAGS) $(PROJECT_CPPFLAGS) -Isdk/include \
$(CFLAGS) $(PROJECT_CFLAGS) $(LDFLAGS) $(PROJECT_LDFLAGS) \
sdk/tests/test_sdk_roundtrip.c -L"$(SDK_BUILD_DIR)" -lzuptsdk \
-o "$(SDK_BUILD_DIR)/test_sdk_roundtrip" $(PROJECT_LDLIBS) $(LDLIBS)
$(Q)cd sdk && LD_LIBRARY_PATH=build "$$(pwd)/build/test_sdk_roundtrip"
sdk-install: sdk
install -d $(DESTDIR)$(SDK_PREFIX)/lib
install -d $(DESTDIR)$(SDK_PREFIX)/include
install -d $(DESTDIR)$(SDK_PREFIX)/lib/pkgconfig
install -m 0644 $(SDK_HDR) $(DESTDIR)$(SDK_PREFIX)/include/
install -m 0755 $(SDK_SHARED) $(DESTDIR)$(SDK_PREFIX)/lib/
cd $(DESTDIR)$(SDK_PREFIX)/lib && \
ln -sf libzuptsdk.so.$(SDK_FULLVERSION) libzuptsdk.so.$(SDK_SOVERSION) && \
ln -sf libzuptsdk.so.$(SDK_SOVERSION) libzuptsdk.so
install -m 0644 $(SDK_STATIC) $(DESTDIR)$(SDK_PREFIX)/lib/
install -m 0644 $(SDK_PC) $(DESTDIR)$(SDK_PREFIX)/lib/pkgconfig/
$(Q)install -d "$(DESTDIR)$(LIBDIR)" "$(DESTDIR)$(INCLUDEDIR)" \
"$(DESTDIR)$(SDK_PKGCONFIGDIR)" "$(DESTDIR)$(SDK_LICENSEDIR)"
$(Q)install -m 0644 "$(SDK_HDR)" "$(DESTDIR)$(INCLUDEDIR)/"
$(Q)install -m 0755 "$(SDK_SHARED)" "$(DESTDIR)$(LIBDIR)/"
$(Q)cd "$(DESTDIR)$(LIBDIR)" && \
ln -sf "libzuptsdk.so.$(SDK_FULLVERSION)" "libzuptsdk.so.$(SDK_SOVERSION)" && \
ln -sf "libzuptsdk.so.$(SDK_SOVERSION)" libzuptsdk.so
$(Q)install -m 0644 "$(SDK_STATIC)" "$(DESTDIR)$(LIBDIR)/"
$(Q)install -m 0644 "$(SDK_PC)" "$(DESTDIR)$(SDK_PKGCONFIGDIR)/"
$(Q)install -m 0644 $(SDK_LICENSE_FILES) "$(DESTDIR)$(SDK_LICENSEDIR)/"
$(Q)install -m 0644 sdk/LICENSE "$(DESTDIR)$(SDK_LICENSEDIR)/SDK-LICENSE"
sdk-uninstall:
$(Q)rm -f "$(DESTDIR)$(LIBDIR)/libzuptsdk.so.$(SDK_FULLVERSION)" \
"$(DESTDIR)$(LIBDIR)/libzuptsdk.so.$(SDK_SOVERSION)" \
"$(DESTDIR)$(LIBDIR)/libzuptsdk.so" \
"$(DESTDIR)$(LIBDIR)/libzuptsdk.a" \
"$(DESTDIR)$(INCLUDEDIR)/$(notdir $(SDK_HDR))" \
"$(DESTDIR)$(SDK_PKGCONFIGDIR)/$(notdir $(SDK_PC))"
$(Q)set -eu; for license_file in $(SDK_LICENSE_FILES); do \
rm -f "$(DESTDIR)$(SDK_LICENSEDIR)/$${license_file##*/}"; \
done
$(Q)rm -f "$(DESTDIR)$(SDK_LICENSEDIR)/SDK-LICENSE"

View file

@ -1,14 +1,19 @@
# libzuptsdk
Public C ABI for the [VaptVupt](https://git.securityops.co/cristiancmoises/vaptvupt) backup compression library.
Public C ABI for the [ZUPT](https://github.com/cristiancmoises/zupt) backup compression library.
Provides post-quantum encrypted compression as a stable, embeddable shared library, independent of the `vaptvupt` CLI and of any external compression library — everything is built from VaptVupt's own implementations.
Provides post-quantum encrypted compression as a stable, embeddable shared library, independent of the `zupt` CLI and of any external compression library — everything is built from ZUPT's own implementations.
- **Version:** 1.0.0
- **License:** AGPL-3.0-or-later
- **License of the built library:** AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0
- **ABI:** Stable across 1.x via versioned symbols (`ZUPTSDK_1.0`)
- **C standard:** Public header is C99; C11 implementation; works in C++17
This in-tree compatibility SDK is named **libzuptsdk**. It is not the separately
packaged **libvuptsdk** dependency used by the CLI's optional `WITH_SDK=1`
integration. Running `make sdk` builds `libzuptsdk` from this repository; it does
not enable `--pq-sdk` or the libvuptsdk-backed Argon2id path in `zupt`.
## Features
- **Hybrid post-quantum encryption** — ML-KEM-768 + X25519 KEM
@ -16,7 +21,7 @@ Provides post-quantum encrypted compression as a stable, embeddable shared libra
- **Hardware-adaptive compression** — VaptVupt on AVX2/NEON, LZHP elsewhere
- **Streaming I/O** — read/write callbacks for sockets, pipes, encrypted volumes
- **Secure memory** — mlock-backed buffers for passwords and keys, zeroed on destroy
- **Constant-time crypto** — Jasmin-verified assembly on x86_64
- **Optional assembly path** — textual Jasmin sources on supported x86_64 builds
- **Per-context state** — no globals; safe to use from any thread on distinct contexts
- **Custom allocator hooks** — supply your own malloc/free
@ -87,21 +92,35 @@ with zuptsdk.Context() as ctx:
## Build & install
```sh
git clone https://git.securityops.co/cristiancmoises/vaptvupt
cd vaptvupt
make # builds CLI (required: produces jasmin/*.o assembly objects)
git clone https://github.com/cristiancmoises/zupt
cd zupt
make # builds the portable CLI (WITH_JASMIN=0 by default)
make sdk # builds libzuptsdk.so.1.0.0 + libzuptsdk.a + zuptsdk.pc
make sdk-test # runs C roundtrip suite (15 tests)
sudo make sdk-install PREFIX=/usr/local
```
This SDK is built from source via `make sdk`; the previously vendored prebuilt `vendor/zuptsdk/libzuptsdk.so` has been removed from the tree.
This SDK is built from source via `make sdk`; the previously vendored prebuilt
`vendor/zuptsdk/libzuptsdk.so` has been removed from the tree. Build output is
written below the ignored `sdk/build/` directory and is never part of Git or an
upstream source archive.
The wrapper and application portions are AGPL-3.0-or-later. The library also
incorporates the bundled VaptVupt codec sources identified as
GPL-3.0-or-later, plus the BSD-2-Clause xxHash-derived routines and CC0-1.0
pq-crystals/kyber-derived ML-KEM portions, together with BSD-3-Clause
curve25519-donna-derived X25519 portions. Redistribution of the resulting
shared or static library must preserve all five scopes, `LICENSE-AGPL-3.0`,
`LICENSE-GPL-3.0`, `LICENSE-BSD-2-Clause`, `LICENSE-BSD-3-Clause`,
`LICENSE-CC0-1.0`, `NOTICE`, and `THIRD-PARTY-NOTICES.md`; see `sdk/LICENSE`
for the concise scope notice.
This installs:
- `/usr/local/include/zuptsdk.h`
- `/usr/local/lib/libzuptsdk.so.1.0.0` (with versioned `.so.1` and `.so` symlinks)
- `/usr/local/lib/libzuptsdk.a`
- `/usr/local/lib/pkgconfig/zuptsdk.pc`
- `/usr/local/share/licenses/libzuptsdk/` (all applicable texts and notices)
## Symbol visibility
@ -174,12 +193,17 @@ sdk/
## License
libzuptsdk is licensed under **AGPL-3.0-or-later** (see `sdk/LICENSE`).
The built libzuptsdk contains AGPL-3.0-or-later wrapper/application code and
GPL-3.0-or-later bundled codec code; its complete SPDX expression is
**AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND
CC0-1.0** (see `sdk/LICENSE`).
The AGPL allows everyone to use the library freely, but anyone running it as a network service must publish their source code modifications.
Redistributors must comply with the applicable terms and preserve all license
texts and notices. Consult the license texts rather than this summary for the
precise source-correspondence and network-use obligations.
## Contact
- Repository: https://git.securityops.co/cristiancmoises/vaptvupt
- Website: https://zupt.securityops.co
- Email: zupt@riseup.net
- Repository: https://github.com/cristiancmoises/zupt
- Project: https://github.com/cristiancmoises/zupt
- Email: sac@securityops.co

View file

@ -1,12 +1,11 @@
/*
* libzuptsdk Public C ABI for the Zupt backup compression library
* libzuptsdk Public C ABI for the ZUPT backup compression library
*
* Copyright (c) 2026 Cristian Cezar Moisés
* SPDX-License-Identifier: AGPL-3.0-or-later
*
* Repository: https://git.securityops.co/cristiancmoises/zupt
* Website: https://zupt.securityops.co
* Contact: zupt@riseup.net
* Repository: https://github.com/cristiancmoises/zupt
* Contact: sac@securityops.co
*
* --------------------------------------------------------------------------
* STABILITY GUARANTEE