It seems that Proton Mail publishes its customers public keys using at leasts two methods:
- WKD (Web Key Distribution)
- Exposes hkps server (host name: api.protonmail.ch)
Using WKD
Just retrieve public key using by issues the following command:
$ gpg --locate-keys [email protected]
gpg: key 6C74835C42CEF599: public key "[email protected] <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
pub rsa2048 2018-05-26 [SC]
49148230F11C0458BD19F45C6C74835C42CEF599
uid [ unknown] [email protected] <[email protected]>
sub rsa2048 2018-05-26 [E]
Of course it would be good to sign the key and distribute signed one to some public key server.
Using keyserver / HKPS protocol
You need to specify api.protonmail.ch
as keyserver for gpg
command:
$ gpg --keyserver hkps://api.protonmail.ch --search-key [email protected]
gpg: data source: https://api.protonmail.ch:443
(1) [email protected] <[email protected]>
EDDSA key 99411FBED9D31546, created: 2022-04-14
Keys 1-1 of 1 for "[email protected]". Enter number(s), N)ext, or Q)uit > 1
gpg: key 99411FBED9D31546: public key "[email protected] <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
The above command runs an “interactive” search against keyserver and prompts for option that allows to import the desired key.