--encrypt --recipient [email protected] filename evora<stief>/home/stief$ gpg --encrypt --recipient [email protected] hosts gpg: 6466EE42: There is no indication that this key really belongs to the owner 2048g/6466EE42 2000-11-03 "Wolfgang Stief (Office) <[email protected]>" Primary key fingerprint: 63C0 A826 5576 9F75 2EBB 7C76 D939 E576 2270 1105 Subkey fingerprint: 4D04 864C 1A95 E45C 9F69 F0D5 7986 D525 6466 EE42 It is NOT certain that the key belongs to the person named in the user ID. If you *really* know what you are doing, you may answer the next question with yes Use this key anyway? y evora<stief>/tmp$ ls -l hosts* -rw-r--r-- 1 stief best 1473 Jun 14 13:49 hosts -rw-r--r-- 1 stief best 1210 Jun 14 13:54 hosts.gpg
--decrypt filename • Output geht per default nach stdout! evora<stief>/tmp$ gpg --decrypt hosts.gpg > hosts You need a passphrase to unlock the secret key for user: "Wolfgang Stief (Office) <[email protected]>" 2048-bit ELG-E key, ID 6466EE42, created 2000-11-03 (main key ID 22701105) Enter passphrase: gpg: encrypted with 2048-bit ELG-E key, ID 6466EE42, created 2000-11-03 "Wolfgang Stief (Office) <[email protected]>"
--sign --recipient [email protected] filename • --sign kann mit --encrypt kombiniert werden • ¨ Uberpr¨ ufen einer Signatur mit --verify • Soll die Signatur in ein eigenes File, hilft --detach-sign (*.sig) • Soll das File Klartext bleiben aber trotzdem eine Signatur bekommen, gibt es den Schalter --clearsign (*.asc)
--recipient [email protected] hosts gpg: WARNING: recipients (-r) given without using public key encryption You need a passphrase to unlock the secret key for user: "Wolfgang Stief (Chaes) <[email protected]>" 1024-bit DSA key, ID 96116155, created 2000-10-30 Enter passphrase: File ‘hosts.gpg’ exists. Overwrite (y/N)? y evora<stief>/tmp$ gpg --verify hosts.gpg gpg: Signature made Mon Jun 14 14:08:48 2004 CEST using DSA key ID 96116155 gpg: Good signature from "Wolfgang Stief (Chaes) <[email protected]>" gpg: aka "Wolfgang Stief (sage@guug, GUUG) <[email protected]>" 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: C8ED 91A2 F5BD 7798 3433 DB01 33AD B7D9 9611 6155
Dateien an Kommandozeile • Gebr¨ auchliche Mailclients haben entweder native support (eher selten) oder arbeiten ¨ uber Plugins (OS beinahe egal) • f¨ ur g¨ angige Desktops gibt es GUIs zur Schl¨ usselverwaltung
Dritte bzgl. Umgang mit Schl¨ usseln • nicht mehr erforderlich, mit allen Kommunikationspartnern Schl¨ ussel zu signieren • GnuPG pflegt Trusts nicht im Schl¨ ussel selbst, sondern in getrennter Trust Database (~/.gnupg/trustdb.gpg) (private Info, userabh¨ angig) • vier Vertrauensstufen: I do not trust (n), I trust marginally (m), I trust fully (f), I trust ultimately (u) • Key ist vertrauensw¨ urdig, wenn er von mir pers¨ onlich, mit einem Schl¨ ussel vollen Vertrau- ens (f) oder drei Schl¨ usseln marginalem Vertauens (m) unterschrieben ist. • Key ist vertrauensw¨ urdig, wenn der Pfad vom Key zur¨ uck zu eigenem Schl¨ ussel maximal f¨ unf Hops betr¨ agt. • Zahlen sind Default-Werte und k¨ onnen verstellt werden: --completes-needed, --marginals-needed, --max-cert-depth
--edit-key [email protected] [...] pub 1024D/B3B2A12C created: 1999-05-11 expires: never trust: n/- [...] Command> trust [...] 1 = Don’t know 2 = I do NOT trust 3 = I trust marginally 4 = I trust fully 5 = I trust ultimately m = back to the main menu Your decision? 5 Do you really want to set this key to ultimate trust? y pub 1024D/B3B2A12C created: 1999-05-11 expires: never trust: u/- [...] Command> quit
¨ uber Command Line zug¨ anglich (Manpage) • Config-File, alle Schl¨ ussel + TrustDB lebt per default in ˜/.gnupg • Config-File dokumentiert sich selbst. Achtung: Bei einem Update von 1.0.x auf 1.2.x hat sich der Default-Name und einige Optionen ge¨ andert. Vorhandene Files werden nicht ¨ uberschrieben! (Debian: /usr/share/gnupg/options.skel) • alternatives User Interface: gpg --edit-key • Man-Page ist sehr ausf¨ uhrlich und auch lesenswert
ur andere, wie man selbst mit Keys umgeht • sch¨ arft eigenes Verst¨ andnis f¨ ur Zusammenh¨ ange, Randbereiche und m¨ ogliche L¨ ucken • definiert Vorgaben, nach denen man selbst andere Keys signiert • Beispiele: http://www.heise.de/security/dienste/pgp/policy.shtml http://www.zugschlus.de/gpg-policy