Skip to content

BoltPack v1.13

Latest

Choose a tag to compare

@Bzoink Bzoink released this 01 Dec 23:39

1.13 — BoltPack Micro, encrypted archives and destination checks

  • Check an existing archive for a destination. Use boltpack check-target --target-profile=PROFILE ARCHIVE on Linux, Windows or macOS, or
    Archive → Check Destination in the Linux or Windows FLTK app. The check
    supports C64, CP/M-80, Apple II, Atari 800, DOS16 and CP/M-86 profiles.
    See Check an existing archive.
  • BoltPack Micro adds Stored and BoltLite archives for C64, CP/M-80,
    Apple II and Atari 800. Micro 1.2 supports relative paths and directories.
    Host frontends can create Micro archives, including four 8-bit target
    profiles in the Linux, Windows and macOS CLIs and both FLTK GUIs. The
    16-bit Mini builds ship a separate BPMICRO program. See the
    Micro frontend guide.
  • BoltPack Mini 1.5 ships with this release.
  • Fluff encodes distance symbols faster at all nine levels using shared
    lookup tables. Linux benchmarks on four Silesia samples measured about
    6% more encoding throughput at levels 1–2 and 11% at level 9. The compressed
    payloads matched the previous encoder byte for byte.
  • BoltLite gains an optimal-parse encoder level. boltpack c -1 -l 2 (or -1 --best) writes the same BoltLite bitstream with a dynamic-programming parse instead of the fast greedy one: 3-4% smaller on text and desktop data, 0.5-1% on machine code, about 13 times slower, about 2.4 MB of encoder memory. Every reader, including the 16-bit builds, decodes it unchanged. Level 1 (the default, and the only level of the mini builds) is the previous encoder with unchanged output. Also works with --encrypt and for volume sets. make boltlite-opt-test checks every output with the production decoder.
  • BoltPack Mini gains opt-in Ascon format 8 support. Enable it with ENABLE_ENCRYPTION=1 for Linux Mini, DOS16, Win16, OS/2 1.x and CP/M-86. Mini reads and writes S2 with key files and identifies S1 archives as unsupported. Linux Mini, DOS16 and CP/M-86 were tested under emulation. Win16 and OS/2 1.x were cross-built.
  • 32-bit DOS CLI (DJGPP) gains opt-in format 8 support. Build with make ENABLE_ENCRYPTION=1 dos-djgpp. Use an Ascon key file and supply fresh random bytes with --entropy-file for each create or add. DOSBox-X tests cover archive exchange with Linux in both directions, raw and hex keys, and cleanup after failed writes. The DJGPP build also uses target CPU defaults for Fluff.
  • 32-bit OS/2 CLI gains opt-in format 8 support. Build with make ENABLE_ENCRYPTION=1 os2-watcom. It uses the same key-file and entropy-file workflow as DOS. The Open Watcom cross-build passed. OS/2 runtime testing and the os2-gcc build are pending.
  • Amiga and Atari command lines: encrypted archives, key files only. make ENABLE_ENCRYPTION=1 amiga-cli / atari-cli: --key-file, --entropy-file, --allow-plaintext and c --encrypt; add works, delete does not; the exit statuses are those of the Linux program (3, 4). The key is made elsewhere (boltpack keygen), and create and add need a file of random bytes because these machines have no source of random numbers. Tested in the FS-UAE and Hatari emulators only, with archives and volume sets exchanged with the Linux program in both directions; not on real machines.
  • Amiga and Atari GUIs: encrypted archives, key files only. make ENABLE_ENCRYPTION=1 amiga-gui / atari-gui: an Encrypt item in the Compression menu (Right-Amiga K, Ctrl-K), a key file requester when an encrypted archive is opened or made, and, because these machines have no random-number source, a file of random bytes asked for when an archive is made. Archives made with a password are refused (Argon2id is out of reach). Volume sets (the Disks menu) are written through the same writer and were tested on the host only. Tested in the FS-UAE and Hatari emulators only, GUIs driven by scripted key presses, with archives exchanged with the Linux program in both directions (this is also the first run of the archive layer on big-endian hardware, emulated); not on real machines. The entropy pool no longer calls time() on libnix, which stops every program on AmigaOS 2.04.
  • macOS Cocoa GUI and command line: encrypted archives from the source kits (host-tested on Linux). ENABLE_ENCRYPTION=1 sh scripts/macos/build-native.sh arm64 (or intel) builds the command line and the modern Cocoa GUI with format 8 into build/...-enc; the GUI asks for the password or key file when an encrypted archive is opened and has an Encrypt check box with a password/key file choice in the compression settings. Checked without a Mac: the plain-C half against the Linux command line (39 checks), the command line built by the kit's script, and the syntax of the Objective-C; the dialogs themselves are untested. Not in the legacy 10.5 GUI or on PowerPC.
  • Windows FLTK GUI: encrypted archives. make ENABLE_ENCRYPTION=1 win64-fltk-gui win32-fltk-gui: the same password dialog, key file handling and Create dialog section as the Linux GUI (one shared source file). Tested under Wine only, and only the code behind the windows (41 checks, make win64-fltk-gui-enc-test); the dialogs themselves have never been shown on Windows or under Wine. The GUIs now also say what a wrong password or key is instead of "unknown error".
  • Linux FLTK GUI: encrypted archives. make ENABLE_ENCRYPTION=1 linux-gui builds a GUI that opens encrypted archives (password dialog, or a key file for a key archive) and has an Encryption section in the Create dialog (password typed twice, or a key file; strength fast, standard or strong). The plain GUI is unchanged. Tested natively: the GUI's worker code against the command line in both directions (non-ASCII password, key files, wrong secrets, all codecs) and the dialogs driven with xdotool under Xvfb (49 checks, make linux-gui-enc-test). Not in the GUI: adding to or deleting from an encrypted archive (it has neither command), volume sets, and receiving an encrypted archive over the network (refused). While an encrypted archive is written, Cancel works between files only.
  • Total Commander plugin: a Configure dialog and, in an ENABLE_ENCRYPTION=1 build, encrypted archives. The plugin has a Configure button for the compression method and level (ConfigurePacker, PK_CAPS_OPTIONS); the encrypting build (make ENABLE_ENCRYPTION=1 win64-wcx win32-wcx) adds PK_CAPS_ENCRYPT: ticking Encrypt in the Pack dialog makes a new encrypted archive (a password asked for in the plugin, or a key file named in the options), an existing encrypted archive is opened with its password and appended to, delete on one is refused, and a plain archive is never encrypted by adding to it. Tested under Wine, 64 and 32 bit, with a stand-in host (39 checks, archives exchanged with the Linux CLI); never run in a real Total Commander, and the dialogs have not been shown even under Wine. The 32-bit plugin (boltpack.wcx) no longer needs libgcc_s_dw2-1.dll (libgcc is linked in), which a Total Commander installation does not have and without which it could not be loaded.
  • Opt-in encrypted archives (format 8), Linux CLI, its POSIX wrappers, the macOS CLI and the Windows CLI. Built with make ENABLE_ENCRYPTION=1 (also make FRONTEND=freebsd|netbsd|openbsd|solaris|illumos|hurd|aix|zos|qnx ENABLE_ENCRYPTION=1, which have only been built and tested on a Linux host, never on those systems, and read random bytes from /dev/urandom; make FRONTEND=hpux|irix|nextstep|sco|tru64 ENABLE_ENCRYPTION=1 for the old-compiler Unix command lines (key files only, strict C89, built and tested on a Linux host only; they may have no /dev/urandom, so there is --entropy-file FILE, random bytes to seed the generator with, which is only as good as the file), make ENABLE_ENCRYPTION=1 macosx for the macOS CLI (host-built and tested on Linux only, never on a Mac or with the cross compiler), and make ENABLE_ENCRYPTION=1 win32-exe win64-exe for the Windows CLI (Vista or later, random bytes from CNG), whose checks ran under Wine in both bitnesses, with archives exchanged with the Linux CLI in both directions, but never on real Windows, and whose password prompt on a real console is untested);
    builds without encryption continue to write format 7 and report an unsupported version for
    format 8. boltpack create --encrypt seals names,
    types, times, sizes, data and the table of entries: with a password it uses Argon2id (64 MiB, 3 passes by default;
    --kdf-profile fast|E1|strong) and XChaCha20-Poly1305; with a key file (boltpack keygen) Ascon-AEAD128
    (NIST SP 800-232), or XChaCha20-Poly1305 with --cipher xchacha. Secrets are never taken from the command line
    (--password-file, --password-fd, --password-env, --key-file, --key-fd, or a prompt without echo).
    list, info, test, extract, create (also with -v volume sets) and add work on encrypted archives;
    delete does not, and the target profiles are not available for them. Compression is stored, BoltLite, BoltLZ (the default) or Fluff. Exit status 3 means a secret is
    needed or wrong; status 4 means a secret was given for an archive that is not encrypted (refused unless
    --allow-plaintext). The Ascon suite's keys, verifier and nonces come from the Ascon designers' own pseudo-random
    function, Ascon-Prf (ascon-c, not part of NIST SP 800-232), which the C code reproduces on all 1,025 of the designers'
    test vectors and against their reference code; the hedged nonce over a 32 KiB block takes 1,029 permutations. Errors
    -18 to -22 were added to bp_types.h. An independent Python implementation of the
    format, written from docs/encryption.md alone, and the C code agree byte for byte on
    twelve golden archives and on 80 tamper cases; the CLI has 181 checks, run natively and under AddressSanitizer and
    UBSan; the cryptographic layer passes the NIST/LWC, RFC 7693, RFC 9106 and XChaCha20-Poly1305 known-answer vectors, and
    its S2 half (not the archive code) also ran on an emulated 8086 (DOSBox-X) and on emulated 68000 and 68030 machines (Hatari). Status and limits. The wire format is frozen for S1 and S2. Incompatible changes require a new version.
    Independent security review is pending. The number of entries, name lengths and compressed sizes
    stay visible; the Ascon suite gives 128-bit security even with a 256-bit key file; a whole set cannot be detected rolling back to an older valid version of itself; a set copied and
    then appended to in two places must be archived again; passwords outside a pinned Latin/Greek/Cyrillic subset of
    Unicode normalisation may not open an archive on another system. See the
    format 8 platform list for frontend coverage.
    Vendored code: Monocypher 4.0.3 (BSD-2-Clause or CC0-1.0) and
    the ascon-c reference (CC0-1.0).
  • boltpack-recover supports format 8 with ENABLE_ENCRYPTION=1 on Linux
    and 32- and 64-bit Windows. Recovery files protect encrypted volume bytes
    without the key. Analyze can report frame damage without exposing entry
    names. With the secret, extract can salvage authenticated blocks and
    rebuild can seal verified entries into a fresh encrypted set.
    Recovery guide
  • BoltLZ on the 68000 and 68008 uses a shift-and-add hash in the encoder.
    In Hatari at 8 MHz, the assembly encoder's throughput rose from 40.2 to
    42.6 KiB/s in Fast mode and from 18.0 to 18.6 KiB/s in Balanced mode
    over 21 mixed 32 KiB blocks. Existing BoltLZ readers can decode the output.
  • Amiga and Atari ST GUIs write and read archive sets on several disks. The
    Amiga has a Disks menu (880K Amiga, 1.76M Amiga HD, 720K PC, 1.44M PC); the
    Atari ST steps through 360K, 720K, 800K and 1.44M with Compression > Disks
    or Ctrl+D. With a size chosen, Create New writes the archive as volumes of at
    most that many bytes (usable bytes on a freshly formatted disk: an Amiga OFS
    880K disk holds 840,000 bytes of file but not 850,000), asks for an empty
    disk before every volume after the first, and names them as the CLIs do
    (ARCHIVE.000, ARCHIVE.001, ... and ARCHIVE.BLT, the last one). Open,
    Validate and Extract ask for the disk of any volume they need, so a set made
    by a GUI or any CLI opens from its last disk. The GUIs now read every archive
    through the volume source and keep no file open between operations, so a disk
    can be swapped at any time. On the Amiga a path such as Empty:archive.bolt
    is turned into the drive (DF0:) before a set is read or written, so the
    system does not ask for the old disk by name. Checked in Hatari (a set of
    three 350,000-byte volumes made by the GUI restores with the Linux CLI, and
    a set made by the Linux CLI extracts in the GUI) with every volume on one
    hard drive: no diskette was swapped in an emulator. The disk prompts (create,
    extract, a wrong disk, Cancel, opening from the last disk) run in a host test
    (make gui-volume-test). The Amiga GUI is built but not driven in an
    emulator; only its drive lookup was run in FS-UAE.
  • Amiga and Atari ST GUIs: a "Light (faster boltlz)" item in the Compression
    menu selects BoltLZ Fast (level 1): in the Amiga CLI on an emulated A500+ the
    Calgary corpus compresses 1.58 times as fast (14.2 against 9.0 KB/s) for
    output 7.1% larger (52.6% against 49.2%); extraction is unchanged. The core
    already had the level (bp_archive_t.method_level); the 68k frontends never
    set it. Archives are ordinary BoltLZ streams, readable by any BoltPack.
  • Amiga and Atari ST (GUIs and CLIs): Fluff now runs at level 3 instead of the
    codec's default 8 (src/frontend/common/bp_68k_levels.h). Measured in FS-UAE
    on five Calgary files, Fluff on a 68000 runs at 1.1 to 1.4 KB/s at every
    level, so the high levels buy nothing: level 3 is 19% faster than 8 for
    output 1% larger (27.3% against 27.0%); level 1 is no faster and 8% larger,
    so Fluff has no "light" setting. Checked: the Amiga default now gives the
    size of an x86 level 3 archive plus the Amiga metadata entry.
  • 68k builds with the assembly (Atari, Amiga, Classic Mac 68k, X68000 and the
    Linux m68k program) use a hand-written CRC-32 (src/core/crc32_m68k.S),
    switched on together with BOLTLZ_M68K_ASM=1. It reads four bytes per round
    through byte-swapped slicing tables (5 KB, built on first use) instead of one
    byte through a 1 KB table, so it needs no 22-cycle shift by eight, and has a
    68000 variant (aligned reads) and a 68020-and-later variant (scaled index
    addressing), chosen by the CPU flag like the BoltLZ assembly. Checksums and
    archives are unchanged. On an emulated 68000 it runs at about 64 cycles per
    byte instead of 135 (2 MB in 18.9 s instead of 39.9 s), and 2.2 times as fast
    on a 68020. The block and entry checksums are most of the time the Amiga CLI
    spends outside the codec: in FS-UAE (A500+, 68000, 4 MB Fast RAM, assembly
    build) compression of the Calgary corpus files is 12 to 27% faster and
    extraction 43 to 60% faster (book1: 119.6 s to 106.9 s to compress, 38.9 s
    to 26.2 s to extract). make crc32-m68k-qemu-test checks both variants
    against a bitwise CRC under qemu-user (every length to 700 at 8 alignments,
    chained calls, over 65536 loop rounds); the Amiga CLI, the Hatari FAT12
    transfer test on TOS 1.62 and make m68k-qemu-asm-test pass with it. The
    Sinclair QL build keeps the C loop (its c68 toolchain cannot assemble it).
    Measured in emulators only.
  • The READMEs and notes above said the assembly makes BoltLZ compression and
    decompression "about twice as fast". That holds for the codec on the Atari;
    measured end to end in the Amiga CLI (before the CRC change) it was about
    1.5 times for compression and 1.2 times for extraction, because the
    checksums and file I/O are not part of the codec.