Exploring the public key

Similarly, the public key can be explored using the following commands. Public and private keys are base64-encoded:

$ openssl pkey -in publickey.pem -pubin -text
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiThQcz8trznenpgZP1Bq8w8u0 74A2J2MQX4hCSHf6/hMjLfxdeJNnw0zlcMV2l08YkIA/gSronsv+vfYrZ66lv8cv 6aHAzL6G4/EAp4BJ7TnTaFUmjfrdH/Z0TN4lTPeJs9/wv7+L176GnD8j5K/9I4SF 
dMKArq1xk4IYKiGx0QIDAQAB
-----END PUBLIC KEY----- Public-Key: (1024 bit)
Modulus:
00:a2:4e:14:1c:cf:cb:6b:ce:77:a7:a6:06:4f:d4: 1a:bc:c3:cb:b4:ef:80:36:27:63:10:5f:88:42:48: 77:fa:fe:13:23:2d:fc:5d:78:93:67:c3:4c:e5:70: c5:76:97:4f:18:90:80:3f:81:2a:e8:9e:cb:fe:bd: f6:2b:67:ae:a5:bf:c7:2f:e9:a1:c0:cc:be:86:e3: f1:00:a7:80:49:ed:39:d3:68:55:26:8d:fa:dd:1f: f6:74:4c:de:25:4c:f7:89:b3:df:f0:bf:bf:8b:d7: be:86:9c:3f:23:e4:af:fd:23:84:85:74:c2:80:ae:
ad:71:93:82:18:2a:21:b1:d1
Exponent: 65537 (0x10001)

Now the public key can be shared openly, and anyone who wants to send you a message can use the public key to encrypt the message and send it to you. You can then use the corresponding private key to decrypt the file.