Outils pour utilisateurs

Outils du site


blog

GPG - Publier sa clef sur un serveur

Serveur de clefs

gpg --refresh-keys
gpg --keyserver key_server --refresh-keys
gpg --keyserver pgp.mit.edu  --search-key

Publier

https://wiki.debian.org/fr/Subkeys

# gpg --send-keys --keyserver keyring.debian.org KeyID
# gpg --send-keys --keyserver subkeys.pgp.net KeyID
 
gpg --keyserver keyserver.ubuntu.com --send-key KeyID
#gpg --keyserver hkps://keys.openpgp.org --send-key KeyID
gpg --export KeyID | curl -T - https://keys.openpgp.org

Voir : https://keys.openpgp.org/about

Publier une clef que vous signé FIXME A vérifier

tsocks gpg --send-keys 5AA19646

Tor

Rafraîchissez vos clés l’une après l’autre. Parcimonie est un démon qui rafraîchit lentement votre trousseau de clés à partir d’un serveur de clés en passant par Tor. Il utilise un délai aléatoire

sudo apt-get install parcimonie

Penser à mettre à jour les clefs GPG via Tor grâce à parcimonie

http://genma.free.fr/?Mise-a-jour-des-clefs-GPG-via-Tor

You should not use gpg --refresh-keys or the refresh keys menu item on your email client because you disclose to anyone listening, and the keyserver operator, the whole set of keys that you are interested in refreshing.

2025/03/24 15:06

GPG - Plan

PGP ou GPG ?

PGP can refer to two things:

  • The Pretty Good Privacy software originally written by Phil Zimmermann, and now owned by Symantec.
  • The formats for keys, encrypted messages and message signatures defined by that software. These have now been formalised as the OpenPGP standard.

The GNU Privacy Guard (GPG) software is an independent implementation of the OpenPGP standards, so you can use it to exchange encrypted messages with people using other OpenPGP implementations (e.g. Symantec's PGP).

Due to its popularity on Linux systems, it is also fairly common for people to incorrectly use the term “GPG” to refer to the whole OpenPGP cryptography system (e.g. “GPG keys” or “GPG signatures”). It is usually pretty clear what they mean from the context though.

Source : https://askubuntu.com/a/186814

2025/03/24 15:06

GPG - limites et réserves à avoir

Alternatives

Alternative pour signer :

Alternative pour chiffrer :

Une implémentation moderne de PGP

Limites et problème de GPG

Voir aussi :

Problème Solution
Surreptitious forwarding attackUne clef pour signer différente de la clef pour chiffrer
PGP Certificate Flooding attacks(p) Utiliser les clefs en local sans jamais passer par des serveurs de clefs
Perte d'anonymat dans l'échange de clefsUtiliser tor/i2p ou échange de clefs en local
Complexe a utiliser(p) Fournir une documentation ou un outil clef en main
Code complexe et donc surface d'attaque trop large-
No forward secrecy(p) Changer régulièrement les clefs/sous-clefs
Metadata - Destinataire du messageUtiliser l'option --hidden-recipient ou --throw-keyids. Ne pas publier cette clef publique
Metadata - Version clef et autre Changer la conf par défaut
AFAIL AttackNe pas mettre sa clef privée dans un client mail ou alors désactiver HTML

(p) : Solution partielle

Voir https://www.bortzmeyer.org/gpg-option-no-keyid.html

2025/03/24 15:06

GPG - Générer une paire de clefs

Création des clefs

apt-get install rng-tools

Voir : https://github.com/drduh/YubiKey-Guide - OneRNG Voir aussi clrngd

/etc/default/rng-tools

HRNGDEVICE=/dev/urandom

Trouver une autre solution Voir https://lwn.net/Articles/525459/

service rng-tools restart
gpg2 --expert --gen-key
gpg2 --expert --edit-key 86E4065450014


addkey
save
change-usage
save

OU

cat >key-input <<EOF
%echo Generating a standard key
Key-Type: RSA
Key-Length: 4096
Name-Real: ${USER}
Name-Email: ${USER}@${HOSTNAME}
Expire-Date: 0
%commit
%echo Finished creating standard key
EOF
 
gpg2 --batch --gen-key key-input

Sauvegarde

Exporter sa clef

Voir :

Voir aussi :

  • Paperkey

Clef publique

gpg -a --export 0x50D12DE07663C664 > ~/.gnupg/jean@acme.fr.pub.asc

Clef privée

gpg -a --export-secret-keys 0x50D12DE07663C664 > ~/.gnupg/jean@acme.fr.sec.asc

Uniquement les sous-clefs privées

gpg -a --export-secret-subkeys 0x50D12DE07663C664 > ~/.gnupg/jean@acme.fr.sub.sec.asc

Exporter uniquement une sous-clef spécifique

gpg -a --export-secret-subkeys [subkey id]! > /tmp/subkey.gpg

Warning: If you forget to add the !, all of your subkeys will be exported.

2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki