- 1 Introduction
- 2 Common Misconceptions
- 3 Related Tools
- 4 Links
- 5 Advanced Topics
- 6 FAQ
- 7 Footnotes
- 8 License
TODO: To be written.
See also Verifying Software Signatures.
Figure: How PGP Works 
In English Language
- OpenPGP For Beginners [archive]
- OpenPGP Getting Started [archive]
- Free OpenPGP Courses [archive]
- OpenPGP Help Spread [archive]
- See also if there are any crypto parties [archive] in your vicinity.
- Try typing "crypto party" followed by the nearest city in a search engine of your choice.
- https://www.elstel.org/software/GnuPG-usage.html.en [archive]
In German Language
- Informationen über OpenPGP [archive]
- kostenlose Schulungsangebote [archive]
- Förderung von OpenPGP [archive]
- https://www.elstel.org/software/GnuPG-usage.html.de [archive]
Air Gapped OpenPGP Key
Clearsign with Multiple Keys
The OpenPGP Web of Trust
Bootstrapping OpenPGP keys from the web
What in case you want to totally stay anonymous or have no trust path to a OpenPGP key?
Some people just write an unencrypted mail to the recipient and ask them to send their public key. The recipient will most likely either send its public key or at least its fingerprint.
This works against passive attacks. An observer wouldn't know what they have been talking about in the following encrypted mails. This totally fails against active attacks. A man-in-the-middle could replace the recipient's key with its own malicious key. The sender would use the wrong key, the man-in-the-middle would decrypt the message, read it, and re-encrypt it with the legit key and forward it to the recipient. Neither sender nor recipient would ever find out that their messages are being read by an adversary. - This is the whole reason, why the trust model path and key signing is recommended in the first place.
As an alternative, some people also publish their OpenPGP fingerprint or their OpenPGP public key on their personal or other websites. This gets more secure, if the website is accessible over SSL (more when both server and client are using HSTS [archive] [and DNSSEC [archive]]) and/or as an onion service with a .onion domain. Of course, this presupposes, that the visitor is aware what kind of transportation mechanism is provided. In this case, the adversary would have to break the SSL or onion encryption while someone wants to obtain the key or fingerprint or to compromise the server, which may take, depending on the adversary more resources. Note, that both, the public CA system of SSL and Tor onion services have security issues, see SSL and Onion_Services#Onion_Services_Security for more information.
For such a model, it is best if the same website is accessible over both, https and .onion and the user visits both sites and compares if the results match.
To further improve the situation the key holder can spread its fingerprint and/or OpenPGP key to other websites. Some key holders attach their OpenPGP fingerprint to their e-mail signature (a short attachment of any mail) and participate(d) various public mailing lists. It will be difficult for an adversary to spoof all those information. This only helps, if the one trying to obtain the key is either aware of that or researching that on their own initiative.
GnuPG Key Encryption vs OpenPGP Hardware Protection
|GnuPG encryption of OpenPGP private key||hardware protection |
|OpenPGP private key can be protected by software encryption||Yes ||No |
|OpenPGP private key can be stored encrypted on storage||Yes ||No  |
|implementation of software or device 100% Freedom Software||Yes||No |
|can be independently reproduced and audited||Yes||No |
|number of people capable of auditing the implementation||small ||very small |
|OpenPGP private key protected by hardware, as in it is very difficult to extract the key from the devices storage||No||Yes |
|wipes OpenPGP private key once physical tampering is detected (FIPS 140-2 Level 3 [archive])||No||No (?) |
|OpenPGP private key access notification||No||Some, yes? |
|secret  can be entered on a secure external device ||No||Some, yes. |
|OpenPGP private key can no longer be abused once detached from malware infected machine||No ||Yes |
|user difficulty to remember secret||Medium ||Easy |
|usability||Medium ||Difficult |
|OpenPGP private key security once lost (without machine compromise) ||protected by software encryption  ||protected by hardware    |
|OpenPGP private key cannot be used by malware  when key attached  and passphrase stolen  or pin cached||No||No|
|OpenPGP private key cannot be extracted, deleted or revoked by malware||No ||Yes|
|encryption of users data still effective once malware infected||No ||No |
|signatures cannot be created by malware||No||No|
|signature counter on hardware device||No||Yes |
|signature counter on computer display trustworthy if attached on malware infected computer||Not applicable.||No |
|signature counter trustworthy if attached on malware free machine ||Not applicable.||Yes|
Both options have unique advantages. Unfortunately, it is not yet possible to combine both options. 
Why aren't the SKS keyserver wiki steps always functional?
The SKS keyserver network has recently come under attack after a critical vulnerability was discovered which allows certificates to be spammed using a flaw in the OpenPGP protocol itself. Future releases of OpenPGP software will likely mitigate this flaw, but high profile contributors to the protocol suggest that data should not be retrieved form the network at present if possible. For more details, see here [archive].  
- https://en.wikipedia.org/wiki/File:PGP_diagram.svg [archive]
- As defined by TUF: Attacks and Weaknesses:
- http://lists.gnupg.org/pipermail/gnupg-users/2015-January/052185.html [archive]
- token or smartcard
- If a secure password has been chosen to protect the OpenPGP private key.
- The OpenPGP private key is stored unencrypted on the storage of the smartcard or token.
- Stored on hdd, usb, etc.
- Stored on the memory chip of the smartcard or token.
- Source: 1) gnupg-users mailing list: Possible to combine smartcard PIN with key password? [archive] 2) Patrick Schleizer specifically asked Werner Koch about this at c3c1. This is neither possible nor a planned or likely future feature.
- Specification may be Freedom Software, but currently there are no blueprints for smartcards or tokens that are Freedom Software.
- Due to the absence of blueprints and copyright, no other company can reproduce/audit security.
- Written in C and using cryptography. Hard stuff.
- Hardware is more difficult than software. That type of hardware is even harder. Only the engineers of producers have a chance to best understand it. In the case of closed hardware implementations, which most (all?) tokens and smartcards are, open and independent audits are impossible.
- It is very difficult to read the storage of smartcards and tokens. Professional data recovery companies usually decline requests for recovery from such storage.
- As far as known, no OpenPGP tokens or smartcards claim to poss this security feature.
- Some external smartcard readers blink a flashlight and/or tone when key is being accessed?
- password vs pin
- On an external device that is usually not infected by malware.
- Example: spr332
- A skilled adversary will take a copy of the OpenPGP private key as well as the passphrase for the case that the user manages to move on the a malware free machine.
- Since adversaries cannot extract the key to get a copy, once the compromise has been undone (either by chance, by doing a clean re-installation which the malware did not survive or because of noticing of the malware), future files/mails encrypted to the private key can no longer be decrypted by the adversary. No new malicious signatures can be made anymore. Revoking previously compromised keys would still be advisable, because the adversary could have created a huge number of signatures for all sorts of texts and/or files.
- a long passphrase
- a medium sized pin
- Arguably, OpenPGP is not that simple. In compression, OTR has a smaller feature set (for example, no signatures for publicly released files), but encryption is much more usable. OTR is younger and has more users.
- Initial setup is harder than GnuPG private key password encryption and generally hard.
- Assumption, 1) no malware on users computer 2) either the storage (hdd, usb, etc.) holding the OpenPGP private key vs token or smartcard has been lost, stolen or robbed.
- The adversary would require either 1) a backdoor in gnupg itself 2) or a backdoor in the distribution that shipped gnupg 3) or have found a vulnerability in gnupg 4) or have found an effective weakness in the encryption algorithm used by gnupg
- No vulnerabilities in gnupg's private OpenPGP key encryption have ever been reported.
- Quote wikipedia [archive]:
Smart cards can be physically disassembled by using acid, abrasives, or some other technique to obtain unrestricted access to the on-board microprocessor. Although such techniques involve a fairly high risk of permanent damage to the chip, and irrecoverable loss of the secret keys therein, they permit much more detailed information (e.g. photomicrographs of encryption hardware) to be extracted.
- Other, non-OpenPGP smartcards have been cracked in past using ultra-expensive electron-scanning microscopes. Source: theguardian, http://www.theguardian.com/technology/2002/mar/13/media.citynews [archive]
- http://www.cl.cam.ac.uk/~sps32/mcu_lock.html [archive]
- More information on the realism, difficulty and cost of such attacks is required. If you know more information, please add them here.
- If machine used by the user has been compromised by malware such as trojan horse.
- On storage (hdd, usb, etc.) vs on token or smartcard)
- By keylogger or extracted from memory once cached.
- Therefore make sure to have a backup on storage that is never attached to that machine.
- An adversary who manged to compromise the user's machine can use a keylogger to sniff the OpenPGP private key password once it is entered next time of extract it from memory if it is still cached. Any of the users encrypted e-mail, files, etc. (that are read from the users devices or that have been extracted from other sources, such as by man-in-the-middle attacks or obtained from the user's mail provider and so forth) can then be decrypted.
- An adversary who manged to compromise the user's machine can wait until the user caches its pin next time. Otherwise, same as above. Once a machine has been compromised, nothing it shows can be trusted anymore. Even if the PIN is never cached. If the PIN is cached or not is up to the software on the users machine which can be no longer trusted once compromised. The adversary could install its own key caching software (gnupg-agent). Instead of the users request "decrypt mail X", malware can also intercept this and make it "decrypt mail Y and X".
- Users could attach their smartcard to other computers, perhaps non-compromised, perhaps offline machines and check the signature counter. For example output, see: http://spin.atomicobject.com/2014/02/09/gnupg-openpgp-smartcard/ [archive]
- One malware is running on a machine, nothing the machine's display can be trusted. It could be manipulated by the malware.
- Assumption: The tooken or card reader has not been compromised by malware running on the users machine.
- New, experimental keyservers have been established which afford protection against this attack.
- The author notes the potential downsides of this attack:
- If you fetch a poisoned certificate from the keyserver network, you will break your GnuPG installation.
- Poisoned certificates cannot be deleted from the keyserver network.
- The number of deliberately poisoned certificates, currently at only a few, will only rise over time.
- We do not know whether the attackers are intent on poisoning other certificates.
- We do not even know the scope of the damage.
The rest of this page is under the following license.
Whonix ™ OpenPGP wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Whonix ™ OpenPGP wiki page Copyright (C) 2012 - 2020 ENCRYPTED SUPPORT LP <email@example.com>
This program comes with ABSOLUTELY NO WARRANTY; for details see the wiki source code.
This is free software, and you are welcome to redistribute it under certain conditions; see the wiki source code for details.
This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation. Policy of Whonix Website and Whonix Chat applies.
Copyright (C) 2012 - 2020 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)