Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Keys with non-ASCII User Ids do not work #623

Open
az82 opened this issue Nov 22, 2018 · 9 comments
Open

[bug] Keys with non-ASCII User Ids do not work #623

az82 opened this issue Nov 22, 2018 · 9 comments

Comments

@az82
Copy link

az82 commented Nov 22, 2018

Update:

This issue affects all keys with non-ASCII characters in the name of the user Id. These keys cannot be used with Mailvelope.

Problem

Mailvelope marks some valid public keys as invalid. The keys cannot be used for encryption

How to Reproduce:

@My1
Copy link

My1 commented Nov 23, 2018

I had this with some keys from an older plugin version where after some update the key wouldnt work anymore.

@az82
Copy link
Author

az82 commented Nov 25, 2018

To clarify: To the best of my knowledge the offending keys were created with gpg and are accepted by every other piece of software I'm using.

@My1
Copy link

My1 commented Nov 25, 2018

I just noticed something intresting. both your and my key have a non-US-ASCII character in the name of the user ID (it even says that the user ID is invalid when importing the key) maybe something changed in some encoding stuff and mailvelope goes pretty damn strict about it.

@az82
Copy link
Author

az82 commented Jan 23, 2019

The issue still persists. @My1 raised an important point: All my public keys with non-ASCII characters in the name are marked as invalid. I'll update the issue to reflect this.

@az82 az82 changed the title Some public keys are marked as invalid [bug] Keys with non-ASCII User Ids do not work Jan 23, 2019
@az82
Copy link
Author

az82 commented Jan 23, 2019

Raised an issue with openpgpjs. It seems that parsing keys with non-ASCII unicode characters in the user Id is broken.

@az82
Copy link
Author

az82 commented Jan 31, 2019

Update: The offending key user Id's seem to be encoded with CP-1252 instead of UTF-8 and are indeed invalid. However, GnuPG accepts them.

@az82
Copy link
Author

az82 commented Feb 8, 2019

The keys were created with GnuPG using a Windows-1252 encoded settings file. Apparently GnuPG creates invalid keys in this case. I've raised an issue with GnuPG: dev.gnupg.org/T4360.

In my opinion, this is not an issue with OpenPGP.js as the keys are clearly invalid. Of course, it would be nice if the keys worked anyway as they do with GnuPG.

@toberndo
Copy link
Member

toberndo commented Feb 9, 2019

Thanks for analyzing this further. I have a slight preference for not accepting such keys. In any case this would have to be fixed in OpenPGP.js.

@My1
Copy link

My1 commented Feb 9, 2019

but that leaves the question my my super old key generated with mailvelope very long ago hasnt been accepted for quite a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants