Cryptography Tutorials - Herong's Tutorial Examples - v5.42, by Herong Yang
Viewing Components of RSA Keys
This section provides a tutorial example on how to view different components of a pair of RSA private key and public key using the OpenSSL command line tool.
Here is how to see the components of a RSA key:
herong> openssl rsa -in herong_rsa.key -text Private-Key: (512 bit) modulus: 00:da:0a:dd:bf:b4:35:5d:71:ac:52:e3:b0:a1:4f: 2e:bc:4c:45:eb:b7:7b:33:f1:2e:30:d6:8e:4b:5a: 92:af:60:0c:63:39:59:4b:c8:09:21:0d:af:2f:cc: d6:1d:80:87:11:92:c5:09:6e:cb:86:f5:ca:7c:c1: 19:67:8e:df:6d publicExponent: 65537 (0x10001) privateExponent: 6d:04:27:d0:d4:8a:25:f9:52:be:72:c6:fa:2f:fb: de:fb:87:ae:0e:23:d4:59:8e:cd:ae:48:a0:d6:5d: 26:bf:43:c8:44:8c:0b:ea:6b:79:b6:64:00:53:36: 11:6f:99:2d:9c:b6:26:21:08:a9:d0:f3:ef:d5:40: 55:1c:ec:65 prime1: 00:f0:6f:1d:81:16:c4:22:1c:49:89:fc:68:6e:e8: da:5c:98:e7:f1:01:d6:0b:f0:80:07:d2:75:61:65: 7a:65:03 prime2: 00:e8:28:a3:98:a3:97:d5:64:5d:28:f7:fd:83:9d: 93:a7:19:38:4d:9c:dd:8c:8a:5c:6e:f6:11:ef:39: c8:66:cf exponent1: 10:f1:23:79:17:2b:96:e3:bb:62:d7:c0:5c:20:58: 52:b2:0b:95:f5:f5:29:3e:37:27:55:f3:23:7b:cd: 16:15 exponent2: 00:9e:2e:c2:79:48:4e:35:f9:b2:78:2d:b0:b0:b2: f7:5e:0d:93:0d:5e:ea:9d:cd:d0:79:52:74:99:d9: 77:30:85 coefficient: 00:a8:a3:40:1d:15:79:bb:f3:d1:5f:1e:e0:7e:99: 52:0a:36:d0:4b:4c:04:0d:68:cb:97:cf:a9:57:97: b2:1b:ed writing RSA key -----BEGIN RSA PRIVATE KEY----- MIIBOwIBAAJBANoK3b+0NV1xrFLjsKFPLrxMReu3ezPxLjDWjktakq9gDGM5WUvI CSENry/M1h2AhxGSxQluy4b1ynzBGWeO320CAwEAAQJAbQQn0NSKJflSvnLG+i/7 3vuHrg4j1FmOza5IoNZdJr9DyESMC+prebZkAFM2EW+ZLZy2JiEIqdDz79VAVRzs ZQIhAPBvHYEWxCIcSYn8aG7o2lyY5/EB1gvwgAfSdWFlemUDAiEA6CijmKOX1WRd KPf9g52Tpxk4TZzdjIpcbvYR7znIZs8CIBDxI3kXK5bju2LXwFwgWFKyC5X19Sk+ NydV8yN7zRYVAiEAni7CeUhONfmyeC2wsLL3Xg2TDV7qnc3QeVJ0mdl3MIUCIQCo o0AdFXm789FfHuB+mVIKNtBLTAQNaMuXz6lXl7Ib7Q== -----END RSA PRIVATE KEY-----
Table of Contents
Introduction to AES (Advanced Encryption Standard)
DES Algorithm - Illustrated with Java Programs
DES Algorithm Java Implementation
DES Algorithm - Java Implementation in JDK JCE
DES Encryption Operation Modes
PHP Implementation of DES - mcrypt
Blowfish - 8-Byte Block Cipher
Secret Key Generation and Management
Cipher - Secret Key Encryption and Decryption
RSA Implementation using java.math.BigInteger Class
Introduction of DSA (Digital Signature Algorithm)
Java Default Implementation of DSA
Private key and Public Key Pair Generation
PKCS#8/X.509 Private/Public Encoding Standards
Cipher - Public Key Encryption and Decryption
OpenSSL Introduction and Installation
►OpenSSL Generating and Managing RSA Keys
►Viewing Components of RSA Keys
OpenSSL Generating and Signing CSR
OpenSSL Validating Certificate Path
"keytool" and "keystore" from JDK
"OpenSSL" Signing CSR Generated by "keytool"
Migrating Keys from "keystore" to "OpenSSL" Key Files
Certificate X.509 Standard and DER/PEM Formats
Migrating Keys from "OpenSSL" Key Files to "keystore"