I need to create a safe prime number that has the form 2p + 1, where p is also prime from some bit length (say, 1024 bits). It should be used when exchanging DH keys.
I believe openssl can do this through
openssl gendh 1024
however this returns base64 pem format
MIGHAoGBANzQ1j1z7RGB8XUagrGWK5a8AABecNrovcIgalv1hQdkna2PZorHtbOa
wYe1eDy1t/EztsM2Cncwvj5LBO3Zqsd5tneehKf8JoT35/q1ZznfLD8s/quBgrH8
es2xjSD/9syOMMiSv7/72GPJ8hzhLrbTgNlZ+kYBAPw/GcTlYjc7AgEC
how can I verify that the stroke is "safe" and a certain bit length.
source
share