tech:pb_-_gpg
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:pb_-_gpg [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:pb_-_gpg [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Pb - GPG | ||
| + | |||
| + | ## Erreur gpg gpg: public key decryption failed: Too much data for IPC layer | ||
| + | |||
| + | |||
| + | |||
| + | Le problème est du à l' | ||
| + | |||
| + | ~~~ | ||
| + | $ LANG=C gpg --decrypt data.enc | ||
| + | gpg: encrypted with 16384-bit ELG key, ID 0xFF2019364801196D, | ||
| + | " | ||
| + | gpg: public key decryption failed: Too much data for IPC layer | ||
| + | gpg: decryption failed: No secret key | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Il vaut mieux utiliser des clefs de taille standard à moins de savoir vraiment ce que vous faites. \\ | ||
| + | Souvent le mieux est l' | ||
| + | |||
| + | Problèmes liés au fait d' | ||
| + | * Ne fonctionne pas partout | ||
| + | * Même si cela fonctionne, rien ne garantie que cela continuera à fonctionner après la prochaine une mise à jour. | ||
| + | * Ne fonctionne pas sur les cartes à puce. | ||
| + | * Aucune garantie que vous n' | ||
| + | * Les petits fichiers chiffrés prendrons plus de place | ||
| + | * Temps plus élevé pour chiffrer / déchiffrer | ||
| + | |||
| + | Cela dit le problème se pose ici pour déchiffrer. Je n'ai jamais rencontré de problème pour chiffrer avec des sous-clef de 16k et une clef primaire de taille normale. | ||
| + | |||
| + | La solution ici https:// | ||
| + | |||
| + | Il suffit de rechercher les fichiers command.c et de changer | ||
| + | ~~~diff | ||
| + | diff --git a/ | ||
| + | index 7fc28ad..9522f89 100644 | ||
| + | --- a/ | ||
| + | +++ b/ | ||
| + | @@ -49,7 +49,7 @@ | ||
| + | /* Maximum allowed size of the key parameters. | ||
| + | # | ||
| + | /* Maximum allowed size of key data as used in inquiries (bytes). */ | ||
| + | -#define MAXLEN_KEYDATA 4096 | ||
| + | +#define MAXLEN_KEYDATA 8192 | ||
| + | /* The size of the import/ | ||
| + | # | ||
| + | ~~~ | ||
| + | |||
| + | Sous Debian | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get source gpg | ||
| + | sudo apt-get build-dep | ||
| + | ~~~ | ||
| + | |||
| + | Pour contruire un paquet Debian voir | ||
| + | https:// | ||
| + | |||
| + | ~~~bash | ||
| + | dpkg-buildpackage -rfakeroot -b -uc -us | ||
| + | ~~~ | ||
| + | |||
| + | Ou | ||
| + | ~~~bash | ||
| + | debuild -b -uc -us | ||
| + | ~~~ | ||
| + | |||
| + | -------- | ||
| + | |||
| + | ### Erreur Key generation failed: Permission denied | ||
| + | |||
| + | ~~~bash | ||
| + | gpg --gen-key | ||
| + | ~~~ | ||
| + | |||
| + | Erreur | ||
| + | ~~~ | ||
| + | We need to generate a lot of random bytes. It is a good idea to perform | ||
| + | some other action (type on the keyboard, move the mouse, utilize the | ||
| + | disks) during the prime generation; this gives the random number | ||
| + | generator a better chance to gain enough entropy. | ||
| + | gpg: agent_genkey failed: Permission denied | ||
| + | Key generation failed: Permission denied | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | $ ls -l $(tty) | ||
| + | crw------- 1 root tty 136, 0 Mar 30 15:59 /dev/pts/0 | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Solution : | ||
| + | ~~~bash | ||
| + | # export GPG_TTY=$(tty) | ||
| + | # sudo chown MonUser /dev/pts/0 | ||
| + | sudo chown $(whoami) $(tty) | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Pb gpg: cancelled by user - gpg: Key generation canceled. | ||
| + | |||
| + | ~~~bash | ||
| + | gpg --gen-key | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | Real name: aaaaaa | ||
| + | Email address: aaa | ||
| + | Not a valid email address | ||
| + | Email address: aaa@localhost | ||
| + | Comment: | ||
| + | You selected this USER-ID: | ||
| + | " | ||
| + | |||
| + | Change (N)ame, (C)omment, (E)mail or (O)kay/ | ||
| + | You need a Passphrase to protect your secret key. | ||
| + | |||
| + | gpg: cancelled by user | ||
| + | gpg: Key generation canceled. | ||
| + | ~~~ | ||
| + | |||
| + | #### Solution | ||
| + | |||
| + | ~~~bash | ||
| + | chmod o+rw $(tty) | ||
| + | # ou | ||
| + | script /dev/null | ||
| + | ~~~ | ||
| + | |||
| + | ou | ||
| + | ~~~bash | ||
| + | dnf install pinentry | ||
| + | mkdir ~/.gnupg -m 700 | ||
| + | echo " | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Pb gpg: public key decryption failed: Permission denied | ||
| + | |||
| + | |||
| + | #### Solution | ||
| + | |||
| + | ~~~bash | ||
| + | $ gpg --decrypt --pinentry-mode=loopback example.gpg | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | -------------- | ||
| + | |||
| + | ### Pb de taille ! Err out of secure memory while allocating 4096 bytes | ||
| + | |||
| + | Normalement l' | ||
| + | Mais à cause de ma clef de 16k, ça bug | ||
| + | ~~~ | ||
| + | $ gpg -r jean@acme.fr --sign --encrypt data.dat | ||
| + | gpg: out of secure memory while allocating 4096 bytes | ||
| + | gpg: (this may be caused by too many secret keys used simultaneously or due to excessive large key sizes) | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | #### Solution : Compilation sous Debian (et patch) | ||
| + | |||
| + | ~~~bash | ||
| + | sudo apt-get build-dep gnupg | ||
| + | apt-get source gnupg | ||
| + | cd ~/ | ||
| + | ./configure --enable-large-secmem | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | FIXME | ||
| + | Voir : | ||
| + | * proc_sec_gpg2.odt | ||
| + | * pgp_7663c664.pdf | ||
| + | |||
| + | |||
| + | |||
