-
Notifications
You must be signed in to change notification settings - Fork 126
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
openpgp unsupported feature #46
Comments
Seems like a public key not supported by Go's OpenPGP library. Would you be willing to share your public key so that it can be reported upstream? |
Hi! I'm getting the same issue with a brand new protonmail account, am I doing something wrong? :( |
My public key is vanilla — generated by ProtonMail and resides on their keyserver. It’s standard 2048b RSA — never changed.
|
All right, this seems related to this issue: golang/go#18576 |
FWIW, ProtonMail has a fork with support for ECC signatures. I'm not convinced this is high-quality enough for us to switch to it, it would be a lot better if they/someone upstreamed it. However one could try to use it instead of |
Maybe we could check if the Keybase fork supports it. |
At this risk of betraying how ignorant I am of these cryptographic matters, I'm curious: how did this change out from under us? This was working just a week or two ago - what's the difference now? Is there anything I can do to get it working again or fix the problem? |
@apiote I can load your public key without any issue. Here's the code I used: https://gist.github.com/emersion/c71522528309898e67594e259542bb0b Also useful for debugging is this command: Maybe the issue comes from another public key? Or maybe a private key? @d4hines It would be useful to try to switch to ProtonMail's fork (or Keybase's) and see if it fixes the issue. |
I tried the code with my private key (I exported some time ago from Protonmail) and it can be loaded without errors. All my public and private keys work with Your code. I would have to check the key sent after successful authentication (but it should be the same as my exported key). |
I can confirm that too |
I ran into this today. My key is just the one protonmail sets up for you.
edit: I just moved to self hosted |
Try the ProtonMail fork, try the Keybase fork. |
FYI, Fastest way to get one is to generate a ed25519 keypair by gpg, and to sign sth. with it. $ cat >/tmp/new-key.conf <<EOF
Key-Type: eddsa
Key-Curve: Ed25519
Key-Usage: sign
Name-Real: Some User
Name-Email: [email protected]
Subkey-Type: eddsa
Subkey-Curve: Ed25519
Subkey-Usage: sign
Expire-Date: 2022-02-22
Preferences: AES256 AES192 AES SHA256 Uncompressed
%commit
EOF
$ gpg --batch --gen-key /tmp/new-key.conf |
Having this issue as well on my end. |
Any progress? I ran into the same problem. Is there anything I can do to help? |
Yes. Please try the forks linked above and see if they support your key. |
@emersion Can you offer an instruction on how to do so for dummies that are not familiar with go programming?
Currently this issue is blurrish, because I have no effing clue where hydroxide stores the keys, and whether even it does or not, and what to do with them. |
The keybase.io fork has what you need. Please forgive me for not sharing a PR or the like—I don't use this project. Just happened upon the error message. |
@wmark Thanks for the pointer. @cookiengineer Can you try replacing |
I tried to build with keybase fork with no luck I get |
A quick fix would be to replace all occurrences of |
I too attempted to replace
Still returns |
Hi all! |
Yes, that's part of the suggestions above. Please try it. |
I tried some of the suggestions:
(also, If I replace
|
Works for me. I'm not affected by this bug so it's not like I personally care. It you care, please investigate and send a patch. I want to remind you that I'm a volunteer working on this project during my free time. My goal is not to make people use my software. I just share it so that it can be useful to other people too. |
With all due respect, I find it a bit alarming that the maintainer of this repository would say something like that. There isn't a single comment above yours that comes off as self-entitled. Everyone is just trying to help. The community has tried your suggestions, and your suggestions have failed. We are now turning to you asking what to do next. This is an open source project, but you understand this codebase more than anyone. It makes sense that people would ask you. You mentioned that you "share it so it can be useful to other people too," but I'm in the same boat as everyone else here - this bug prevents this code from working for me, and therefore it is useless to me. "But it works on my machine" has never been a good enough answer in the history of software development. I would like to use this software, and while you rightfully can't be compelled to do anything for us, I'm sure I speak for everyone when I say we would appreciate just a little enthusiasm. |
This is ridiculous. The only person who's acting entitled here is you - apparently you're entitled to @emersion's time and work for free. Is that any way to thank someone who's made a great project that you obviously find useful and important? That's sick. You need to correct your attitude about open source. If you want something, it's up to you to do it. Not anyone else. |
@nast90210 I've tested you latest version of the patch and got a segmentation violation
|
For some reason I've been able to reproduce today. I've pushed a fix which shouldn't weaken security while still using the official Go library. It seems this public key algorithm which isn't yet implemented is only used for SRP. Unfortunately it seems using the Keybase fork doesn't help and introduces more bugs (#51). |
@emersion i'm still getting error (v0.2.2, 139f392/HEAD)
|
Gah. Can you try to track down where this one is coming from? I wonder why the algorithm changes like this from user to user. I'll try to improve error reporting tonight. |
first we need to understand how your system is differ from my system i'm using voidlinux (x86_64, glibc) ✘ ~ go version
go version go1.12.2 linux/amd64 what other factors can influence? |
Because hydroxide is pure Go, the issue is unlikely to be related to our systems. It's probably a thing on ProtonMail's end. |
Added more details to errors. Does that help? Does anyone else have this issue? |
Pay attention to the pm.me thing. This may be the root of my problem and anyone else with multiple email addresses in his account. |
Can you try again? I updated hydroxide to skip keys it can't read. It won't allow you to use keys the Go library doesn't support, but maybe it'll allow you to use other keys. |
👍 |
Good. Will publish a new release with this fix. Leaving this open since we still can't read some keys. |
warning: failed to check SRP modulus signature: openpgp: unsupported feature: public key algorithm 22 |
need to rewrite some code with her custom crypto lib (https://github.com/ProtonMail/crypto) : pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/contacts.go:167:66: not enough arguments in call to openpgp.CheckArmoredDetachedSignature
have (openpgp.KeyRing, *bytes.Buffer, io.Reader)
want (openpgp.KeyRing, io.Reader, io.Reader, *packet.Config)
pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/contacts.go:193:55: not enough arguments in call to openpgp.CheckArmoredDetachedSignature
have (openpgp.KeyRing, *strings.Reader, *strings.Reader)
want (openpgp.KeyRing, io.Reader, io.Reader, *packet.Config)
pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/crypto.go:39:15: subkey.Sig.KeyExpired undefined (type *packet.Signature has no field or method KeyExpired)
pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/crypto.go:56:137: i.SelfSignature.KeyExpired undefined (type *packet.Signature has no field or method KeyExpired)
pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/crypto.go:73:15: subkey.Sig.KeyExpired undefined (type *packet.Signature has no field or method KeyExpired)
pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/crypto.go:87:80: i.SelfSignature.KeyExpired undefined (type *packet.Signature has no field or method KeyExpired)
pkg/mod/github.com/emersion/hydroxide@v0.2.4/protonmail/srp.go:28:42: not enough arguments in call to openpgp.CheckDetachedSignature
have (nil, *bytes.Reader, io.Reader)
want (openpgp.KeyRing, io.Reader, io.Reader, *packet.Config) or try to use her custom openpgp : https://github.com/ProtonMail/gopenpgp |
I wonder why they broke the crypto API. What is this extra parameter to |
I have exactly the same issue. Recompilation with Keybase fork failed due to library incompatibility. Is there any solution to the problem? |
These should just be warnings. hydroxide should work fine even if these errors are printed. |
I encountered this error with one of my alias addresses and solved it by changing my security key to https://protonmail.com/support/knowledge-base/pgp-key-management/ |
I've attempted what @harleylang suggests with both an rsa-4096 and an rsa-2048 key, but neither seem to work - is this all you did? |
@TLATER Yes, as well as making the rsa-2048 the primary key |
This comment has been minimized.
This comment has been minimized.
I have an I would like to make my case for the Protonmail implementation. It is likely used server-side too, so even if it were the "weakest link", us using it would not further decrease security of the system. It's actively developed and is the most popular fork in terms of stars. We are also implicitly trusting that Protonmail developers do crypto correctly, as OpenPGPjs, the library used by the web client was also originally developed in-house. Furthermore, the recently open-sourced @emersion Would you merge such a change? |
hydroxide auth …
results inopenpgp: unsupported feature: public key algorithm 22
The text was updated successfully, but these errors were encountered: