Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
becki:linux:openpgp [2015-04-22 14:28] becki Switch presentation format |
becki:linux:openpgp [2015-05-27 15:26] (aktuell) becki |
||
---|---|---|---|
Zeile 24: | Zeile 24: | ||
==== Export / import Keys == | ==== Export / import Keys == | ||
- | Export a public key (create a texfile of your public key) | + | Export a public key (create a texfile of your public key). Preferably use the full id of the primary key (see list keys) as unambiguous identifier. |
- | gpg --armor --export <mykey> > myFullName.asc | + | gpg --armor --export <id> > myFullName.asc |
- | Import a foreign public key: | + | Export a private key: ([[http://stackoverflow.com/questions/5587513|source]]) |
+ | This seems to include the public key as well. Importing such a key also imports its corresponding public key. (tested) | ||
+ | gpg --export-secret-keys <id> > key.asc | ||
+ | |||
+ | Import a foreign key: | ||
ggp --import harryHirsch.asc | ggp --import harryHirsch.asc | ||
- | Validate the key with | + | An imported key needs to be validated(?). Validate the key with: |
- | gpg --edit-key Harry -> ''fpr'' -> Compare fingerprint by word of mouth -> ''sign'' -> ''check'' -> ''quit'' -> save:y | + | gpg --edit-key Harry -> fpr -> (Compare fingerprint by word of mouth) -> sign -> check -> quit -> save:y |
==== Encrypt / decrypt files == | ==== Encrypt / decrypt files == | ||
Zeile 37: | Zeile 41: | ||
Encryption of a file | Encryption of a file | ||
gpg --encrypt file | gpg --encrypt file | ||
- | | + | |
decrpytion | decrpytion | ||
gpg --decrypt file.gpg > file | gpg --decrypt file.gpg > file |