I installed veracrypt on some of my PinePhones. There are no pre-compiled binaries for aarch64. Installation is from source.
The process is simple and mostly follows the instructions on git.
This has been tested on Manjaro Phosh and Arm Arch Linux. I compiled it as a cli only application. If you omit the NOGUI=1 it will compile the version with both cli/gui. It takes much longer to compile and the interface is not optimized for a mobile device.
Install the required packages
sudo pacman -S fuse2 yasm cppunit pkg-config
Download the source for wxWidgets. The current stable is v3.0.5.
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2
Extract and move to /usr/src
tar -xf wxWidgets-3.0.5.tar.bz2
sudo mv wxWidgets-3.0.5 /usr/src/
Download the current stable veracrypt source
wget https://github.com/veracrypt/VeraCrypt/archive/refs/tags/VeraCrypt_1.24-Update7.tar.gz
Extract the files and change to the src directory
tar -xf VeraCrypt_1.24-Update7.tar.gz
cd VeraCrypt-VeraCrypt_1.24-Update7/src
Build wxWidgets and then compile veracrypt
make NOGUI=1 WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets-3.0.5 wxbuild
make NOGUI=1 WXSTATIC=1
Copy the veracrypt executable to /usr/bin
sudo cp Main/veracrypt /usr/bin