Repository navigation
Conversation
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
0d4699c to
5d2e55b
Compare
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
5d2e55b to
82411df
Compare
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
84b7180 to
19d0a0a
Compare
19d0a0a to
82b98b5
Compare
5f8a33b to
19d0a0a
Compare
19d0a0a to
9b0133f
Compare
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
9b0133f to
b4ccd75
Compare
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
b4ccd75 to
de9cc1a
Compare
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- de9cc1a "veracrypt: add version 1.26.29" — the
Signed-off-by: Ville Takiotrailer appears twice; keep one.
Generated by Claude Code
de9cc1a to
8ece9cb
Compare
Web UI for the console veracrypt package (packages feed): openwrt/packages#30597 Not bundled into veracrypt; apk add luci-app-veracrypt depends on +veracrypt. Calls veracrypt --text only. The current password is passed on stdin (--stdin), never --password. New password, hidden volume password and token PIN are fed on stdin, not via --new-password, --protection-password or --token-pin. CLI reference: https://www.veracrypt.fr/en/Command%20Line%20Usage.html Signed-off-by: Ville Takio <ville+git@takio.fi>
|
LuCI apps for this package: openwrt/luci#9069 (luci-app-veracrypt, full-featured) and openwrt/luci#9119 (luci-app-veracrypt-lite, smaller). Both are optional and can be installed side by side. |
|
VeraCrypt merged veracrypt/VeraCrypt#1908 and veracrypt/VeraCrypt#1909, so patches 100/101 are now backports 060/070 of veracrypt/VeraCrypt@cb1d9a4 and veracrypt/VeraCrypt@7c06e03 (0526541). The patched source is unchanged: the mipsel binary is byte-identical to the one run-tested on the RT-AX53U (21/21). |
BKPepe
left a comment
There was a problem hiding this comment.
The package ships /etc/config/veracrypt with an example config volume, but there is no init script consuming these entries. Currently, these are LuCI favorites, not boot-time mounts.
Should automatic mounting at boot be supported? If so, I'd expect an /etc/init.d/veracrypt script that mounts explicitly enabled volumes once their backing storage is available and dismounts them on shutdown.
Credentials need a clear design, too. Passwords should not be stored directly in UCI or passed via --password (visible in process arguments). A password_file reference with strict root-only permissions, fed to VeraCrypt via --stdin, could support unattended mounts, but the plaintext-at-rest limitation must be documented. Otherwise, unlocking should remain interactive.
If autostart is out of scope, please document that explicitly so the example UCI volume configuration isn't mistaken for a boot-time mounting mechanism.
|
@BKPepe Thanks, you're right: nothing consumed those entries at boot, and the CLI never reads
If unattended mounting at boot is wanted later, I'd do it as a separate change along the lines you describe: an init script for explicitly enabled volumes, a root-only Updated in 576c607 (and in openwrt/luci#9069 and openwrt/luci#9119). The packaged binary is byte-identical to the one tested before. The three packages were installed together as an upgrade on the RT-AX53U, and the device test passed 23 checks with 0 failures. Two of those checks are new: |
Why it is out of scope?
Why? That should not be there at all. What your AI is doing? 🤔 |
Because I think automounting encrypted volumes is insecure. An unattended mount means the password (or keyfile) has to be stored on the router itself, usually on the same device as the volume it protects. Anyone who gets the router or the disk then gets the data, which defeats the point of encrypting it. VeraCrypt has no boot-time mount mechanism on any platform either, and I'd rather not invent a credential store for it in OpenWrt.
Agreed for the The UCI file was only ever used by the LuCI app, for its own UI state: the operation timeout, an optional PKCS #11 library path, and the favorites list (volume path, mount point, PIM, keyfile paths; never passwords). So it now lives with the LuCI apps (openwrt/luci#9069, openwrt/luci#9119) and no longer concerns this PR. If you'd prefer, I can rename it to |
|
Renamed: the LuCI apps now keep their settings and favorites in |
No one is going to read AI wall of texts. It is just too exhausting to read it. It is wrong. Folder /etc/config is where UCI config files are. So, you should do it as other packages does. :) UCI config belongs to the packages, not to the LuCI integration. |
|
OK, reluctantly: I'm still of the opinion that veracrypt and the luci-app are and will be separate packages. and the luci-app is naturally dependent of this package, but not the other way around. |
|
On VeraCrypt reading its own settings from
|
|
You don't normally patch the package to understand UCI config files. I don't think I've ever seen that done. Normally, the openwrt init script that you provide as part of your package, handles UCI config files and generates a suitable config file in the native format that the package expects. dnsmasq, snmpd, mosquitto come to mind as examples off the top of my head. As mentioned, that is part of this package. a Luci app would provide unified editing of that config, but is completely independent. |
|
@karlp Thanks, agreed that's the usual pattern for daemons like dnsmasq or mosquitto. VeraCrypt isn't a service, though: there's nothing to start at boot (automounting is out of scope, as it would mean storing the password on the router), and the console tool takes everything it needs as command-line options. An init script generating VeraCrypt's XML preferences from UCI would have nothing to do, so I think it's unnecessary. The only config that's actually needed is the settings and favorites of luci-app-veracrypt, and that is the |
|
Updated (81378fe): this package ships no configuration anymore; |
|
Added |
BKPepe
left a comment
There was a problem hiding this comment.
I don't think the current init script is sufficient for an OpenWrt package. If we provide /etc/config/veracrypt, the base package should actually consume it, rather than leaving volume management to the optional LuCI app.
I'd expect a UCI-driven init script that mounts only explicitly enabled volumes at boot and cleanly unmounts only the volumes it manages. The UCI configuration and its conffiles should live in this package, so the feature also works through the CLI, scripts and configuration management without LuCI.
START=99 is too late for volumes needed by services started earlier. Start after fstab has mounted the backing storage but before dependent services, and stop after those services have stopped. A one-shot rc.common script is sufficient; USE_PROCD=1 is not mandatory when there is no long-running process to supervise.
Please also define how unattended authentication works without storing passwords in UCI or exposing them in process arguments. If the init script generates VeraCrypt's native XML configuration, make sure it uses the correct configuration path and preserves per-volume options that the native favorites format cannot represent.
Finally, the current global unmount with an unconditional forced fallback and the mount helper's handling of ro, -f and password= need to be addressed before merging.
Also, please consider adding nasm/host to PKG_BUILD_DEPENDS instead of setting NOASM=1 on i386/x86_64, as NOASM=1 disables hardware AES-NI and SIMD acceleration on x86 targets.
Hey, I'll be honest, if you want to help, it's not the best way to keep reminding yourself on IRC and saying I'm the bad guy and that I'm driving you crazy.
No other pull request has as much attention as yours. Be a little considerate, I'm telling it like it is and we have 137 open pull requests here.
A lot of people are trying to help you, including @karlp, who says that the UCI config should just be here and we're going around in circles again. I understand that the AI is answering me and that it's vibe-coded, but it takes a little self-reflection and taming the AI a little, see #30782
Each of your force pushes contains so many changes that I simply cannot review them all over again. It really takes so much time that I can't even afford it.
|
@BKPepe I'm very sorry if you got offended. The "driving me crazy" on IRC was purely about me not understanding your requests, not about you. Mea culpa. Addressed in e2eb671:
To say it once more: VeraCrypt has no configuration of its own that it would read, and it never will. The command-line tool takes everything as options (its only optional per-user preferences are XML files under Noted on the force pushes: from now on each push will be small, with a short list of what changed. |
|
I disagree with keeping volume configuration and handling exclusively in LuCI. OpenWrt routinely wraps CLI-only tools with UCI configuration and init scripts. You have also just added Please move If this PR is deliberately CLI-only, remove the init script. The current middle ground adds system integration without actually providing it. Personally, I don't consider a CLI-only package user-friendly enough, and I think proper OpenWrt integration should be part of this PR rather than postponed to a future one. |
|
I don't understand why we're still arguing about this instead of implementing it properly. I asked AI (Argon 4 High and GPT-6] as reviewer to draft a possible approach. The files below are not tested or reviewed by me, so treat them as a starting point, not a patch to merge blindly:
Could you explain what is actually wrong with this approach and why we couldn't have taken this direction from the beginning? We've been discussing this for three weeks, and I'd rather see concrete technical objections and a workable solution than keep going in circles about whether VeraCrypt itself reads UCI. Regarding automount: the credentials don't necessarily have to be stored on the router next to the volume. They can come from a separate keyfile location, a password file populated at runtime, or a suitable hardware-token setup. Keep automount disabled by default, never store secrets in UCI, and let users choose their own threat model. That's no reason to omit an explicitly opt-in feature. A CLI-only package is not user-friendly enough, and I don't want proper OpenWrt integration postponed to another PR. |
|
Don't mind my comment about the config file being in this package, I was commenting generally to the perceived request that veracrypt grow a patch to handle uci config directly. I was (mistakenly, I don't know anything about veracrypt) that it was like ~any other packaged service and had an init script, the commentary was general. |
|
@GeorgeSapkin OpenWrt's Mount Points (block-mount) only mounts block devices and has no crypttab. VeraCrypt volumes are often container files, opened by the veracrypt program itself (FUSE or dm-crypt), so fstab alone can't mount them. The bigger point is security: a volume that mounts itself at boot needs its secret stored on the same router. If you don't need to enter a password, an attacker won't need to either. The usual setup is a fully encrypted system disk whose shortcuts mount the other encrypted disks; keyfiles on a USB stick avoid typing the password, but lower security a lot. My own use: a disk attached to the router that I unlock only occasionally and then use over the LAN via Samba. For those who want it anyway, the package now has an opt-in init script; nothing is mounted unless a volume has |
|
@BKPepe Thanks for the drafts. Done in 79a99f1, following their structure and option names: Where the draft would not work on OpenWrt, I deviated:
Patch 080 now has full git-am headers and is submitted upstream (veracrypt/VeraCrypt#1928). |
|
@BKPepe On the credentials: covered in 4560e09. Automount stays off by default, and secrets never go in UCI. |
Add a console-only VeraCrypt package using FUSE3 and wxBase from libwxbase. x86 builds without assembler (NOASM); other targets use VeraCrypt's C/intrinsics code, including ARMv8 hardware AES. Runtime depends on libstdcpp, libwxbase, libfuse3, fuse3-utils, losetup and kmod-loop (volumes are mounted through a loop device). Patches 010-070 are backports from upstream: with 040, VeraCrypt mounts and formats volumes through FUSE3 when dmsetup (lvm2) is not installed; 050 fixes the portable crypto code on big-endian targets (mips, powerpc), avoids unaligned 64-bit accesses (mips64) and extends the self-tests; 060 and 070 make the crypto code use alignment-safe word accesses on strict-alignment CPUs (32-bit ARM, MIPS), where unaligned accesses raised SIGBUS (seen in the self-tests on cortex-a15). test.sh checks the version and runs the algorithm self-tests. 080 fixes the fstab helper mount.veracrypt: the last of ro/rw sets both VeraCrypt's read-only protection and the filesystem, -f (fake mount) only checks the options, -N and unknown or malformed arguments are errors, and password= is passed on stdin instead of veracrypt's command line (new: passwordfile=, the secure form, first line only); both need mount to run as root. It also makes veracrypt --stdin decode the whole first line and fail on missing or invalid input instead of mounting with a shortened or empty password. Submitted upstream as veracrypt/VeraCrypt#1928. /etc/config/veracrypt (conffile) describes the volumes; luci-app-veracrypt edits the same sections. /etc/init.d/veracrypt (START=45, STOP=85) mounts the volumes with auto_mount '1', none by default, in the background at boot, as key derivation takes minutes; /etc/hotplug.d/block/90-veracrypt retries when a disk appears. 'start <name>' mounts one volume and asks for the password on a terminal. Unattended mounts read the password from a root-only password_file on stdin (never UCI or the command line); keyfiles may live elsewhere, e.g. on a USB stick, security token keyfiles need a terminal (their PIN cannot be passed safely), and an empty password needs empty_password '1'. Stop unmounts the configured volumes, never forced: a volume in use stays mounted and is logged. Upstream: https://github.com/veracrypt/VeraCrypt/releases/tag/VeraCrypt_1.26.29 Run-tested on ramips/mt7621 (ASUS RT-AX53U, mipsel_24kc) with OpenWrt 25.12.5 (no lvm2), with libwxbase3.2: self-tests, create, FUSE mount (explicit and autodetected hash), unmount, mount.veracrypt (-f, ro, passwordfile=) and the init script (auto_mount with password_file, start/stop <name>, busy volume not forced). Signed-off-by: Ville Takio <ville+git@takio.fi>

📦 Package Details
Maintainer: @flatstik
Description:
Add a console-only VeraCrypt package, and wxWidgets' non-GUI library (wxBase), which VeraCrypt needs, as its own shared-library package (one commit per package).
wxwidgets (
libwxbase3.2), new:libwx_baseu-3.2.so.0);ABI_VERSION:=3.2follows the soname (asliblua5.4).wx-configis staged likegpg-error-config, so other packages can build against it.veracrypt:
libwxbase3.2; x86 builds without assembler (NOASM), other targets use VeraCrypt's normal C/intrinsics code (ARMv8 hardware AES included)__atomic_*function on any target built (mips/mipsel only use__sync_*_4from libgcc), so neither+libatomicnorATOMIC64_DEPENDS(build: centralise libatomic dependencies for 64-bit atomics openwrt#25112) is needed--filesystem=ext4needs e2fsprogs (mkfs.ext4), which stays optionalVeraCrypt_1.26.29_Source.tar.bz2;License.txtis installed to/usr/share/doc/veracrypt/as the TrueCrypt License 3.0 requires/sbin/mount.veracryptis upstream's helper. Without dmsetup (lvm2, not a dependency) VeraCrypt mounts and formats through FUSE3 (patch 040, merged upstream). With lvm2 installed it uses kernel dm-crypt as upstream does, which on OpenWrt needskmod-crypto-xts(built in on x86_64) and supports AES only; for other ciphers and cascades--mount-options=nokernelcrypto(helper:-o nokernelcrypto) keeps FUSE/etc/config/veracrypt(conffile) describes the volumes; luci-app-veracrypt (luci-app-veracrypt: add optional LuCI UI luci#9069) edits the same sections./etc/init.d/veracrypt(START=45, STOP=85) mounts volumes withauto_mount '1'(none by default) in the background at boot, and/etc/hotplug.d/block/90-veracryptmounts them when their disk appears. Unattended mounts read the password from a root-onlypassword_fileon stdin, never UCI or argv; keyfiles may live elsewhere, e.g. on a USB stick; security token keyfiles need a terminal (their PIN can't be passed safely); an empty password needsempty_password '1'.start <name>mounts one volume (asking on a terminal withoutpassword_file); stop unmounts the configured volumes, never forced.010: ARMCPU_Query*link fix (VC_INLINE), Crypto: use VC_INLINE for the ARM CPU_Query helpers veracrypt/VeraCrypt#1886 (veracrypt/VeraCrypt@5c7f60d)020: POSIX shmount.veracrypt, Linux: make mount.veracrypt POSIX sh veracrypt/VeraCrypt#1895 (veracrypt/VeraCrypt@81cd94f)080:mount.veracrypt: the last ofro/rwsets both VeraCrypt's read-only protection and the filesystem,-fonly checks the options,-Nand unknown or malformed arguments are errors,password=goes on stdin instead of argv (newpasswordfile=, first line only), both need root; andveracrypt --stdindecodes the whole first line and fails on missing or invalid input instead of using a shortened or empty password. Submitted as Linux: mount.veracrypt: honour ro and -f, keep the password off argv veracrypt/VeraCrypt#1928 (src/part)030: x86NOASMlink fix, Crypto: fix NOASM link failures on x86 veracrypt/VeraCrypt#1896 (veracrypt/VeraCrypt@a15c996)040: fall back to FUSE when dmsetup is not installed (so--createwith ext4 and plain mounts work without lvm2), Linux: fall back to FUSE when dmsetup is not installed veracrypt/VeraCrypt#1898 (veracrypt/VeraCrypt@d24b821)050: fix the portable C code of Twofish, Camellia, Kuznyechik, SHA-2, BLAKE2s, Streebog and PBKDF2 on big-endian CPUs, avoid unaligned 64-bit accesses (SIGBUS on mips64) and extend the self-tests, Crypto: fix portable C code on big-endian CPUs veracrypt/VeraCrypt#1899 (veracrypt/VeraCrypt@425cea6)060: no unaligned 64-bit accesses on 32-bit ARM (Camellia/WhirlpoolLDRDraised SIGBUS in the self-tests on arm_cortex-a15_neon-vfpv4), Crypto: no unaligned 64-bit accesses on 32-bit ARM veracrypt/VeraCrypt#1908 (veracrypt/VeraCrypt@cb1d9a4)070: alignment-safe word loads/stores for SHA-2, BLAKE2s, Twofish, Kuznyechik, Streebog and XTS on targets where unaligned access faults (32-bit ARM, MIPS); unchanged code on x86, x64, ARMv8 and PowerPC, Crypto: use alignment-safe loads and stores where unaligned access faults veracrypt/VeraCrypt#1909 (veracrypt/VeraCrypt@7c06e03)The former patch 100 (wxWidgets build jobs) is gone with the bundled wxWidgets build.
Upstream: https://github.com/veracrypt/VeraCrypt/releases/tag/VeraCrypt_1.26.29, https://github.com/wxWidgets/wxWidgets/releases/tag/v3.2.11
🧪 Run Testing Details
Run-tested on the device above with the 25.12.5 SDK build of both packages (47 checks passed, 0 failed):
libwxbase3.2installed as a dependency andveracryptresolveslibwx_baseu-3.2.so.0from it;--testself-tests,--create --filesystem=ext4(formatted through FUSE, no dmsetup), mount/write/read/unmount, auto-hash mount,mount.veracrypt(-f,ro,passwordfile=, password not in the process list), the init script (auto_mountwithpassword_file,start/stop <name>, busy volume not forced), and the luci-app-veracrypt backend.Build-tested with the current snapshot SDK on mips_24kc (big-endian), mips64 big-endian (malta), arm_cortex-a15_neon-vfpv4, aarch64_generic and x86_64, plus the 25.12.5 SDK for mipsel_24kc; on all of them the binary's NEEDED list is libfuse3, libwx_baseu-3.2, libstdc++, libgcc_s and libc. The x86_64 build passes the generic runtime checks plus
test.shandtest-version.shin an OpenWrt rootfs. The packaged binaries passveracrypt --text --testunder qemu-user on arm_cortex-a15_neon-vfpv4 (-cpu cortex-a15andcortex-a7), mipsel_24kc, mips_24kc, mips64 and aarch64_generic.✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.