scastiel / protonmail-export

Export your ProtonMail e-mails. DEPRECATED, prefer ProtonMail Bridge: https://protonmail.com/bridge
54 stars 9 forks source link

Wrong passphrase error #5

Closed wiemann closed 7 years ago

wiemann commented 7 years ago

protonmail-export can't decrypt my private key. It's a OpenPGP.js v2.5.3 key. The error I get is "Wrong passphrase error" even though I can log on to the web interface with the exact same key without any issues.

Any idea?

wiemann commented 7 years ago

Oh, seems like they changed to the algo to hashed passwords.

ghost commented 7 years ago

@wiemann Could you elaborate on the "hashed passwords"? Which hash are they using for this?

wiemann commented 7 years ago

They now use a salt for the password. It's in the attribute "KeySalt" of the /auth response. You need to look at the code to see how they process it. But the protonmail-export library does not work anymore when utilizing the procedure described in the project readme.

ghost commented 7 years ago

@wiemann Got it, thanks.

ghost commented 7 years ago

https://github.com/ProtonMail/WebClient/blob/public/src/app/authentication/services/passwords.js#L29

Is where the hashing happens. Wouldn't be able to figure this out for the life of me using node; don't know what packages would do the trick.

dexice commented 7 years ago

Hello

I made a little script here : https://github.com/dexice/pmpkpe You should be able to recover the passphrase based on the MailBoxPassword and SaltKey