<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The ‘key size’ concept is usually referred to the length of modulus. (In public key crypto area)<div class=""><br class=""><div class="">For DH and ECDH, it (the size) ’s generated and defined in the ‘parameters’, as you pasted. Parameters are not exactly the final ‘keys’, they are the ‘materials’ to produce keys (both private ones and public ones), either for DH or ECDH. For DH, you generate parameters based on a given length of prime, and this length is what you called ‘key size’ (e.g. 2048), for ECC the parameters are generated based on named curves, such as prime192v1/prime239v1..., in this case, the ‘key size’ is 192/239bit. In both case, the prime numbers are used as modulus being used while doing DH or EC crypto calculations...</div><div class=""><br class=""></div><div class="">If you get either a DH or EC key, you could use the following command of OpenSSL to check the ‘key size’:</div><div class=""><br class=""></div><div class="">openssl pkey -in xyz.key -noout -text</div><div class=""><br class=""></div><div class="">check the Private-Key: (xxxx bit) in the output.</div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Jul 2017, at 14:45, SaAtomic <<a href="mailto:saatomic@keemail.me" class="">saatomic@keemail.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
  
  <div class="">
I'm trying to comprehend the security impact of the different DH implementations on TLS.<br class=""><br class="">The main differences between the implementations are:<br class=""><ul class=""><li class="">DH</li><li class="">DHE</li><li class="">ECDH</li><li class="">ECDHE</li></ul><p class=""><br class=""></p><p class="">Where the ephemeral DH provides forward secrecy, thus provides additional security.</p><p class=""><br class=""></p><p class="">I'm not really sure how the elliptic curves impact the security of DH. I think I've previously read something like, the key size (or public certificate length?) of DH can be smaller, with the use of elliptic curves. So without the use of elliptic curves the key size should be at least 2048, to be considered secure.</p><p class=""><br class=""></p><p class="">Is my assumption correct?</p><p class="">How can I identify the key size/ public certificate length (I'm not sure which is the correct term), to determine the security of DH in TLS?</p><p class=""><br class=""></p><p class="">Can I use the .pem file, used for DH, of my server to determine this?</p><p class="">I've created the .pem file with the following command:</p><p class=""><br class=""></p><p class="">openssl dhparam -out dhparam.pem 4096</p><p class=""><br class=""></p><p class="">and with the following command I believe I can determine the key length:</p><p class=""><br class=""></p><p class="">openssl dhparam -inform PEM -in ./dhparam.pem -check -text<br class=""></p>  </div>

-- <br class="">openssl-users mailing list<br class="">To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" class="">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br class=""></div></blockquote></div><br class=""></div></div></div></body></html>