Hi everyone,
Here's my public key (pub.pem):
Code:
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArnXhdXgd38iiwFqjSRT4
oi5g4XboKsxORJr21ip17AILoiEyNmXojY6DonvohIMn1Nr4iw6ScMt/7gVk3Z3Y
CLcPuJV6SMb6TRxE6NnCg9q/6Nxq21X7aUDwdP6L98PaCpU7879pHXCS5t3E+xw7
hDIzikL1nfQrY4kgsZLM75HsYzewBu8Hl2CTibUlLItz5h+yTC/tiG7cQRJdVKCw
bp3DwYgfvbhd9WYaPM3ESg8ho/MstAKtgdiRDWESPP+yWDGWU5ymhoETwKNEOsme
AujhInHW7qgzhfALvBRw3hc0lDFKeByJ/0Re4mm4et/tsnxp/5Px6qwbNacZORMj
WwIDAQAB
-----END PUBLIC KEY-----
And here's the command I'm using to try to encrypt a message (contained in file "archivo") and save the result to file "encriptado":
Code:
openssl rsautl -encrypt -inkey pub.pem -pubin -in archivo -out encriptado
But I keep getting the error: "Unable to load Public Key".
Any ideas on why this is happening?