Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vijayanandrp/af2d200b83ab0261ae1a20914542c495 to your computer and use it in GitHub Desktop.
Save vijayanandrp/af2d200b83ab0261ae1a20914542c495 to your computer and use it in GitHub Desktop.
Creating a public key using openssl
root@Vijay:# openssl rsa -inform PEM -text -pubin -in publickey.pem -modulus
Public-Key: (704 bit)
Modulus:
00:e1:34:18:93:fe:6e:68:16:ce:c8:a9:70:a3:9c:
00:fa:54:7c:7d:a2:cd:ed:ab:0a:62:b9:1c:46:51:
a8:3f:96:38:0b:cf:ae:e2:6f:7e:86:61:07:90:63:
89:42:1b:1e:68:d0:a1:7a:ad:c9:87:0b:98:58:e9:
56:28:6e:39:99:e9:8c:ec:98:81:53:4a:c7:72:ae:
78:f5:e8:ab:a1:e2:f8:d3:03:95:77:02:9d:87
Exponent: 65537 (0x10001)
Modulus=E1341893FE6E6816CEC8A970A39C00FA547C7DA2CDEDAB0A62B91C4651A83F96380BCFAEE26F7E866107906389421B1E68D0A17AADC9870B9858E956286E3999E98CEC9881534AC772AE78F5E8ABA1E2F8D3039577029D87
writing RSA key
-----BEGIN PUBLIC KEY-----
MHQwDQYJKoZIhvcNAQEBBQADYwAwYAJZAOE0GJP+bmgWzsipcKOcAPpUfH2ize2r
CmK5HEZRqD+WOAvPruJvfoZhB5BjiUIbHmjQoXqtyYcLmFjpVihuOZnpjOyYgVNK
x3KuePXoq6Hi+NMDlXcCnYcCAwEAAQ==
-----END PUBLIC KEY-----
source: http://en.wikipedia.org/wiki/RSA_numbers#RSA-704
RSA-704 = 74037563479561712828046796097429573142593188889231289084936232638972765034
02826627689199641962511784399589433050212758537011896809828673317327310893
0900552505116877063299072396380786710086096962537934650563796359
RSA-704 = 90912135295978188784406583026004374858926083103283587204285121689604115286
40933367824950788367956756806141
× 81438592591100452657278091262844293358778990021676278832009141724293243601
33004116702003240828777970252499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment