<div dir="auto">Hello dear,<div dir="auto">I joined these group so that l can get assistance for my research work. </div><div dir="auto">Up till now, l have not been able.</div><div dir="auto"><br></div><div dir="auto">Here is my problem.</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">My Project is an Msc Research on HTTPS Man-In-The-Middle (MITM) Attack using a Compromised Certificate Authority.</div><div dir="auto">Now I am going to be very elaborative so that you can read my mind and understand what I want to achieve.</div><div dir="auto">I have a Journal base paper am already working on. The author designed a new HTTPAS (HTTP Active Secure) … These are the major work he did on his project. He designed a HTTPAS framework that will enhance Client-Server web Authentication and make the web authentication more comprehensive incase a MITM attacker has compromised one or few Certificate Authorities.</div><div dir="auto">Note: The MITM attacker has different vantage point and different attacking patterns. For the</div><div dir="auto">man-in-the-middle variant ①, the vantage point is close to the victim web user (e.g. a gateway or a wireless access point of the victim user is compromised by man-in-the-middle attackers), and</div><div dir="auto">the attackers can blindly hijack all the HTTPS connections from the victim user to any remote web sites (i.e. the attacking pattern is non-selective hijacking).</div><div dir="auto">Another Variant 2 takes the case that the vantage point is nearby web servers. This variant is harder to detect than the others, because nearly all the Internet paths to the victim web server necessarily pass through the vantage point.</div><div dir="auto">Look at his designs</div><div dir="auto"><br></div><div dir="auto">He designed a client-side countermeasure which enables a web user to actively collect site certificates from n different web sites. A man-in-the-middle attack can be confirmed if these n certificates are issued from less than μ CAs. (This countermeasure is based on a key insight that a large number of site certificates from different Internet domains are unlikely issued by the same CA, only if a man-in-the�middle variant is launched with a single compromised CA.)</div><div dir="auto">He also designed another Client-side countermeasure by enabling web users to actively collect site certificates from other web servers of the same web site. The key insight of this countermeasure is that popular web sites usually deploy a large distributed system of servers across the Internet to serve end users from different regions for high availability and performance (i.e. content delivery network or CDN in short). These web servers are likely to use the certificates issued from the same CA, while the man-in-the-middle vantage point near one web server is unlikely to be close to others, especially the ones located in a different geographical region.</div><div dir="auto">Concerning his implementations, please read very well…. “We evaluate these performance overheads </div><div dir="auto"><br></div><div dir="auto">by implementing a prototype of HTTPAS using OpenSSL stacks. Our HTTPAS prototype runs additional certificate collection and verification tasks in a parallel manner. We achieve this parallel solution by exploiting the C++ multi-threading programming. We conduct the performance evaluation by running our HTTPAS prototype implementation in a virtual machine and a real machine, both of which are located in our laboratory with 8-core 2.67 GHz central processing unit and 6 GB memory. We use the virtual machine for HTTPAS performance evaluation due to a very practical reason: lots of modern web sites are now hosted by cloud computing environments, where virtual machines are the web servers running behind.</div><div dir="auto"><br></div><div dir="auto"><br></div></div><div dir="auto"><br></div><div dir="auto">Dear friends, l need help, even though,it might require some financial involvement.  I all respect that. I want to replicate this work and also improve it</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 20, 2018 3:46 AM, "Scott Wisniewski" <<a href="mailto:swisniewski@salesforce.com" target="_blank">swisniewski@salesforce.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">FYI:<br><br><div>If you provide an genrsa implementation in your engine that doesn't include the private parameters, even if it's marked with RSA_FLAG_EXT_PKEY, the openssl executable will not handle it correctly.</div><div><br></div><div>That's because genrsa_main assumes that the object that comes back is an rsa private key. So it will attempt to save a PEM encoded RSA private key even though it doesn't have the private key fields and openssl won't be able to open the saved file.</div><div><br></div><div>So, if you want to enable use of the openssl executable with genrsa being supported by your engine, you will actually need to modify apps/genrsa.c So that genrsa_main does:</div><div><br></div><div>




<span></span>





<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)">if (RSA_test_flags(rsa, RSA_FLAG_EXT_PKEY) == RSA_FLAG_EXT_PKEY) {</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">    </span>if (! PEM_write_bio_RSA_PUBKEY(out, rsa))</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">        </span>goto end;</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)">}</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)">else {</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">    </span>if (!PEM_write_bio_RSAPrivateKey(<wbr>out, rsa, enc, NULL, 0,</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">                                     </span>(pem_password_cb *)password_callback,</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">                                     </span>&cb_data))</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">        </span>goto end;</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)">}</p>


<div><br></div>instead of:</div><div><br></div><div>




<span></span>





