OpenPGP Ed25519 commit signing writes an incorrect issuer fingerprint and key ID
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
Start by running the reproduction script in the issue to build the jgit CLI and produce a signed commit. Compare the issuer fingerprint and key ID in the signature packet (from gpg --list-packets) against the generated Ed25519 primary key fingerprint. The fix is done when the signature's issuer subpackets identify the configured key and git verify-commit HEAD succeeds with the generated public key. Expect to need OpenPGP background to find where the wrong key material is chosen.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Version
8.0.0-SNAPSHOT built from 6e68739fd9535672d5f1316d943a2107063617e0
Operating System
MacOS, Linux/Unix
Bug description
When signing a commit with a newly generated OpenPGP Ed25519 key, JGit successfully creates the commit, but the signature's issuer fingerprint and key ID differ from those of the configured signing key. Native Git/GnuPG cannot verify the commit and reports “No public key.”
The following reproduces the issue using an isolated GnuPG home and Git repository. Run from the JGit checkout after building the CLI:
mvn -pl org.eclipse.jgit.pgm -am package -DskipTests \
-Dmaven.javadoc.skip=true -Dspotbugs.skip=true
JGIT="$PWD/org.eclipse.jgit.pgm/target/jgit"
REPRO_DIR=$(mktemp -d)
export GNUPGHOME="$REPRO_DIR/gnupg"
mkdir -m 700 "$GNUPGHOME"
gpg --batch --pinentry-mode loopback --passphrase '' \
--quick-generate-key 'Signing Reproducer <[email protected]>' ed25519 sign 0
SIGNING_FPR=$(gpg --batch --with-colons --list-secret-keys | \
awk -F: '$1 == "fpr" { print $10; exit }')
printf 'Expected fingerprint: %s\n' "$SIGNING_FPR"
git init "$REPRO_DIR/repo"
cd "$REPRO_DIR/repo"
git config user.name 'Signing Reproducer'
git config user.email [email protected]
git config gpg.format openpgp
git config user.signingkey "$SIGNING_FPR"
printf 'OpenPGP Ed25519 signing reproduction\n' > example.txt
git add example.txt
"$JGIT" commit -S -m 'Reproduce OpenPGP Ed25519 signing'
# Extract the signature directly from the commit's gpgsig header.
git cat-file commit HEAD | sed -n \
'/^gpgsig /,/^ -----END PGP SIGNATURE-----$/ { s/^gpgsig //; s/^ //; p; }' \
> signature.asc
gpg --list-packets signature.asc
git verify-commit HEAD
Assisted-By: 🤖 GPT-6.1-Sol
Actual behavior
JGit creates a signed commit successfully, but with a different key than expected. In the reproduction:
| Value | Fingerprint / key ID |
|---|---|
| Generated and configured key fingerprint | EFBC6DED33DB148BC822B7C1F7ED699DBCF8E2BD |
| Expected key ID | F7ED699DBCF8E2BD |
| Observed signature issuer fingerprint | 1D98ADE46986DF537ADA692DCC539A42D1D7C769 |
| Observed signature issuer key ID | CC539A42D1D7C769 |
git verify-commit HEAD exits with status 1 because GnuPG cannot find the public key identified by the signature.
Expected behavior
The signature should identify the configured Ed25519 signing key using its correct fingerprint and key ID. Native Git/GnuPG should successfully verify the commit using the generated public key.
Relevant log output
Generated key listing:
sec:u:255:22:F7ED699DBCF8E2BD:1791532939:::u:::scSC:::+::ed25519:::0:
fpr:::::::::EFBC6DED33DB148BC822B7C1F7ED699DBCF8E2BD:
Inspection of the signature extracted from the commit:
# off=0 ctb=c2 tag=2 hlen=2 plen=136 new-ctb
:signature packet: algo 22, keyid CC539A42D1D7C769
version 4, created 1791532944, md5len 0, sigclass 0x00
digest algo 8, begin of digest 1d 82
critical hashed subpkt 2 len 4 (sig created 2026-10-09)
hashed subpkt 33 len 21 (issuer fpr v4 1D98ADE46986DF537ADA692DCC539A42D1D7C769)
hashed subpkt 28 len 17 (signer's user ID)
subpkt 16 len 8 (issuer key ID CC539A42D1D7C769)
data: [255 bits]
data: [255 bits]
Native Git verification:
gpg: Signature made Fri Oct 9 08:02:24 2026 UTC
gpg: using EDDSA key 1D98ADE46986DF537ADA692DCC539A42D1D7C769
gpg: issuer "[email protected]"
gpg: Can't check signature: No public key
Other information
- Java: OpenJDK 25.0.4.1 (Red Hat).
- Native Git: 2.55.0.
- GnuPG: 2.4.9; libgcrypt: 1.12.2-unknown.
- Bouncy Castle: 1.86; signature armor includes
Version: BCPG v1.86. - The generated OpenPGP key is an Ed25519 primary signing key, with no subkeys and no passphrase.
- A separate SSH Ed25519 signing control succeeded: the public key embedded in the commit's SSHSIG matched the generated public key byte for byte, and nati
ve Git verified the signature.
- Langage dominant
- Java
- Étoiles
- 427
- Forks
- 116
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de eclipse-jgit/jgit
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
eclipse-jgit/jgit#329 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Peut-être à nouveau libre @hardikyadav12 l’a pris il y a 77 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
eclipse-jgit/jgit#297 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
eclipse-jgit/jgit#293 · 2 commentaires ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
eclipse-jgit/jgit#288 ·
Toutes les issues de eclipse-jgit/jgit
Issues similaires
-
? - Needs Triage bot_watch bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
NVIDIA/cudf-spark-jni#5594 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Upgrade solr to 9.11.0Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
DataONEorg/dataone-indexer#390 ·