Categories:
Android (13)
Apple Mac (27)
DH Keys (39)
DSA Keys (71)
EC Keys (2051)
Firefox (30)
General (10)
Google Chrome (25)
Intermediate CA (152)
Java VM (29)
JDK Keytool (28)
Microsoft CertUtil (29)
Microsoft Edge (9)
Mozilla CertUtil (21)
OpenSSL (236)
Other (7)
Portecle (38)
Publishers (5947)
Revoked Certificates (16)
Root CA (85)
RSA Keys (4864)
Tools (46)
Tutorial (1)
What Is (22)
Windows (127)
Collections:
Other Resources:
OpenSSL "ans1parse" - DH Public Key in ASN.1 Structure
How to view the ASN.1 structure of an DH public key using the OpenSSL "asn1parse" command?
✍: FYIcenter.com
You can use the OpenSSL "asn1parse" command to view the ASN.1 structure
of an DH public key as shown in the test below:
C:\Users\fyicenter>\local\openssl\openssl pkey -in dh_pri.key -pubout -out dh_pub.key C:\Users\fyicenter>\local\openssl\openssl asn1parse -in dh_pub.key -i 0:d=0 hl=2 l= 90 cons: SEQUENCE 2:d=1 hl=2 l= 51 cons: SEQUENCE 4:d=2 hl=2 l= 9 prim: OBJECT :dhKeyAgreement 15:d=2 hl=2 l= 38 cons: SEQUENCE 17:d=3 hl=2 l= 33 prim: INTEGER :8B58E1395DF5CF48DA87B088C6525 EFF4AECBDA5C269EF2378A31A4A62B1647B 52:d=3 hl=2 l= 1 prim: INTEGER :02 55:d=1 hl=2 l= 35 prim: BIT STRING C:\Users\fyicenter>\local\openssl\openssl asn1parse -in dh_pub.key -strparse 55 0:d=0 hl=2 l= 32 prim: INTEGER :4CC9C94CEB5B13F2B4B3ABB9F20CB830 FFC3BB5DC6428C08B18CF3E5301908AD C:\Users\fyicenter>\local\openssl\openssl pkey -pubin -in dh_pub.key -text -noout DH Public-Key: (256 bit) public-key: 4c:c9:c9:4c:eb:5b:13:f2:b4:b3:ab:b9:f2:0c:b8: 30:ff:c3:bb:5d:c6:42:8c:08:b1:8c:f3:e5:30:19: 08:ad prime: 00:8b:58:e1:39:5d:f5:cf:48:da:87:b0:88:c6:52: 5e:ff:4a:ec:bd:a5:c2:69:ef:23:78:a3:1a:4a:62: b1:64:7b generator: 2 (0x2)
Note about the test:
⇒ OpenSSL "ans1parse" - Configuration File for DH Public Key
⇐ OpenSSL "ans1parse" - Configuration File for DH Private Key
2016-09-26, 6265👍, 0💬
Popular Posts:
Can I build a DSA public key from an OpenSSL configuration file? Yes, you can build a DSA public key...
Certificate Summary: Subject: www.hatena.ne.jp Issuer: Cybertrust Japan Public CA G1 Expiration: 201...
Certificate summary - Owner: www.spiegel.de, Terms of use at www.verisign.com/rpa (c)05, Terms of us...
How to retrieve the CRL from the certificate's CA? I want to verify if the certificate has been revo...
Certificate summary - Owner: t.co, Twitter Security, "Twitter, Inc.", L=San Francisco, ST=California...