[bug] gpg: invalid radix64 character 2D skipped | invalid packet (ctb=10) | no valid OpenPGP data found
What happened?
After trying to verify the digital signature of the file "sha256sum.txt.asc" (with $ gpg --verify sha256sum.txt.asc)
I got an unknown and no common output:
gpg: invalid radix64 character 2D skipped
[...]
gpg: [don't know]: invalid packet (ctb=10)
[...]
gpg: no valid OpenPGP data found.
Note: the latest release without this issue was the v1.29.0... v1.29.1 & v1.29.2 & v1.29.3-rc.1 are affected
Syncthing version
v1.29.1 & v1.29.2 & v1.29.3-rc.1
Platform & operating system
Linux amd64 (Ubuntu Server Jammy/Noble LTS) // Linux arm64 (Raspberry Pi OS Bookworm)
Browser version
No response
Relevant log output
gpg --verify sha256sum.txt.asc
Output:
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: invalid radix64 character 2D skipped
gpg: [don't know]: invalid packet (ctb=10)
gpg: Signature made Sun 12 Jan 2025 03:36:31 PM UTC
gpg: using RSA key FBA2E162F2F44657B38F0309E5665F9BD5970C47
gpg: Can't check signature: No public key
gpg: Signature made Sun 12 Jan 2025 03:36:31 PM UTC
gpg: using RSA key 37C84554E7E0A261E4F76E1ED26E6ED000654A3E
gpg: Good signature from "Syncthing Release Management <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 37C8 4554 E7E0 A261 E4F7 6E1E D26E 6ED0 0065 4A3E
gpg: no valid OpenPGP data found.
Expected output
gpg: Signature made Mon 06 Jan 2025 09:13:50 CET
gpg: using RSA key FBA2E162F2F44657B38F0309E5665F9BD5970C47
gpg: Can't check signature: No public key
gpg: Signature made Mon 06 Jan 2025 09:13:50 CET
gpg: using RSA key 37C84554E7E0A261E4F76E1ED26E6ED000654A3E
gpg: Good signature from "Syncthing Release Management <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 37C8 4554 E7E0 A261 E4F7 6E1E D26E 6ED0 0065 4A3E
FWIW, this doesn't reproduce with my version of GnuPG, though it has a spurious "no valid OpenPGP data found." at the start which maybe is its way of expressing the same. At least you did get the successful verification output 🤷
jb@jbo2:~ % curl -sLO https://github.com/syncthing/syncthing/releases/download/v1.29.2/sha256sum.txt.asc
jb@jbo2:~ % gpg --verify sha256sum.txt.asc
gpg: no valid OpenPGP data found.
gpg: Signature made Sun Jan 12 16:36:31 2025 CET
gpg: using RSA key FBA2E162F2F44657B38F0309E5665F9BD5970C47
gpg: Good signature from "Syncthing Release Management <[email protected]>" [full]
gpg: Signature made Sun Jan 12 16:36:31 2025 CET
gpg: using RSA key 37C84554E7E0A261E4F76E1ED26E6ED000654A3E
gpg: Good signature from "Syncthing Release Management <[email protected]>" [ultimate]
jb@jbo2:~ % gpg --version
gpg (GnuPG) 2.4.7
libgcrypt 1.11.0
Copyright (C) 2024 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /Users/jb/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Hello. I am going to use Syncthing on my Autel tools. I want to run Syncthing when using mobile network and metered data and turn on when system boot. But I can't get the setting GUI of syncthing on my Autel tools with Android 5. What is the reason?
Hello. I am going to use Syncthing on my Autel tools. I want to run Syncthing when using mobile network and metered data and turn on when system boot. But I can't get the setting GUI of syncthing on my Autel tools with Android 5. What is the reason?
Why did you select this issue to talk about your doubt?
gpg (GnuPG) 2.4.7
BTW: this issue persists with the latest v1.29.4, I have the gpg (GnuPG) 2.2.40/2.2.27, and I can't test if this is a problem that is solved with the 2.4.7 because I use Debian Bookworm and Ubuntu Jammy, and they don't have later versions in their package repositories. What OS are you using, or did you compile GPG from source?
What I can assure you @calmh is that something changed on your side (possibly you updated GPG) from Syncthing version 1.29.0
Oh absolutely something changed, it is now using a Go openpgp package for signing instead of a bunch of shell scripts and Debian gpg.
I saw this https://github.com/the-djmaze/snappymail/issues/1608. Then, I replaced the last character of the signature with "=". Then the "skipping invalid radix64 character 2D" message is gone.
I suspect we're dealing with multiple bugs in old versions of PGP.
The old sha files we generated had the "optional checksum" line at the end, which is apparently deprecated. I could see some implementation expexting it to be there and trying to base64 decode the line were it isn't, which is then -----END PGP SIGNATURE----- and "2D" is - in hex.
The gpg: no valid OpenPGP data found. from newer versions I don't know what it's about. 🤷
In any case I don't see anything wrong with the data we generate. If there is something wrong it's an upstream bug which I'd be happy to help narrow down, but it's probably not our bug per se.
As such I don't think there's anything actionable here for us at the moment.
@calmh
I've confirmed that GnuPG 2.2.46 also cannot verify the release signatures. 2.2.46 was released Jan 7 2025, and 2.2.x is upstream's LTS series that is still the most common implementation in the wild, and it doesn't look like this will change before mid to late 2025--at the earliest.
Meanwhile, I confirmed that 2.4.7 doesn't utterly fail when checking sha256sum.txt.asc and v1.29.4.tar.gz.asc; however, 2.4.7 contains a bunch of breaking changes that are taking time and work--not to mention political delicacy--to resolve.
Is it possible to configure your PGP client to output maximally compatible signatures (compatible with the GnuPG 2.2.x LTS series), until the new 2.4.x GnuPG branch makes it to a significant number of users and infrastructure? Yes, Fedora and Arch have 2.4.x. The next GnuPG LTS will be 2.6.x...somewhere on the horizon.
From what I've read, there's a conflict between the OpenPGP and the GnuPG direction, and this will cause incompatibilities to emerge. It's hard to say what the right direction is at the moment, but I'd appreciate if you would reopen this bug. To be clear, I'm not blaming nor defending anyone.
We do this: https://github.com/kastelo/ezapt/blob/2cd886a75c9508d3486ece5a999fca91f4671f35/internal/pgp/pgp.go#L69
Which uses this: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/clearsign#EncodeMulti
Which takes this config: https://pkg.go.dev/github.com/ProtonMail/[email protected]/openpgp/packet#Config
If there's something there you want me to set, we can do that.