Home > Mobile >  Diffie-Hellman: How To Load the Generator and Prime values from .pem file in .Net
Diffie-Hellman: How To Load the Generator and Prime values from .pem file in .Net

Time:11-24

I generated a .pem file that contains Diffie-Hellman parameters. I used this command line:

openssl dhparam -outform PEM 2048 -out dhparam.pem

The file looks like this:

-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEA6gS7LGwOkRMfJJX2sBK NRwSL1OaegjVeEh FJJbWRLG7pB9W7JX
[4 lines omitted]
7LyTYZEvaaAK27xuf4uo4YCFnaOkxp/R6wIBAg==
-----END DH PARAMETERS-----

How can I extract the Generator and Prime values from this file using .Net Framework code?

Note that there is an answer enter image description here

  • Related