質問

How can I achieve the same result in C with OpenSSL as the getEncoded() Method produces? It is required for a Diffie-Hellman Key Agreement and I have to send my public key to a java server (But I think the getEncoded() Method not only encodes the Public Key but also the parameters which should be also required for my case)

My current status is that I have a OpenSSL DH Object which contains the PublicKey and p&g as BigNums.

Would bey very great if anyone knows how to do that.

役に立ちましたか?

解決

If encoded DH object means DER encoded, then i2d_DHParams can help you. It is given here.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top