<div dir="ltr">Hi,<div><br></div><div>I tried the same key generation on the default linux port from freescale on the same board and i am getting  an average of 20 seconds with the same board.</div><div><br></div><div>Do you think that there is such a huge performance margin with OS.</div><div><br></div><div>The only other difference that i can see is that on the VX works port of openssl, i am using a compiler with is old and optimized for e-500 core while P1010 uses a e-500V2 core.</div><div><br></div><div>Also on the VXworks port of OpenSSL, i have enabled FIPS whereas in the linux port of openssl FIPS is disabled.</div><div><br></div><div>Regards</div><div>Mithun</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 28, 2017 at 4:58 PM, Frank Migge <span dir="ltr"><<a href="mailto:fm@frank4dd.com" target="_blank">fm@frank4dd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div bgcolor="#FFFFFF" text="#000000">Hi Mithun,<span class=""><br>
<br>
<div>>> I have a embedded board P1010 RDB  running openssl on 
VXWORKS 5.4 .</div>
<div>>> I am generating RSA 2048 and 3072 bit key pairs.</div>
<div>>> I am providing entropy to openssl by using RAND_seed from a
 HW RNG.</div>
<div><br></div>
</span><div><span class="">>> My average generation time for RSA 2048 key pair is 2 
Minutes and  3072 is 8 minutes.<br>
  <br></span>
I noticed embedded board key generation times vary by OS and OpenSSL 
version after converting a Altera Atlas FPGA SoC HPS from original 2013 
Yocto Linux to latest Ubuntu. Under the old Yocto, key generation 
occasionally took up to 2 minutes. Same board under Ubuntu 16.04, 2048 
RSA keys take consistently 2-5 seconds, while 3072 keys need around 8-16
 seconds. Even running the system single core, the numbers don't change 
(on a low utilized system, using OS built-in /dev/urandom).<br>
  <br>
While I am on a different CPU and OS (32bit ARM v7  900Mhz dual core, 
1GB 400Mhz RAM), your e500 PowerPC can't be to far behind. Your numbers 
seem to be off by a magnitude. You mentioned using a external HW RNG, 
could that be it?<br>
</div>
<span>

</span><br>
Cheers,<br>
Frank<br>
<blockquote style="border:0px none" type="cite">
  <div style="margin:30px 25px 10px 25px" class="m_7117803552869079542__pbConvHr"><div style="width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%">
        <a href="mailto:jb-openssl@wisemo.com" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Jakob Bohm</a></div>   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:right">     <font color="#9FA2A5"><span style="padding-left:6px">Wednesday,
 January 25, 2017 1:10 AM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px" class="m_7117803552869079542__pbConvBody"><span class="">I'm afraid you will have to 
look at the OpenSSL source code, I haven't
<br>paid much attention to that CPU recently.
<br>
<br><br>
<br>
<br></span>Enjoy
<br>
<br>Jakob
<br></div>
  <div style="margin:30px 25px 10px 25px" class="m_7117803552869079542__pbConvHr"><div style="width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%">
        <a href="mailto:getmithunp@gmail.com" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Mithun P</a></div>   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:right">     <font color="#9FA2A5"><span style="padding-left:6px">Monday,
 January 23, 2017 4:09 PM</span></font></div>    </div></div><span class="">
  <div style="color:#888888;margin-left:24px;margin-right:24px" class="m_7117803552869079542__pbConvBody"><div dir="ltr">Hi Jakob,<div><br></div><div>Can
 you please give me some reference/example of bignum optimization which I
 can check on powerpc architectures.</div><div>Is this any specific 
instruction set addition? or something more generic?</div><div><br></div><div>Thanks
 & Regards</div><div>Mithun</div></div><div class="gmail_extra"><br><br></div>

  </div>
  </span><div style="margin:30px 25px 10px 25px" class="m_7117803552869079542__pbConvHr"><div style="width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%">
        <a href="mailto:jb-openssl@wisemo.com" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Jakob Bohm</a></div>   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:right">     <font color="#9FA2A5"><span style="padding-left:6px">Wednesday,
 January 18, 2017 1:08 AM</span></font></div>    </div></div><span class="">
  <div style="color:#888888;margin-left:24px;margin-right:24px" class="m_7117803552869079542__pbConvBody"><br>I believe this is a CPU 
intensive operation (if VxWorks can do
<br>this, try observing the CPU load during).
<br>
<br>Potential improvements:
<br>
<br>1. Check if the CPU specific bignum optimizations for your CPU
<br>  variant have been enabled via the libcrypto CPU detection code
<br>  (for example, there are optimizations for different ARM cortex
<br>  variants).
<br>2. Faster CPU (expensive obviously).
<br>3. Do the generation in the background before the keypair is
<br>  needed, at a time when the extra CPU load is less of a problem.
<br>
<br>
<br>Enjoy
<br>
<br>Jakob
<br></div>
  </span><div style="margin:30px 25px 10px 25px" class="m_7117803552869079542__pbConvHr"><div style="width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%">
        <a href="mailto:getmithunp@gmail.com" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Mithun P</a></div>   <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:right">     <font color="#9FA2A5"><span style="padding-left:6px">Tuesday,
 January 17, 2017 3:44 PM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px" class="m_7117803552869079542__pbConvBody"><div dir="ltr"><span class="">Hi <div><br></div><div>I
 have a embedded board P1010 RDB  running openssl on VXWORKS 5.4 .</div><div>I
 am generating RSA 2048 and 3072 bit key pairs.</div><div>I am providing
 entropy to openssl by using RAND_seed from a HW RNG.</div><div><br></div><div>My
 average generation time for RSA 2048 key pair is 2 Minutes and  3072 is
 8 minutes.</div><div>Is there a way to reduce the generation time?</div><div><br></div></span><div>Regards</div><div>Mithun</div><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"></span><a href="https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach" target="_blank"><span style="color:rgb(51,102,153)"></span></a></div></div>
</blockquote>
<div class="m_7117803552869079542moz-signature"><div>
</div>


</div>
</div>
<br>--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
<br></blockquote></div><br></div>