<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)">if (!PEM_write_bio_RSAPrivateKey(<wbr>out, rsa, enc, NULL, 0,</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">                                    </span>(pem_password_cb *)password_callback,</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">                                    </span>&cb_data))</p>
<p class="m_-8321756981229282604m_-6078486268789058010gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Helvetica Neue";color:rgb(69,69,69)"><span class="m_-8321756981229282604m_-6078486268789058010gmail-Apple-converted-space">       </span>goto end;</p>


<div><br></div>And then it will save the key you generated in public key pem format. which will allow openssl to read it.</div><div><br></div><div>One thing to note:</div><div><br></div><div>None of the open source engines I checked (neither the PCKS11 engine, the NCipher engine, nor the CAPI engine) implement the genrsa hook. If you are looking for wide compatibility you may wish to ask your clients to do key generation using an external utility (as that's how almost everyone else does it). </div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 13, 2018 at 5:28 PM, William Roberts <span dir="ltr"><<a href="mailto:bill.c.roberts@gmail.com" target="_blank">bill.c.roberts@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-8321756981229282604m_-6078486268789058010HOEnZb"><div class="m_-8321756981229282604m_-6078486268789058010h5">On Fri, Apr 13, 2018 at 2:55 PM, Richard Levitte <<a href="mailto:levitte@openssl.org" target="_blank">levitte@openssl.org</a>> wrote:<br>
> In message <CAFftDdqWPXq1+Mo9_6J0EzhZ4uwg<wbr>5QC=R5fx8N1j=<a href="mailto:QYchA8%2BYQ@mail.gmail.com" target="_blank">QYchA8+YQ@mail.gm<wbr>ail.com</a>> on Fri, 13 Apr 2018 09:17:28 -0700, William Roberts <<a href="mailto:bill.c.roberts@gmail.com" target="_blank">bill.c.roberts@gmail.com</a>> said:<br>
><br>
> bill.c.roberts> I am currently working on writing an openssl engine<br>
> bill.c.roberts> to interface with a piece of hardware.<br>
> bill.c.roberts><br>
> bill.c.roberts> I am trying to understand how to implement<br>
> bill.c.roberts> rsa key generation, where the private key<br>
> bill.c.roberts> bytes would not be available.<br>
> bill.c.roberts><br>
> bill.c.roberts> I am currently invoking the<br>
> bill.c.roberts> command:<br>
> bill.c.roberts><br>
> bill.c.roberts> openssl genrsa -engine foo<br>
> bill.c.roberts><br>
> bill.c.roberts> Which is calling my callback for RSA keygen, registered via ENGINE_set_RSA()<br>
> bill.c.roberts> and I set the flags: RSA_FLAG_EXT_PKEY.<br>
> bill.c.roberts><br>
> bill.c.roberts> However, genrsa app seems to want rsa->e set here:<br>
> bill.c.roberts> <a href="https://github.com/openssl/openssl/blob/OpenSSL_1_0_2g/apps/genrsa.c#L291" rel="noreferrer" target="_blank">https://github.com/openssl/ope<wbr>nssl/blob/OpenSSL_1_0_2g/apps/<wbr>genrsa.c#L291</a><br>
> bill.c.roberts><br>
> bill.c.roberts> I can't find documentation on how to handle the keygen interface<br>
> bill.c.roberts> for RSA.<br>
> bill.c.roberts><br>
> bill.c.roberts> Can someone point me in the right direction?<br>
><br>
> e and n are public components of any RSA key pair (and RSA structure<br>
> in OpenSSL).  You *must* make them available.  The rest of the numbers<br>
> are private and do not need to be part of the RSA structure that<br>
> OpenSSL handles.<br>
<br>
</div></div>Thanks. I went and read the RSA page on Wikipedia, and sure enough it<br>
has what common meanings of what all the single letter variables<br>
are in the RSA struct.<br>
<a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/<wbr>RSA_(cryptosystem)</a><br>
<div class="m_-8321756981229282604m_-6078486268789058010HOEnZb"><div class="m_-8321756981229282604m_-6078486268789058010h5"><br>
><br>
> Cheers,<br>
> Richard<br>
><br>
> --<br>
> Richard Levitte         <a href="mailto:levitte@openssl.org" target="_blank">levitte@openssl.org</a><br>
> OpenSSL Project         <a href="http://www.openssl.org/~levitte/" rel="noreferrer" target="_blank">http://www.openssl.org/~levit<wbr>te/</a><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/mailma<wbr>n/listinfo/openssl-users</a><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/mailma<wbr>n/listinfo/openssl-users</a><br>
</div></div></blockquote></div><br></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/mailma<wbr>n/listinfo/openssl-users</a><br>
<br></blockquote></div></div>