Public keys sent by the frontend are invalid if in pem format
they contain \n
characters, of wich the antislash is not escaped in the JSON string, which result in an invalid decoded result.
Plus, they should be validated useing a public key checker