How to export my Protonmail private key?
From: https://github.com/scastiel/protonmail-export
1) Open the ProtonMail app and log out completely. You should now see
the login screen.2) Open the dev tools of your browser, and the Network tab to see all
network calls.3) Enter your username and password and click Login button. You won’t
need to go further.4) In the network calls, find the one to “/api/auth”. There may be
several ones, be sure to pick the one with “POST” request method, not
the “DELETE” one (which doesn’t contain any info anyway).5) In this network call, open the Response tab to see raw data
returned from the server, find the line beginning with “PrivateKey”:,
and copy the rest of the line, from “—–BEGIN PGP PRIVATE KEY to the
last “, without the trailing comma.6) Open the Console tab of the dev tools, type console.log(<PASTE THE COPIED CONTENT HERE>) then press enter.
7) Copy the result of the command, and put it into a text file, that’s
it you have your private key!
But I am stuck at “6)”. The
console.log("-----BEGIN PGP PRIVATE KEY B........----")
part doesn’t output anything (the “….” part is of course censored).
So now.. I can format by hand the private key to look like a private key, I can even import it with “seahorse”! I thought I winned the game, but… when I try to:
gpg --encrypt --sign --armor -r foobar@protonmail.ch message.txt
It asks for a GPG key password. I use a password manager, so I copy/paste the MAILBOX password that I use, but here is the catch: it doesn’t accepts it!
Question: What am I missing?
I also asked scastiel via mail, posting the answer here if he replies, but maybe someone else knows the solution too.
In step “5)” I can see that there is a line named “KeySalt”.. maybe Protonmail introduces salt after the howto from scastiel?
Protonmail support wont help on exporting the private keys.
UPDATE: I wrote “MAILBOX” password, that means I still use Protonmail with two passwords: one for login, and one mailbox pw for the “decryption”.