Build from source with no vendored binaries: - Remove prebuilt libzuptsdk.so / libpqvaptvupt.so (and a stray .pyc). The default build needs only a C compiler + make; it links no external library and installs no .so. The libzuptsdk-backed modes (Argon2id KDF, --pq-sdk, --pq-box) are gated behind an opt-in `make WITH_SDK=1`. The default password KDF is PBKDF2-SHA256 and --pq (native ML-KEM-768 + X25519) is the built-in PQ mode. openSUSE/RPM/deb/AUR/Homebrew/Nix recipes bumped to 4.1.0; the openSUSE spec now builds source-only (%files ships no .so, %build/%install WITH_SDK=0). Fix: multithreaded encrypted archives were unextractable on the native AEAD path. The parallel compress/decompress workers skipped the F-09 frame-preface AAD that the serial path and the archive's AAD_PREFACE flag bind into every block MAC, so each multithreaded block failed authentication. The workers now bind the preface via a shared serializer; output is byte-identical across thread counts and interoperates with single-threaded archives (also fixes `--kdf pbkdf2 -t N` in any build). Security hardening (crafted-archive memory safety + crypto): - LZH raw code-length stack overflow + huff_lut OOB write - overflow-safe bounds in parse_index and solid-mode extract (heap OOB read) - SEQ decoder safe-zone heap overflow (litlen+matchlen reserve) - require the per-block ENCRYPTED flag on encrypted archives (plaintext forgery) - cap archive-supplied PBKDF2 iteration count (KDF-amplification DoS) - non-elidable secret wipe in the SDK path; restored disk images created 0600 Docs: remove AUDIT.md / BENCHMARKS.md / ROADMAP.md; trim marketing/AI-styled text and correct KDF/PQ facts across README, SECURITY, INSTALL, DISTRIBUTION, THREAT_MODEL, THIRD-PARTY-NOTICES, the man page, and packaging READMEs. Wire format v1.6 unchanged.
64 lines
2.6 KiB
Shell
64 lines
2.6 KiB
Shell
# Maintainer: Cristian Cezar Moisés <sac@securityops.co>
|
|
#
|
|
# AUR submission instructions:
|
|
# 1. Run `make dist` upstream to produce zupt-VERSION.tar.gz.
|
|
# 2. Upload that tarball somewhere stable (GitHub release / git.securityops.co).
|
|
# 3. Update `source=()` URL and `sha256sums=()` below.
|
|
# 4. Run `makepkg --printsrcinfo > .SRCINFO` in this directory.
|
|
# 5. Commit and push to ssh://aur@aur.archlinux.org/zupt.git
|
|
#
|
|
# Test locally: `makepkg -s` in this directory after dropping a copy of the
|
|
# zupt-VERSION.tar.gz alongside the PKGBUILD.
|
|
|
|
pkgname=vaptvupt
|
|
pkgver=4.1.0
|
|
pkgrel=1
|
|
provides=('zupt')
|
|
replaces=('zupt')
|
|
conflicts=('zupt')
|
|
pkgdesc='Pure-C11 post-quantum backup compression utility (AES-256-CTR + HMAC-SHA256 + ML-KEM-768 + X25519)'
|
|
arch=('x86_64' 'aarch64')
|
|
url='https://git.securityops.co/cristiancmoises/zupt'
|
|
license=('AGPL-3.0-or-later')
|
|
depends=('glibc')
|
|
makedepends=('gcc')
|
|
checkdepends=('python')
|
|
|
|
# Replace SHA256 placeholder with output of:
|
|
# sha256sum /tmp/zupt-2.4.4.tar.gz
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://git.securityops.co/cristiancmoises/zupt/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "${pkgname}-${pkgver}"
|
|
# Strict-warning build that the project's own §6 verification matrix uses.
|
|
CFLAGS="${CFLAGS:--O2 -std=c11} -Wall -Wextra -Wpedantic" \
|
|
make -j"$(nproc)"
|
|
}
|
|
|
|
check() {
|
|
cd "${pkgname}-${pkgver}"
|
|
# Project regression suite — F-06 HMAC, F-08 top-MAC, F-09 byte sweep, etc.
|
|
make test
|
|
}
|
|
|
|
package() {
|
|
cd "${pkgname}-${pkgver}"
|
|
make DESTDIR="${pkgdir}" PREFIX=/usr install
|
|
|
|
# Docs that aren't part of `make install`
|
|
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
|
install -Dm644 SECURITY.md "${pkgdir}/usr/share/doc/${pkgname}/SECURITY.md"
|
|
install -Dm644 CHANGELOG.md "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG.md"
|
|
install -Dm644 AUDIT.md "${pkgdir}/usr/share/doc/${pkgname}/AUDIT.md"
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
# Vendored libzuptsdk shipped alongside the binary because the binary
|
|
# is linked with -Wl,-rpath,$ORIGIN/vendor/zuptsdk. For system install
|
|
# we move it to /usr/lib/zupt/ and the binary's rpath remains relative.
|
|
install -d "${pkgdir}/usr/lib/${pkgname}"
|
|
install -Dm755 vendor/zuptsdk/libzuptsdk.so.2.0.0 \
|
|
"${pkgdir}/usr/lib/${pkgname}/libzuptsdk.so.2.0.0"
|
|
ln -sf libzuptsdk.so.2.0.0 "${pkgdir}/usr/lib/${pkgname}/libzuptsdk.so.2"
|
|
ln -sf libzuptsdk.so.2.0.0 "${pkgdir}/usr/lib/${pkgname}/libzuptsdk.so"
|
|
}
|