- Frequently Asked Questions
- Are my secret keys safe on my mobile device?
- How to import an OpenKeychain backup with gpg?
- What is the best way to transfer my own key to OpenKeychain?
- Should I confirm a key without manually comparing fingerprints?
- Can I mark other keys as trusted, without confirming them with my own key?
- I see no suitable option in the app selection menu when trying to open a local file, what’s wrong?
- NFC Security Tokens
- Advanced Questions
- Why is OpenKeychain’s database not password protected?
- Why is my password requested when I backup my keys?
- Everyone can delete my keys. Why is there no password request before?
- I have more than one subkey capable of signing. Which one is selected when signing with this OpenPGP key?
- Where can I find more information about OpenKeychain’s security model and design decisions?
- What is the relationship between APG and OpenKeychain?
- How to migrate from APG to OpenKeychain?
- Known Issues
- Partners and Support
Frequently Asked Questions
Are my secret keys safe on my mobile device?
This is a very common question, and it’s not an easy one. In the end it comes down to how much you trust your mobile device. The real question usually isn’t, “how safe are they”, but rather “are they less safe than on my laptop”? The answer depends on three factors:
- Do you trust the hardware? Obviously, there are no guarantees that the vendor of your phone hardware didn’t add some kind of backdoor. Then again, the same applies to your laptop’s hardware, so it’s about even.
- How easily can the device be stolen? This depends a lot on how careful you are, but this too is probably about even with your laptop.
- Do you trust the software? The Android operating system actually offers a lot more in the way of security between applications than desktop operating systems. No app without root privileges besides OpenKeychain can ever access the keys stored in OpenKeychain’s database. By comparison, any program you run on your computer can just upload your gnupg keyring, if those files belong to the same user. As long as Android as a platform is trustworthy, your keys are safe from malware apps.
In conclusion, we believe that secret keys are not notably less safe on your mobile than they would be on your laptop. If your security requirements are high enough that you don’t keep your keys on your laptop, you probably shouldn’t put them on your mobile either. Otherwise, they should be fine.
How to import an OpenKeychain backup with gpg?
- Make a backup from OpenKeychain and transfer it to your computer via email or a cloud provider, like Dropbox. This is safe because OpenKeychain backups are encrypted with Advanced Encryption Standard (AES) using securely generated Backup Codes.
On your PC, execute the following line:
# replace 'backup_YYYY-MM-DD.pgp' with the name of your backup file gpg --decrypt backup_YYYY-MM-DD.pgp | gpg --import
- Enter the full Backup Code with uppercase letters and dashes, e.g., “ABCD-EFGH-IJKL-MNOP-QRST-UVWX”
What is the best way to transfer my own key to OpenKeychain?
# generate a strong random password gpg --armor --gen-random 1 20 # encrypt key, use password above when asked gpg --armor --export-secret-keys YOUREMAILADDRESS | gpg --armor --symmetric --output mykey.sec.asc
You should make sure that your key can’t be intercepted during transfer. If you have an SD-Card reader in your phone, you can use this to easily transfer your key. If you don’t, you can transfer your key through an online service (such as E-Mail, Dropbox, …), but make sure to encrypt it during transfer!
To transfer your key to OpenKeychain from
gpg, the best way to do so is to encrypt it with a single-use password, which you never use anywhere else and never send online. Use
gpg as shown above to generate a random password, then export and encrypt your key with it.
Once the key is encrypted, transfer the file to your mobile using any method, decrypt the file with OpenKeychain. When asked, manually (!) input the password.
Do not use a weak password! This method is only safe if the password you use is very strong (like 20 random, alphanumeric characters), and humans are really bad at generating random strings. Use
gpg as shown above, or another random password generator of your choice.
Do not use an online password generator! This beats the purpose of using a generated password in the first place! An attacker who can get the file from your Dropbox account, can likely also see the Website you got the password from!
Should I confirm a key without manually comparing fingerprints?
To confirm someone’s key, you should make sure that it’s really that same key the other person wants you to confirm with their name on it.
Since keys are usually obtained from a keyserver, it is necessary to double-check that the keyserver gave you the correct key. This is traditionally done by manually comparing the key’s entire fingerprint, character by character.
However, scanning a QR code, receiving a key via NFC, or exchanging keys via SafeSlinger all have that same check already built-in, so as long as you trust the method used for key exchange, there is no reason to check the fingerprint again manually.
Can I mark other keys as trusted, without confirming them with my own key?
This is not a supported use case. You can, however, simply create a new key which you use for this purpose only, which will essentially be the same thing.
I see no suitable option in the app selection menu when trying to open a local file, what’s wrong?
You probably don’t have any stand-alone file managers installed, like OI File Manager or Amaze. OpenKeychain needs one in order to select files from local storage or SD card, such as for importing keys or encrypting/decrypting files.
NFC Security Tokens
What security tokens are recommended for OpenKeychain?
We recommend the Fidesmo Privacy Card, which can be bought for 14 EUR using the discount code
OPENKEYCHAIN2016 on the Fidesmo Shop.
Don’t forget to enter the discount code before checking out!
You can save 1 EUR and support the OpenKeychain project!
Other supported tokens:
- YubiKey NEO (50 EUR / 50 USD)
Are there other compatible tokens and more information?
We provide a table of currently supported hardware and advanced information on our wiki page.
Why is OpenKeychain’s database not password protected?
Your keys are already encrypted with their password - that’s the reason you have to input it for every crypto operation. There is no point in encrypting those keys again with another password, so password protecting the entire database would only protect the list of keys which are not yours. If this is important to you, consider using full disk encryption.
Why is my password requested when I backup my keys?
It is not required cryptographically, but prevents simple stealing of your keys.
Everyone can delete my keys. Why is there no password request before?
Anyone who can physically access your device can simply delete the app data from Android OS. Also, asking for a password before delete would prevent you from deleting keys where you forgot your password
I have more than one subkey capable of signing. Which one is selected when signing with this OpenPGP key?
OpenKeychain assumes that OpenPGP keys hold one usable signing subkey only and selects the first non-revoked non-expired non-stripped one it finds in the unordered list of subkeys.
We consider having more than one valid signing subkey an advanced usecase. You can either strip subkeys that should not be used using OpenKeychain’s edit key screen or explicitly select the right subkeys when exporting from gpg with
Where can I find more information about OpenKeychain’s security model and design decisions?
Head over to our Wiki.
What is the relationship between APG and OpenKeychain?
OpenKeychain has been created as a fork of APG in March 2012. Between December 2010 and October 2013 no new version of APG was released, which was seen as a problem by the community. Thus, we started OpenKeychain with the intention of picking up the development to improve the user interface and API. A first version 2.0 has been released in January 2013. After three years without updates, APG merged back security fixes from OpenKeychain and some months later rebased an entire new version on OpenKeychain’s source code. However, this process stopped in March 2014, while we continue to release regularly new versions of OpenKeychain. At time of writing (2015-12-09), a number of vulnerabilities have not been fixed in APG since the last release at 2014-03-24. We strongly recommend that users migrate to OpenKeychain and developers help us to actively maintain an OpenPGP solution for Android.
How to migrate from APG to OpenKeychain?
- Start APG and long-touch one key in your list.
- Touch the “Select all” button and then the “Export to file” button.
- Inside the dialog, check “Also export secret keys?” and press OK.
- After a successful export, start OpenKeychain and select “Import from File” inside the “+” button.
- You should now be able to navigate to the APG folder on your SD card and select the file to import all keys. If you experience problems here, try Amaze file manager.
Importing your own key from GnuPG fails
Before posting a new bug report, please check if you are using gpg prior to 2.1.0 and changed the expiry date before exporting the secret key.
Changing the expiry date of a key in gpg prior to version 2.1.0 breaks the secret key in a way which emerges only on export. It’s not a problem with OpenKeychain, we correctly reject the key because its self-certificates are either invalid, or have wrong flags.
This issue has been reported before (#996, #1003, #1026), and can be assumed to affect a large number of users. The bug in gpg has been fixed in gpg 2.1.0, but that version is currently only deployed in debian experimental and sid (unstable). Another bug report was opened in 2015 to backport the fix, but it looks highly unlikely.
The suggested workaround is to repair your key using 2.1 if possible:
You can of course repair it using 2.1 because there –export-secret-key takes the public key and only adds the secret parameters.
A wrong primary user id is shown when searching on a Keyserver
Unfortunately, this is a bug in the SKS Keyserver software. Its machine-readable output returns the user ids in an arbitrary order. Read the related bug report for more information.
Not working with AOSP Mail
For now, OpenKeychain will not support AOSP Mail due to bugs in AOSP which we cannot work around (#290).
Partners and Support
OpenKeychain is a project primarily driven by Dominik Schürmann and Vincent Breitmoser in their free time. However, we were supported by these companies/donations:
- Your donations
- Google Summer of Code 2014, 2015, and 2016 with 6 successful students
- Institute for Operating Systems and Computer Networks at TU Braunschweig
- Funding for one year to improve K-9 Mail support by Open Technology Fund
- Security audit sponsored by Open Technology Fund
- Yubico’s YubiKing price
- Hacking week at mailbox.org offices in Berlin together with K-9 Mail developers