Currently, Mastodon and Pleroma are publishing public keys on profiles in different formats. I discovered this when I tried to load a Pleroma public key using PHP's built-in openssl, and it failed.
Compare:
"publicKey": {
"id": "https://mastodon.social/users/Gargron#main-key",
"owner": "https://mastodon.social/users/Gargron",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvXc4vkECU2/CeuSo1wtn\nFoim94Ne1jBMYxTZ9wm2YTdJq1oiZKif06I2fOqDzY/4q/S9uccrE9Bkajv1dnkO\nVm31QjWlhVpSKynVxEWjVBO5Ienue8gND0xvHIuXf87o61poqjEoepvsQFElA5ym\novljWGSA/jpj7ozygUZhCXtaS2W5AD5tnBQUpcO0lhItYPYTjnmzcc4y2NbJV8hz\n2s2G8qKv8fyimE23gY1XrPJg+cRF+g4PqFXujjlJ7MihD9oqtLGxbu7o1cifTn3x\nBfIdPythWu5b4cujNsB3m3awJjVmx+MHQ9SugkSIYXV0Ina77cTNS0M2PYiH1PFR\nTwIDAQAB\n-----END PUBLIC KEY-----\n"
},
"publicKey": {
"id": "https://edolas.world/users/0x1C3B00DA#main-key",
"owner": "https://edolas.world/users/0x1C3B00DA",
"publicKeyPem": "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEArOZcTGQ8CQW1Z4aY8okyfaZrGndOcVr2SPAOOmU/C7pDr7mMbOnY\nlA8lUAeUvk294v3j69BBLI5El9x+KcroT99qyAxioLS0W1T60zi+2OfcHoD5apSG\nkWdXKLJkIW0FVnX67eY18TrKKvhoFi7iGtHW+C0XKTkb7DNDqg3pVJj56lDJDn3v\ndUWekKzw4PcKPB4/AR1LCnGPMhRyTsg6kjemw3S95zlw39/TNsNkHCch6332GeaJ\noUkwg1bAnVlAGNszAj8ZL/rPfvPIeHzSFOUfVkeAb4faChrhplcos0ah+b1xoZHm\nBCDxzyMxSkUAQa/q8k5Jp+qE6l6Z+02hXQIDAQAB\n-----END RSA PUBLIC KEY-----\n\n"
},
It would be great if the encoding format was specified so that we don't continue to have implementations use differing formats.