FlowCrypt / flowcrypt-browser

FlowCrypt Browser extension for Chrome and Firefox
https://flowcrypt.com
Other
375 stars 46 forks source link

import subkey-only keys #1221

Closed niftic closed 5 years ago

niftic commented 6 years ago

My private key has 2 subkeys: one for encryption and one for signature. The master key is kept apart. When I try to import the keys when installing FlowCrypt, I get the message: "This key is not be supported by FlowCrypt yet. Please write at human@flowcrypt.com to add support soon. (decrypt error: Error: Invalid enum value.)"

However, I know for a fact that this particular setup has worked in the past. I have a computer that is currently setup this way. So I suspect that a relatively recent update (in the last few months or so) made some changes to the parsing method which don't allow this kind of setup anymore. If you want I can try to compile previous versions to see if it works.

Here are an example of the key setup I am using, just in case anyone wants to test it. One files contains the 3 keys and the other only the 2 subkeys: Test user subkeys only.txt Test user with masterkey.txt The passphrase is FlowCrypt

tomholub commented 6 years ago

Thank you so much for the test keys, that helps. If you are on version > 5.8.0, we have migrated to openpgp.js v3. I'll look into this.

niftic commented 6 years ago

Yes we are currently using version 5.9.4. The hypothesis that the library change is causing problems seems very plausible to me, because a bunch of new errors have been poping up in the last days. I will probaly create more issues but I have yet to determine what is special with each case.

tomholub commented 6 years ago

There has been a lot of development and bug fixing since the change, so some of the errors you experienced may have been fixed since. I you do manage to see any misbehaviour that was not fixed, please do report.

On Sat, 11 Aug 2018, 00:11 hommehabile, notifications@github.com wrote:

Yes we are currently using version 5.9.4. The hypothesis that the library change is causing problems seems very plausible to me, because a bunch of new errors have been poping up in the last days. I will probaly create more issues but I have yet to determine what is special with each case.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FlowCrypt/flowcrypt-browser/issues/1221#issuecomment-412146519, or mute the thread https://github.com/notifications/unsubscribe-auth/AGA8kVXc7U8mWTZGG-rvNf9DvMZiL6Qiks5uPb65gaJpZM4V4bZy .

niftic commented 6 years ago

Unfortunately, this precise problem has not been fixed. However, I made a mistake: I inverted the name of the 2 files in my first post! I edited my post to set it right. Now, if you try to setup the Chrome FlowCrypt extension with the "Test user subkeys only.txt" file, it will prompt you with the error message I was reporting. I am sorry for the confusion. Thanks again for your quick replies.

niftic commented 6 years ago

I have additionnal information. Someone who was already setup using the previously mentionned configuration received the following error: "One of your keys <...> is not well supported yet (Unknown s2k type.)." when trying to decrypt an email.

This is because when the masterkey is present, we can see that the s2k (string-to-key) algorithm is a normal "Iterated and salted": screenshot 1

However, when the masterkey is removed, the corresponding s2k is replaced by a dummy one: screenshot 2 Which the extension is not able to recognize. When encountered, it should skip it and go on to the next key. Here are the complete pgpdump of the keys posted in the beginning: pgpdump subkeys only.txt pgpdump with masterkey.txt

tomholub commented 6 years ago

ref https://mail.google.com/mail/u/0/#inbox/FMfcgxvzKklPGxSlPHjcLLgnlqXTPbrV

tomholub commented 6 years ago

one more user having this issue: https://mail.google.com/mail/u/0/#inbox/FMfcgxvzKbLVsqKfZtBkHNSTKzGQcxNq

tomholub commented 6 years ago

ref https://mail.google.com/mail/u/0/#sent/FMfcgxvzKktTBtfZzLTXSjqMrxnBvCQX

hollowaykeanho commented 5 years ago

+1. Highest priority. I'm highly uncomfortable with using my GnuPG master secret key.

I have a secondary key but got rejected due to same reason on version 6.0.2 Mozilla add-on:

This key is not be supported by FlowCrypt yet. Please write at human@flowcrypt.com to add support soon. (decrypt error: Error: Invalid enum value.)

The process of creating the secondary key is published under this link: https://sites.google.com/view/chewkeanho/guides/gnupg/best-practices/third-party-app

tomholub commented 5 years ago

ref https://mail.google.com/mail/u/0/#sent/FMfcgxvzKbNpkcjHqJtrzVkllQsMpTld

tomholub commented 5 years ago

ref https://mail.google.com/mail/u/0/#inbox/FMfcgxvzKtSFJbcWPprXnBJmvSHkmlrP

tomholub commented 5 years ago

ref https://mail.google.com/mail/u/0/#inbox/FMfcgxvzKtSFJXMTKLJRxkvtbRpWTBKj

tomholub commented 5 years ago

ref https://mail.google.com/mail/u/0/#inbox/FMfcgxvzLDqnTKXzpJbRhCTlLwfGBXNt

tomholub commented 5 years ago

ref https://mail.google.com/mail/u/0/#inbox/FMfcgxvzLrHLJfdfKSPgMKXGsGRzkwQf

tomholub commented 5 years ago

ref https://mail.google.com/mail/u/0/#inbox/FMfcgxwBTkDHkJHPSJbxjdwNfcmxgvKk

tomholub commented 5 years ago

https://github.com/openpgpjs/openpgpjs/issues/829

antoineco commented 5 years ago

I just installed FlowCrypt for the first time (Firefox) and am facing the exact same issue.

For both rsa2048 and ed25519, I tried importing a signature only key and an encryption only key. None of them work.

This key is not supported by FlowCrypt yet. Please write at human@flowcrypt.com to add support soon. (decrypt error: Error: Invalid enum value.)
tomholub commented 5 years ago

https://github.com/openpgpjs/openpgpjs/issues/251

tomholub commented 5 years ago

We have put up a 1k USD bounty to get this resolved at https://github.com/openpgpjs/openpgpjs/issues/251#issuecomment-466794922