I’m trying to encrypt a folder containing many files which is very large. When using gpgtar.exe command, the process runs until all RAM is consumed and then fails. Below is the command I’m using, and I’m trying to encrypt the folder “foldername” to filename “H:\Data\encrypted.tar.gpg”. The .gpg file is created but remains at 0KB until the process fails with error “out of space”.
“C:\Program Files (x86)\GnuPG\bin\gpgtar.exe” --encrypt --output “H:\Data\encrypted.tar.gpg” -r “publickey” “foldername”
seems you have hit the size limit of what you can encrypt.
(Which depends on your machine and setup.)
Actually, I was able to resolve this issue. It looks like gpgtar.exe doesn’t handle encryption, and you must pipe the output of gpgtar.exe to gpg.exe. Below is an example of the command I’ve been using which appears to work, and generate very large files successfully (over 100GB). Note the “–output -” is used to send the output of gpgtar.exe to stdout.
D:>“C:\Program Files (x86)\GnuPG\bin\gpgtar.exe” --skip-crypto --output - --encrypt “FolderToEncrypt” | “C:\Program Files (x86)\GnuPG\bin\gpg.exe” -r “PublicKeyName” --encrypt --output “H:\Data\EncryptedFolder.tar.gpg”
Yes the crypto in Gpgtar itself is pretty badly implemented. e.g. it works in memory so it reads the whole tar into memory before encrypting. As you rightly notices, Kleopatra does not use the crypto parts (skip-crypto) and pipes the output through gpg.exe
With newer Windows 10 Versions there is a native tar. You can better use that and pipe the output through gpg.exe.
I want to do that with Kleopatra, too but the GnuPG Maintainer claims that we need to use our own tar because the old PGP Desktop had a slightly different tar handling and we are compatible with that.
I have it on the radar, there were so many big issues with gpgtar that caused data loss in the past that I really want to get rid of it.