lll@k:~/rsa$ openssl genrsa -out private.key 2048 && cat private.key
Generating RSA private key, 2048 bit long modulus
...................+++
.............+++
e is 65537 (0x10001)
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAxerVIGkZbbv8BN0DfOQ2hiNds+rx6a6qCxACOL4voyxWjBSX
Vd3ssOAXiV4OL81//UIdwjXVS4ohQI76RsdRokPkMsmATL0xfXVps1cJi7kpSxD+
SMX/NUPo8UA6jCj7/HvjjWk7UK3f7SzXH/CjsX6UTEM3mC5NdUXnAh0PNcfDCVtC
qlL34AUB2pXy6YI4TtsHzq7k2U9AAuEtDQwNgPAynfrOnjdGJ/6s5Tf67r7mDG9O
JXfoSub4njamIzFV9p7vYCrz/zWHJ1+6h/x1IlvsWXL1P1YmuViHeTBTmrbp4EL6
P8YaFhjARFKnfG2QbEKGmPNr+kYjqvAzv+mCswIDAQABAoIBAHfMNidBFqBCekCj
Wvoc1RgKjixaWQW+sLSzgvS/wev96YEu8Y+LHjrN2dFPOj0bIY61l3e3yBzKRmhi
YwG2oiYa/CT1rRBGMI+lI07nryKA+Iq0hYadOmYObhChdQ7ju+tPPiSZfsrOBE32
p1xw91R3ruIeiac217HVlwfDeTJuYIvzOM3eOMdBbj8NEV35pOUWBgXX7rAalSvN
S5P8dcubu01FaC+blFByqmaurkCK65kJgCelXhtp/9gbdt7KkXAkJ/mPRRXjpJfW
2+nJ7AX0IQnDUIFcpDaeH+wddAeDyoEmmW9pTGNV1xWXSt1Oyy4Op6x5UwvhnWbs
CgRzGoECgYEA5GpgdxLXOd+RVqYDMiC4+kDgkDwM+ngenN0rfERXNAeOYOWj7rXC
2HhNsR4xpe7Ul1zWWaSFnghdzNo79t9ULA0bAz/IWXJo1nP8LmBwzkFIidbtXN6j
zqgMG3yBojn6w01yHY03NJy6DsGNOJjA7jmcrV4KWaRgrabU/Up1IkECgYEA3dGV
EMCUFjKEFuWJUmr/rXy7cUTHaAiaNpKiOYKq3G3q3uXdEFCdPYLv57fQRA7cN/uu
tVFHOzmSRMJGBzrR412OerkDU/YvdNlJaa0c1dQY0ZEwK3jiEC5z62u66IJt6NWM
wWzjlEeegH6Und9pLfJ9O4pYak6WOWvtABRMP/MCgYBK63lolQ1zNhl9ykYSExmZ
O95scMXxAaVI3mJ9CA1yS2gv8CKtEYEvb4ZMKhMu0f95BkJodMY+54+cuZghiW8a
Y9IQZsNYU2Z/sNtuesOFY3RfgdepNn2UMxqFiXkbtNjDZouflcodv6pnXKTtg20E
tnDljIrojDoJu0bxLZLuAQKBgAihfQFX3Os4L/eMGtnAHA6uCcUQfgnIO+ffsLw4
H1nQVREzNHTMDjI0hA0qE8pyIZN0EYowjWr6hHx0arEhUsVcAI054a1EqPgM9FRO
Tg7r38NXuN4YKAOlKxF/8ZfWa1xh4sYr7Hb6impJgpLZ/IezJbhJW8NXJ3U4g9I6
9/SNAoGBAK68ZB6A5FWufnzLUggAjQwT/U9kRTOsU/KtV8OJrtdRAes9+SQ6sDcY
lRavE8A7qE65mDXfrVtjAeac05nQ1SxkqsMZmCuhI36m89gsFoe1+eC3K7H9jcbp
5IUAoSdHHW5zUgOQu+tZ6M8hhoOAZCQzRkmXSqQI4e1PaIoFTjod
-----END RSA PRIVATE KEY-----
lll@k:~/rsa$ openssl rsa -in private.key -pubout -out public.key && cat public.key
writing RSA key
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxerVIGkZbbv8BN0DfOQ2
hiNds+rx6a6qCxACOL4voyxWjBSXVd3ssOAXiV4OL81//UIdwjXVS4ohQI76RsdR
okPkMsmATL0xfXVps1cJi7kpSxD+SMX/NUPo8UA6jCj7/HvjjWk7UK3f7SzXH/Cj
sX6UTEM3mC5NdUXnAh0PNcfDCVtCqlL34AUB2pXy6YI4TtsHzq7k2U9AAuEtDQwN
gPAynfrOnjdGJ/6s5Tf67r7mDG9OJXfoSub4njamIzFV9p7vYCrz/zWHJ1+6h/x1
IlvsWXL1P1YmuViHeTBTmrbp4EL6P8YaFhjARFKnfG2QbEKGmPNr+kYjqvAzv+mC
swIDAQAB
-----END PUBLIC KEY-----

lll@k:~/rsa$ echo 12Ab56 > ori.txt
lll@k:~/rsa$ openssl rsautl -encrypt -in ori.txt -inkey public.key -pubin -out enc.txt
lll@k:~/rsa$ od -t x1 ori.txt
0000000 31 32 41 62 35 36 0a
0000007
lll@k:~/rsa$ od -t x1 enc.txt
0000000 61 f9 f2 92 44 13 fb fe e9 fe 5b 8d b8 a3 00 b1
0000020 1a ea 7e 28 b0 da 9d 35 ba 16 24 50 fa 48 f6 f2
0000040 be eb 76 8d c3 e4 5c 8d 34 a4 0a 4c dd fa e9 1a
0000060 47 3d 38 89 78 6f 8a db 31 92 ec 64 fc 90 11 9a
0000100 ca 96 6a fd 4e e9 5c 1f 53 ae e1 66 12 30 48 5d
0000120 6c 8e b2 bb 0b a4 7b 2a 98 b4 ca 90 85 5c 27 13
0000140 45 71 c6 f3 13 60 b4 85 08 ed b2 48 b2 77 98 bf
0000160 c4 bd 5e 48 1a 27 f2 06 97 f0 20 59 db 3c 2c 30
0000200 09 17 3b b9 2f 45 1d 76 cb cb d0 09 b6 bf e0 f3
0000220 2a 56 d6 e2 f1 93 06 e4 de 70 64 66 f7 53 be 64
0000240 49 2b 50 c4 2d c9 a9 d2 9f 64 f0 c8 bf 5d 05 72
0000260 f2 f1 03 52 60 3e d0 32 0a 65 7b f2 cb 03 65 d0
0000300 e5 20 85 83 9f b0 7e 72 57 11 91 30 83 22 d7 48
0000320 b6 bf 95 a3 0c ae 0f 64 30 52 e2 e6 ba 0d 67 32
0000340 66 8a 8a 4f f8 9b eb bf af 74 9b 33 09 88 51 b4
0000360 12 1a 05 46 12 ff 14 5b 0c 8a 13 1a 71 91 b9 88
0000400