<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">Hi Mithun,<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>
<div>>> My average generation time for RSA 2048 key pair is 2 
Minutes and  3072 is 8 minutes.<br>
  <br>
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;" 
cite="mid:4df9c064-f9f4-b868-9918-191eeffd9562@wisemo.com" type="cite">
  <div style="margin:30px 25px 10px 25px;" class="__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 moz-do-not-send="true" href="mailto:jb-openssl@wisemo.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">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;" 
__pbrmquotes="true" class="__pbConvBody">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>Enjoy
<br>
<br>Jakob
<br></div>
  <div style="margin:30px 25px 10px 25px;" class="__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 moz-do-not-send="true" href="mailto:getmithunp@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">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>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__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>
  <div style="margin:30px 25px 10px 25px;" class="__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 moz-do-not-send="true" href="mailto:jb-openssl@wisemo.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">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>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__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>
  <div style="margin:30px 25px 10px 25px;" class="__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 moz-do-not-send="true" href="mailto:getmithunp@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">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;" 
__pbrmquotes="true" class="__pbConvBody"><div dir="ltr">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><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"><span
 style="color: rgb(51, 102, 153);"></span></a></div></div>
</blockquote>
<div class="moz-signature"><div>
</div>


</div>
</body></html>