Updated: Docs
This commit is contained in:
parent
aae8418564
commit
19ab9f280d
3 changed files with 136 additions and 40 deletions
74
CHANGELOG.md
74
CHANGELOG.md
|
|
@ -5,44 +5,86 @@ Format follows [Keep a Changelog](https://keepachangelog.com/).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## [2.0.0] — 2026-03-29
|
## [2.0.0] — 2026-04-05
|
||||||
|
|
||||||
### Added — VaptVupt Codec Integration (Sprint 1)
|
### Added — VaptVupt 1.1.0 Codec Integration
|
||||||
- **VaptVupt codec** integrated as `0x0010` — LZ77 + tANS entropy + AVX2 SIMD decode.
|
- **VaptVupt codec** integrated as `0x0010` — LZ77 + tANS entropy + AVX2 SIMD decode.
|
||||||
- Three compression modes: Ultra-Fast (greedy), Balanced (lazy + 4-way ANS), Extreme (lazy-2 + order-1 context).
|
- Three compression modes: Ultra-Fast (greedy), Balanced (lazy + 4-way ANS), Extreme (lazy-2 + order-1 context).
|
||||||
|
- **Rep-match offset coding** — 3 recent offsets tracked (like zstd), saves 10–15 bits per repeated match.
|
||||||
|
- **Adaptive window selection** — trial-compresses at wlog=16 vs wlog=20, picks larger window only if ≥3% improvement.
|
||||||
- CLI flags `--vv` / `--vaptvupt` to select VaptVupt codec.
|
- CLI flags `--vv` / `--vaptvupt` to select VaptVupt codec.
|
||||||
|
- CLI flag `--lzhp` to explicitly select Zupt-LZHP codec.
|
||||||
- VaptVupt source files with dual MIT + Apache-2.0 headers.
|
- VaptVupt source files with dual MIT + Apache-2.0 headers.
|
||||||
- `vv_xxh64` aliased to `zupt_xxh64` via macro (no duplicate symbol).
|
- `vv_xxh64` aliased to `zupt_xxh64` via macro (no duplicate symbol).
|
||||||
- Wired into compress (ST, MT, solid) and decompress paths.
|
- Wired into compress (single-thread, multi-thread, solid) and decompress paths.
|
||||||
- 11 VaptVupt unit tests + 6 regression tests (T13–T18).
|
- 11 VaptVupt unit tests + 6 regression tests (T13–T18).
|
||||||
|
|
||||||
### Fixed — Jasmin Assembly (Sprint 2)
|
### Added — Auto Codec Detection
|
||||||
|
- **`ZUPT_CODEC_AUTO`** — hardware-aware default codec selection:
|
||||||
|
- x86_64 with AVX2: VaptVupt (inline AVX2 SIMD decode, ~2–3 GB/s).
|
||||||
|
- aarch64 with NEON: VaptVupt (NEON SIMD decode path).
|
||||||
|
- All other architectures: Zupt-LZHP (scalar decoder, no SIMD dependency).
|
||||||
|
- `zupt_resolve_auto_codec()` checks compile-time flags (`__AVX2__`, `__ARM_NEON`) and runtime CPUID.
|
||||||
|
- Decompression is universal — any archive extracts on any architecture regardless of codec.
|
||||||
|
- Users can override with `--vv` (force VaptVupt) or `--lzhp` (force LZHP).
|
||||||
|
|
||||||
|
### Fixed — Jasmin Assembly
|
||||||
- **AES-NI stack offset bug** fixed: replaced `stack u128[15]` with 15 individual `stack u128` variables to avoid jasminc byte-offset indexing. Round keys now at correct 16-byte aligned offsets.
|
- **AES-NI stack offset bug** fixed: replaced `stack u128[15]` with 15 individual `stack u128` variables to avoid jasminc byte-offset indexing. Round keys now at correct 16-byte aligned offsets.
|
||||||
- **X25519 fe_cswap** wired: Jasmin swaps first 4 limbs (32 bytes), C handles 5th limb.
|
- **X25519 fe_cswap** wired: Jasmin swaps first 4 limbs (32 bytes), C handles 5th limb.
|
||||||
- **All 4 Jasmin functions now active**: `zupt_mac_verify_ct`, `zupt_ct_select_32`, `zupt_fe_cswap`, `zupt_aes256_blk`.
|
- **All 5 Jasmin functions now active**: `zupt_mac_verify_ct`, `zupt_ct_select_32`, `zupt_fe_cswap`, `zupt_aes256_blk`, `zupt_aes256_ctr4`.
|
||||||
- AES-NI dispatch in `zupt_aes256_ctr()` with CPUID guard — eliminates table-based AES cache-timing on supported CPUs.
|
- **SIGILL fix: AVX detection with OSXSAVE/XCR0 check.** The Jasmin AES assembly uses VEX-encoded instructions (`vaesenc`, `vmovdqu`, `vpxor`) which require AVX — not just AES-NI. Previous dispatch only checked `has_aesni`, causing SIGILL on CPUs with AES-NI but without AVX or without OS XSAVE support. Now checks `has_aesni && has_avx` with proper XGETBV XCR0 validation.
|
||||||
|
- Added `has_avx` field to `zupt_cpu_features_t` with correct detection: CPUID ECX[28] (AVX) + ECX[27] (OSXSAVE) + XCR0 bits 1+2.
|
||||||
|
|
||||||
### Added — ACSL Formal Annotations (Sprint 3)
|
### Fixed — VaptVupt Codec Bugs
|
||||||
|
- **`copy_match_scalar` overlap corruption** (`vv_simd.c`): 8-byte bulk copy was used for offsets 4–7, where source overlaps destination by more than the copy stride. The `memcpy` read-then-write semantics don't correctly replicate the overlapping pattern. Fix: byte-by-byte for offsets < 8 (was < 4). This caused silent data corruption on inputs with short-offset matches near the output buffer tail.
|
||||||
|
- **`vva_encode_sequences` heap overflow** (`vv_ans.c`): litlen varint buffer allocated as `nseq * 5 + 1` bytes, but individual literal lengths in solid mode can reach 1 MB, requiring up to `ceil(litlen/255) + 1` bytes per varint. Fix: compute exact bound from actual litlen values. This caused heap corruption and abort (`malloc(): invalid size`) on large solid-mode archives.
|
||||||
|
|
||||||
|
### Added — ACSL Formal Annotations
|
||||||
- 19 security-critical functions annotated with complete `requires/ensures/assigns` ACSL contracts.
|
- 19 security-critical functions annotated with complete `requires/ensures/assigns` ACSL contracts.
|
||||||
- Covers: SHA-256, HMAC, PBKDF2, AES-256-CTR, key derivation, encrypt/decrypt, hybrid KEM, SHA3, SHAKE, ML-KEM-768, X25519, secure_wipe.
|
- Covers: SHA-256, HMAC, PBKDF2, AES-256-CTR, key derivation, encrypt/decrypt, hybrid KEM, SHA3, SHAKE, ML-KEM-768, X25519, secure_wipe.
|
||||||
- Target: `frama-c -wp -wp-rte -wp-model Typed+Cast`.
|
- Target: `frama-c -wp -wp-rte -wp-model Typed+Cast`.
|
||||||
|
|
||||||
### Added — Security Hardening (Sprint 4)
|
### Added — Security Hardening
|
||||||
- **mlock()** for key material — prevents swap to disk (Linux/BSD/Windows).
|
- **mlock()** for key material — prevents swap to disk (Linux/BSD/Windows).
|
||||||
- **Buffer canaries** on `zupt_keyring_t` — `canary_head`/`canary_tail` detect overflow, abort on corruption.
|
- **Buffer canaries** on `zupt_keyring_t` — `canary_head`/`canary_tail` detect overflow, abort on corruption.
|
||||||
- **Always-decrypt timing mitigation** — `zupt_decrypt_buffer()` always decrypts even on MAC failure (then wipes), preventing timing oracle.
|
- **Always-decrypt timing mitigation** — `zupt_decrypt_buffer()` always decrypts even on MAC failure (then wipes), preventing timing oracle.
|
||||||
- **AFL++ fuzzing harnesses** — `fuzz_decompress.c` (archive format) and `fuzz_vv_decompress.c` (VaptVupt codec). `make fuzz-build`.
|
- **AFL++ fuzzing harnesses** — `fuzz_decompress.c` (archive format) and `fuzz_vv_decompress.c` (VaptVupt codec). `make fuzz-build`.
|
||||||
|
|
||||||
### Added — Performance (Sprint 5)
|
### Added — Performance
|
||||||
- **AES-NI 4-block pipeline** — `zupt_aes256_ctr4` interleaves 4 counter blocks per AES round for pipeline saturation.
|
- **AES-NI 4-block pipeline** — `zupt_aes256_ctr4` interleaves 4 counter blocks per AES round for pipeline saturation.
|
||||||
- **Multi-threaded decompression** — non-solid extract dispatches blocks to N worker threads via existing `zpar_ctx_t` infrastructure.
|
- **Multi-threaded decompression** — non-solid extract dispatches blocks to N worker threads via `zpar_ctx_t` infrastructure.
|
||||||
- **Adaptive compression** — `zupt_detect_filetype()` identifies 16+ file formats by magic bytes; already-compressed files get STORE.
|
- **Adaptive compression** — `zupt_detect_filetype()` identifies 16+ file formats by magic bytes; already-compressed files get STORE.
|
||||||
- **Benchmark harness** — `zupt bench --compare` tests all codecs + auto-detects gzip/lz4/zstd.
|
- **Benchmark harness** — `zupt bench --compare` tests all codecs + auto-detects gzip/lz4/zstd.
|
||||||
|
|
||||||
### Changed — Default Codec (Sprint 6)
|
### Changed — Multi-Architecture Support
|
||||||
- **VaptVupt is now the default codec** (`zupt_default_options` sets `ZUPT_CODEC_VAPTVUPT`).
|
- **Makefile rewritten** for full multi-arch builds: x86_64, aarch64, armhf, ppc64le, s390x, riscv64.
|
||||||
- Previous default Zupt-LZHP remains available. Old archives decompress unchanged.
|
- Jasmin CT assembly: x86_64 only (C fallback on all others).
|
||||||
- Version bumped to 2.0.0.
|
- AVX2 SIMD decode: x86_64 only. NEON decode: aarch64. Scalar fallback: everywhere.
|
||||||
|
- `LDFLAGS` honored on link line for PIE linking (`-pie -Wl,-z,relro,-z,now`).
|
||||||
|
- `LDLIBS` placed after objects (correct rpmlint/OBS link order).
|
||||||
|
- `DESTDIR` support for staged packaging installs.
|
||||||
|
- Man page `doc/zupt.1` compressed and installed to `$(MANDIR)/man1/zupt.1.gz`.
|
||||||
|
- Verbose build with `make V=1`.
|
||||||
|
- `make help` shows available targets and detected architecture capabilities.
|
||||||
|
- AVX2 detection gates `has_avx2` on `has_avx` (OS XSAVE must be enabled).
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
- **70 tests total:** 11 VV unit + 13 NIST/RFC vectors + 22 regression + 14 multi-threaded + 10 post-quantum.
|
||||||
|
- ASAN clean across all modes (normal, encrypted, solid, threaded, PQ).
|
||||||
|
- All 5 Jasmin symbols linked (confirmed via `nm`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [1.5.5] — 2026-04-01
|
||||||
|
|
||||||
|
### Fixed — Makefile & Packaging
|
||||||
|
- Added man page installation (`doc/zupt.1` → `zupt.1.gz` in `$(MAN1DIR)`).
|
||||||
|
- Enabled verbose build output with `V=1` support.
|
||||||
|
- Fixed Makefile to honor `LDFLAGS` and support PIE linking.
|
||||||
|
- Improved rpmlint compliance for OBS/openSUSE packaging.
|
||||||
|
- Jasmin assembly gated to x86_64 only (`ifeq ($(ARCH),x86_64)`) — clean build on aarch64/armhf/ppc64le.
|
||||||
|
- Object files excluded from distribution tarballs.
|
||||||
|
- `install.sh` convenience installer restored.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -174,7 +216,9 @@ All 4 `.jazz` files rewritten to fix compilation errors:
|
||||||
|
|
||||||
| Version | Key Change | Tests |
|
| Version | Key Change | Tests |
|
||||||
|---------|-----------|-------|
|
|---------|-----------|-------|
|
||||||
| **1.5.0** | Jasmin assembly linked: MAC verify + ML-KEM select **active** in binary | 53+13 PASS |
|
| **2.0.0** | VaptVupt 1.1.0 codec, auto codec detection, all 5 Jasmin wired, AVX SIGILL fix, multi-arch, copy_match fix, litlen overflow fix | 70 PASS |
|
||||||
|
| **1.5.5** | Man page install, V=1 verbose, LDFLAGS/PIE, rpmlint, multi-arch Makefile | 53+13 PASS |
|
||||||
|
| **1.5.0** | Jasmin assembly linked: MAC verify + ML-KEM select active in binary | 53+13 PASS |
|
||||||
| **1.4.0** | All 4 `.jazz` files compile on jasminc 2026.03.0 | 53+13 PASS |
|
| **1.4.0** | All 4 `.jazz` files compile on jasminc 2026.03.0 | 53+13 PASS |
|
||||||
| **1.3.0** | ACSL predicates, security review, partial Jasmin fixes | 53+13 PASS |
|
| **1.3.0** | ACSL predicates, security review, partial Jasmin fixes | 53+13 PASS |
|
||||||
| **1.2.0** | CPUID detection, Jasmin source files (with errors) | 53+13 PASS |
|
| **1.2.0** | CPUID detection, Jasmin source files (with errors) | 53+13 PASS |
|
||||||
|
|
|
||||||
99
README.md
99
README.md
|
|
@ -8,19 +8,20 @@
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
Backup compression with the VaptVupt codec, AES-256 authenticated encryption, and post-quantum key encapsulation. Pure C11, zero dependencies, ~12,000 lines.
|
Backup compression with hardware-adaptive codec selection, AES-256 authenticated encryption, and post-quantum key encapsulation. Pure C11, zero dependencies, ~12,000 lines. Builds and runs on x86_64, aarch64, armhf, ppc64le, s390x, and riscv64.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Why Zupt
|
## Why Zupt
|
||||||
|
|
||||||
- **VaptVupt codec** — LZ77 + tANS entropy coding with AVX2 SIMD decode. Decompresses 2–3× faster than the previous Zupt-LZHP codec and matches gzip-level ratios with better decode throughput.
|
- **Hardware-adaptive codec** — auto-detects AVX2/NEON at runtime and selects the best codec: VaptVupt (LZ77 + tANS + SIMD decode) on capable hardware, Zupt-LZHP on everything else. Override with `--vv` or `--lzhp`.
|
||||||
- **Post-quantum encryption** — `--pq` mode uses ML-KEM-768 + X25519 hybrid KEM (same approach as Signal and iMessage). Protects against "harvest now, decrypt later" quantum attacks.
|
- **Post-quantum encryption** — `--pq` mode uses ML-KEM-768 + X25519 hybrid KEM (same approach as Signal and iMessage). Protects against "harvest now, decrypt later" quantum attacks.
|
||||||
- **AES-NI hardware acceleration** — AES-256-CTR via Jasmin-verified assembly with 4-block interleaved pipeline. No table-based AES on supported CPUs — eliminates cache-timing side channels.
|
- **AES-NI hardware acceleration** — AES-256-CTR via Jasmin-verified assembly with 4-block interleaved pipeline. Safe AVX detection with OSXSAVE/XCR0 validation — no SIGILL on any CPU. Falls back to C table-based AES on unsupported hardware.
|
||||||
- **Multi-threaded** — Compression and decompression both parallelized. `-t 0` auto-detects cores.
|
- **Multi-threaded** — Compression and decompression both parallelized. `-t 0` auto-detects cores.
|
||||||
- **Encrypted backups in one command** — `zupt compress -p backup.zupt ~/data/` — AES-256 + HMAC-SHA256, file names hidden.
|
- **Encrypted backups in one command** — `zupt compress -p changeme backup.zupt ~/data/` — AES-256 + HMAC-SHA256, file names hidden.
|
||||||
- **Per-block integrity** — XXH64 checksum + HMAC-SHA256 per block. Wrong password rejected instantly.
|
- **Per-block integrity** — XXH64 checksum + HMAC-SHA256 per block. Wrong password rejected instantly.
|
||||||
- **Formally verified crypto** — 5 Jasmin assembly functions with constant-time proofs. 19 ACSL-annotated functions for Frama-C memory safety analysis.
|
- **Formally verified crypto** — 5 Jasmin assembly functions with constant-time proofs. 19 ACSL-annotated functions for Frama-C memory safety analysis.
|
||||||
|
- **Multi-architecture** — builds on x86_64, aarch64, armhf, ppc64le, s390x, riscv64. Jasmin CT crypto on x86_64, C fallback everywhere else. Any archive decompresses on any architecture.
|
||||||
- **Zero dependencies** — ML-KEM, X25519, Keccak, SHA-256, AES-256, HMAC, PBKDF2, VaptVupt codec — all pure C11. Builds with `gcc` or `cl` alone.
|
- **Zero dependencies** — ML-KEM, X25519, Keccak, SHA-256, AES-256, HMAC, PBKDF2, VaptVupt codec — all pure C11. Builds with `gcc` or `cl` alone.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -52,7 +53,7 @@ zypper refresh && zypper install zupt
|
||||||
|
|
||||||
### Basic usage
|
### Basic usage
|
||||||
```bash
|
```bash
|
||||||
# Compress (VaptVupt codec, default)
|
# Compress (auto-selects best codec for your hardware)
|
||||||
zupt compress backup.zupt ~/Documents/
|
zupt compress backup.zupt ~/Documents/
|
||||||
|
|
||||||
# Compress with password encryption
|
# Compress with password encryption
|
||||||
|
|
@ -70,9 +71,26 @@ zupt extract --pq mykey.key -o ~/restored/ backup.zupt
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Auto Codec Detection
|
||||||
|
|
||||||
|
Zupt v2.0.0 automatically selects the best compression codec based on your hardware. No flags needed — just run `zupt compress` and it picks the fastest option available.
|
||||||
|
|
||||||
|
| Architecture | SIMD Available | Default Codec | Decode Throughput |
|
||||||
|
|---|---|---|---|
|
||||||
|
| x86_64 + AVX2 | AVX2 inline SIMD | **VaptVupt** | ~2–3 GB/s |
|
||||||
|
| x86_64 (no AVX2) | Scalar | Zupt-LZHP | ~500 MB/s |
|
||||||
|
| aarch64 + NEON | NEON SIMD | **VaptVupt** | ~1–2 GB/s |
|
||||||
|
| armhf, ppc64le, s390x, riscv64 | Scalar | Zupt-LZHP | ~300–500 MB/s |
|
||||||
|
|
||||||
|
**Decompression is universal.** An archive created with VaptVupt on x86_64 extracts on aarch64 (using NEON or scalar decode), and vice versa. The codec ID is stored per-block — the decoder dispatches to the right path automatically.
|
||||||
|
|
||||||
|
Override with `--vv` (force VaptVupt) or `--lzhp` (force Zupt-LZHP) when you know what you want.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## VaptVupt Codec
|
## VaptVupt Codec
|
||||||
|
|
||||||
VaptVupt is Zupt's default compression codec since v2.0.0. It combines LZ77 dictionary matching with tANS (table-based Asymmetric Numeral Systems) entropy coding and AVX2 SIMD-accelerated decompression.
|
VaptVupt is Zupt's high-performance compression codec. It combines LZ77 dictionary matching with tANS (table-based Asymmetric Numeral Systems) entropy coding and SIMD-accelerated decompression.
|
||||||
|
|
||||||
### Architecture
|
### Architecture
|
||||||
|
|
||||||
|
|
@ -81,6 +99,7 @@ Encoder: Hash-chain LZ77 → 5-byte multiply-shift hash, rep-match (3 recent off
|
||||||
lazy-2 parsing, AVX2 match extension (32 bytes/cycle)
|
lazy-2 parsing, AVX2 match extension (32 bytes/cycle)
|
||||||
Entropy: Canonical Huffman | tANS | 4-way interleaved ANS | order-1 context model
|
Entropy: Canonical Huffman | tANS | 4-way interleaved ANS | order-1 context model
|
||||||
Decoder: AVX2 inline SIMD copies, tiered by offset (32/16/8/overlap), safe-zone fast path
|
Decoder: AVX2 inline SIMD copies, tiered by offset (32/16/8/overlap), safe-zone fast path
|
||||||
|
NEON SIMD on aarch64, scalar fallback on all architectures
|
||||||
```
|
```
|
||||||
|
|
||||||
### Three modes
|
### Three modes
|
||||||
|
|
@ -112,9 +131,10 @@ VaptVupt's architectural advantages over traditional Huffman-based codecs:
|
||||||
|
|
||||||
- **tANS entropy** — asymptotically optimal coding with single-instruction decode per symbol (vs Huffman's multi-step tree walk)
|
- **tANS entropy** — asymptotically optimal coding with single-instruction decode per symbol (vs Huffman's multi-step tree walk)
|
||||||
- **4-way interleaved ANS** — decodes 4 symbols per bitstream refill cycle, reducing refill overhead by 4×
|
- **4-way interleaved ANS** — decodes 4 symbols per bitstream refill cycle, reducing refill overhead by 4×
|
||||||
- **AVX2 SIMD decode** — inline 32-byte copies with tiered offset handling (no function-pointer dispatch)
|
- **AVX2/NEON SIMD decode** — inline 32-byte copies with tiered offset handling (no function-pointer dispatch). Falls back to scalar on unsupported hardware.
|
||||||
- **Rep-match** — checks 3 recent offsets before hash probe (O(1) vs O(chain_depth)), hits ~30% of matches
|
- **Rep-match** — checks 3 recent offsets before hash probe (O(1) vs O(chain_depth)), hits ~30% of matches. Saves 10–15 bits per repeated offset.
|
||||||
- **Order-1 context model** — captures byte-pair correlations in structured data (JSON, CSV, logs)
|
- **Order-1 context model** — captures byte-pair correlations in structured data (JSON, CSV, logs)
|
||||||
|
- **Adaptive window** — trial-compresses at wlog=16 vs wlog=20, picks larger window only if ≥3% improvement
|
||||||
- **~4,200 lines** of pure C11 — auditable, portable, no external dependencies
|
- **~4,200 lines** of pure C11 — auditable, portable, no external dependencies
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -135,11 +155,32 @@ Public key → ML-KEM-768 Encaps + X25519 ECDH → hybrid shared secret
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Multi-Architecture Support
|
||||||
|
|
||||||
|
Zupt builds and runs on all major architectures. The Makefile auto-detects the platform and enables the best available features.
|
||||||
|
|
||||||
|
| Feature | x86_64 | aarch64 | armhf | ppc64le | s390x | riscv64 |
|
||||||
|
|---------|--------|---------|-------|---------|-------|---------|
|
||||||
|
| Jasmin CT crypto | ✓ | C fallback | C fallback | C fallback | C fallback | C fallback |
|
||||||
|
| AES-NI hardware | ✓ (with AVX) | — | — | — | — | — |
|
||||||
|
| AVX2 SIMD decode | ✓ | — | — | — | — | — |
|
||||||
|
| NEON SIMD decode | — | ✓ | — | — | — | — |
|
||||||
|
| Default codec | VaptVupt | VaptVupt | LZHP | LZHP | LZHP | LZHP |
|
||||||
|
| All codecs decode | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
|
||||||
|
Build for packaging (PIE, hardening flags):
|
||||||
|
```bash
|
||||||
|
make CFLAGS="-Wall -Wextra -O2 -std=c11 -fPIE -Iinclude -Isrc" LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
||||||
|
make install DESTDIR=/buildroot
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Feature Comparison
|
## Feature Comparison
|
||||||
|
|
||||||
| Feature | Zupt v2.0 | gzip | zstd | 7-Zip |
|
| Feature | Zupt v2.0 | gzip | zstd | 7-Zip |
|
||||||
|---------|-----------|------|------|-------|
|
|---------|-----------|------|------|-------|
|
||||||
| Default codec | VaptVupt (ANS) | DEFLATE | FSE+Huffman | LZMA2 |
|
| Default codec | VaptVupt/LZHP (auto) | DEFLATE | FSE+Huffman | LZMA2 |
|
||||||
| Post-quantum encryption | **ML-KEM-768** | — | — | — |
|
| Post-quantum encryption | **ML-KEM-768** | — | — | — |
|
||||||
| Password encryption | AES-256 + HMAC | — | — | AES-256 |
|
| Password encryption | AES-256 + HMAC | — | — | AES-256 |
|
||||||
| AES-NI hardware accel | **Jasmin-verified** | — | — | — |
|
| AES-NI hardware accel | **Jasmin-verified** | — | — | — |
|
||||||
|
|
@ -149,6 +190,7 @@ Public key → ML-KEM-768 Encaps + X25519 ECDH → hybrid shared secret
|
||||||
| Formal verification | **Jasmin CT + ACSL** | — | — | — |
|
| Formal verification | **Jasmin CT + ACSL** | — | — | — |
|
||||||
| mlock() key protection | ✓ | — | — | — |
|
| mlock() key protection | ✓ | — | — | — |
|
||||||
| AFL++ fuzz harness | ✓ | — | ✓ | — |
|
| AFL++ fuzz harness | ✓ | — | ✓ | — |
|
||||||
|
| Multi-architecture | **6 arches** | ✓ | ✓ | ✓ |
|
||||||
| Zero dependencies | ✓ | ✓ | — | — |
|
| Zero dependencies | ✓ | ✓ | — | — |
|
||||||
| Codebase | ~12K lines | ~10K | ~75K | ~100K+ |
|
| Codebase | ~12K lines | ~10K | ~75K | ~100K+ |
|
||||||
| License | MIT | GPL | BSD | LGPL |
|
| License | MIT | GPL | BSD | LGPL |
|
||||||
|
|
@ -163,6 +205,7 @@ PQ hybrid mode: Public key → ML-KEM-768 Encaps + X25519 ECDH → enc_key + mac
|
||||||
Per-block: AES-256-CTR(enc_key, nonce ⊕ seq) + HMAC-SHA256(mac_key)
|
Per-block: AES-256-CTR(enc_key, nonce ⊕ seq) + HMAC-SHA256(mac_key)
|
||||||
Key protection: mlock() prevents swap, buffer canaries detect overflow
|
Key protection: mlock() prevents swap, buffer canaries detect overflow
|
||||||
Timing: Always-decrypt mitigation (no timing oracle on MAC failure)
|
Timing: Always-decrypt mitigation (no timing oracle on MAC failure)
|
||||||
|
AES dispatch: AVX+AES-NI check with OSXSAVE/XCR0 (no SIGILL on any CPU)
|
||||||
Verification: 5 Jasmin CT proofs, 19 ACSL contracts, 13 NIST/RFC test vectors
|
Verification: 5 Jasmin CT proofs, 19 ACSL contracts, 13 NIST/RFC test vectors
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -185,14 +228,15 @@ zupt help
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
|--------|-------------|
|
|--------|-------------|
|
||||||
| `-l <1-9>` | Compression level (default: 7, VaptVupt balanced) |
|
| `-l <1-9>` | Compression level (default: 7) |
|
||||||
| `-t <N>` | Thread count (0=auto, 1=single, 2–64) |
|
| `-t <N>` | Thread count (0=auto, 1=single, 2–64) |
|
||||||
| `-p [PW]` | Password encryption (PBKDF2 → AES-256) |
|
| `-p [PW]` | Password encryption (PBKDF2 → AES-256) |
|
||||||
| `--pq <keyfile>` | Post-quantum hybrid encryption |
|
| `--pq <keyfile>` | Post-quantum hybrid encryption |
|
||||||
| `-o <DIR>` | Output directory (extract) |
|
| `-o <DIR>` | Output directory (extract) |
|
||||||
| `-s` | Store without compression |
|
| `-s` | Store without compression |
|
||||||
| `-f` | Fast LZ codec (Zupt-LZ) |
|
| `-f` | Fast LZ codec (Zupt-LZ) |
|
||||||
| `--vv` | VaptVupt codec (default since v2.0) |
|
| `--vv` | Force VaptVupt codec |
|
||||||
|
| `--lzhp` | Force Zupt-LZHP codec |
|
||||||
| `-v` | Verbose |
|
| `-v` | Verbose |
|
||||||
| `--solid` | Solid mode (cross-file LZ context) |
|
| `--solid` | Solid mode (cross-file LZ context) |
|
||||||
| `--compare` | Codec comparison benchmark |
|
| `--compare` | Codec comparison benchmark |
|
||||||
|
|
@ -202,11 +246,14 @@ zupt help
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make # Linux/macOS (auto-detects Jasmin .s files + AVX2)
|
make # Auto-detects arch, Jasmin, AVX2
|
||||||
make test-all # 22 regression + 13 NIST vectors + 11 VV unit tests
|
make V=1 # Verbose build output
|
||||||
|
make test-all # 70 tests: regression + NIST + VV + MT + PQ
|
||||||
make test-vv # VaptVupt codec unit tests only
|
make test-vv # VaptVupt codec unit tests only
|
||||||
make test-asan # AddressSanitizer + UBSan build
|
make test-asan # AddressSanitizer + UBSan build
|
||||||
make fuzz-build # AFL++ fuzzing harnesses
|
make fuzz-build # AFL++ fuzzing harnesses
|
||||||
|
make install # Install binary + man page
|
||||||
|
make help # Show all targets + detected capabilities
|
||||||
build.bat # Windows (MSVC)
|
build.bat # Windows (MSVC)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -221,15 +268,15 @@ zupt bench --compare ~/Documents/ # Compare codecs on your own data
|
||||||
|
|
||||||
## Codec Reference
|
## Codec Reference
|
||||||
|
|
||||||
| ID | Name | Algorithm | When to use |
|
| ID | Name | Algorithm | Default on | Override |
|
||||||
|----|------|-----------|-------------|
|
|----|------|-----------|------------|----------|
|
||||||
| `0x0010` | **VaptVupt** (default) | LZ77 + tANS + AVX2 SIMD | General use — best speed/ratio tradeoff |
|
| `0x0010` | **VaptVupt** | LZ77 + tANS + AVX2/NEON SIMD | x86_64 (AVX2), aarch64 (NEON) | `--vv` |
|
||||||
| `0x000A` | Zupt-LZHP | LZ77 + Huffman + byte prediction | Legacy (v1.x default), slightly better ratio on some data |
|
| `0x000A` | **Zupt-LZHP** | LZ77 + Huffman + byte prediction | armhf, ppc64le, s390x, riscv64 | `--lzhp` |
|
||||||
| `0x0009` | Zupt-LZH | LZ77 + Huffman | Legacy, no prediction preprocessor |
|
| `0x0009` | Zupt-LZH | LZ77 + Huffman | — | — |
|
||||||
| `0x0008` | Zupt-LZ | Fast LZ77, 64KB window | Speed priority (`-f` flag) |
|
| `0x0008` | Zupt-LZ | Fast LZ77, 64KB window | — | `-f` |
|
||||||
| `0x0000` | Store | No compression | Incompressible data (`-s` flag) |
|
| `0x0000` | Store | No compression | — | `-s` |
|
||||||
|
|
||||||
All codecs are forward-compatible: archives created with any codec can be read by any Zupt version that includes that codec. VaptVupt archives require Zupt v2.0+.
|
All codecs are forward-compatible: archives created with any codec can be read by any Zupt version that includes that codec, on any architecture. VaptVupt archives require Zupt v2.0+.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -240,13 +287,17 @@ All codecs are forward-compatible: archives created with any codec can be read b
|
||||||
| v0.1–v0.6 | LZ77 compression, AES-256 encryption, multi-threading |
|
| v0.1–v0.6 | LZ77 compression, AES-256 encryption, multi-threading |
|
||||||
| v0.7 | Post-quantum hybrid encryption (ML-KEM-768 + X25519) |
|
| v0.7 | Post-quantum hybrid encryption (ML-KEM-768 + X25519) |
|
||||||
| v1.0 | Stable release — format frozen v1.4, security audit |
|
| v1.0 | Stable release — format frozen v1.4, security audit |
|
||||||
| v1.1–v1.5 | X25519 fix, NIST vectors, CPUID detection, Jasmin CT proofs (2 of 4 wired) |
|
| v1.1–v1.4 | X25519 fix, NIST vectors, CPUID detection, Jasmin source files fixed |
|
||||||
| **v2.0** | **VaptVupt codec (default), all 4 Jasmin functions wired, ACSL proofs, mlock, fuzzing, canaries, AES-NI 4-block pipeline, MT decompression, adaptive compression, benchmark harness** |
|
| v1.5 | Jasmin CT assembly linked (MAC verify + ML-KEM select active) |
|
||||||
|
| v1.5.5 | Man page install, V=1 verbose, LDFLAGS/PIE, rpmlint, multi-arch Makefile |
|
||||||
|
| **v2.0** | **VaptVupt 1.1.0 codec with auto hardware detection, all 5 Jasmin functions wired, AVX SIGILL fix, copy_match/litlen overflow fixes, ACSL proofs, mlock, fuzzing, canaries, AES-NI 4-block pipeline, MT decompression, adaptive compression, multi-architecture support (6 arches), --lzhp flag** |
|
||||||
|
|
||||||
|
See [CHANGELOG.md](CHANGELOG.md) for detailed per-version changes.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
MIT — see [LICENSE](LICENSE).
|
MIT | [LICENSE](LICENSE).
|
||||||
|
|
||||||
Security vulnerabilities: see [SECURITY.md](SECURITY.md).
|
Security vulnerabilities: see [SECURITY.md](SECURITY.md).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@
|
||||||
| v1.3 | ✅ | ACSL predicates, Jasmin source files (initial), security review |
|
| v1.3 | ✅ | ACSL predicates, Jasmin source files (initial), security review |
|
||||||
| v1.4 | ✅ | All 4 Jasmin `.jazz` files compile on jasminc 2026.03.0 |
|
| v1.4 | ✅ | All 4 Jasmin `.jazz` files compile on jasminc 2026.03.0 |
|
||||||
| **v1.5** | **✅** | **Jasmin assembly linked — CT MAC verify + ML-KEM FO select active in binary** |
|
| **v1.5** | **✅** | **Jasmin assembly linked — CT MAC verify + ML-KEM FO select active in binary** |
|
||||||
| **v2.0** | **✅ Current** | **VaptVupt codec (default), all 4 Jasmin wired, ACSL, mlock, fuzzing, canaries, AES-NI pipeline, MT decompress, adaptive compression, benchmark** |
|
| **v1.5.5** | **✅** | **Man page install, V=1 verbose, LDFLAGS/PIE, rpmlint, multi-arch Makefile** |
|
||||||
|
| **v2.0** | **✅ Current** | **VaptVupt 1.1.0 codec with auto hardware detection, all 5 Jasmin wired, AVX SIGILL fix, copy_match/litlen fixes, ACSL, mlock, fuzzing, canaries, AES-NI pipeline, MT decompress, multi-arch (6 arches)** |
|
||||||
|
|
||||||
## Planned
|
## Planned
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue