<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/124312/">https://git.reviewboard.kde.org/r/124312/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">QByteArray remoteCertificate = QCryptographicHash::hash(devReply.value(), QCryptographicHash::Sha1).toHex();</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I am looking kde-connect code for first time so I might have some missing links about it, please read the review notes</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Is there any specific reason that SHA-1 is being used ?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Note: line generated SHA1 Cryptographic Hash, SHA1 is going to deprecate soon, probably next year somewhere in 2016
        CA Authorities also suggest to do so. OpenSSL also by default generates SHA1 Hash, but that can be overriden
        by specifiying openSSL with -sha256/512 to generate SHA2 Hashesh also used as standard. These seem to be
        implemented in Qt5.1</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">    SHA-1 - provides ~80 security bits ( Attack is possible with the increasing computational power of systems )
    SHA-2 - 256 provides  128 Security bits , which is more secure as compared to SHA-1
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Recommendation: Usage >= SHA2 Crypto Hash.</p></pre>
 <br />









<p>- Siddharth Sharma</p>


<br />
<p>On September 10th, 2015, 9:49 p.m. UTC, Vineet Garg wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for kdeconnect and Siddharth Sharma.</div>
<div>By Vineet Garg.</div>


<p style="color: grey;"><i>Updated Sept. 10, 2015, 9:49 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdeconnect-kde
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Similar to Android version, this SSL implementation supports old version also.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Certificate is generated when public key is generated using QCA, but used as QSslCertificate because QSslSocket don't like QCA certificate.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">A new server is written overriding QTcpServer for setting socket descriptor to QSslSocket.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">QSslSocket works as plain socket to transfer identity package and then either uses encrypted mode or normal mode according to the received package.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">If connetion is to be on SSL, new link is only added after successful handshake.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Certificate is embedded into identity package on start of encrypted mode and then set in device using it.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">PairingHandler is added like in Android version so that each LinkProvider manage pairing according to its own rules.</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">P.S. : Uploaded the patch with some debug statements, will comment out them.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Working fine, tested using connection to Android devices.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Pairing handler needs to be tested using two LinkProvider, working fine with one, but there be some problems with two LinkProviders simultaneouly.</li>
</ul></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>cli/kdeconnect-cli.cpp <span style="color: grey">(536c754)</span></li>

 <li>core/CMakeLists.txt <span style="color: grey">(dd8fedb)</span></li>

 <li>core/backends/devicelink.h <span style="color: grey">(0ae6c00)</span></li>

 <li>core/backends/lan/CMakeLists.txt <span style="color: grey">(7c5be38)</span></li>

 <li>core/backends/lan/downloadjob.h <span style="color: grey">(eeeab07)</span></li>

 <li>core/backends/lan/downloadjob.cpp <span style="color: grey">(bba2e98)</span></li>

 <li>core/backends/lan/landevicelink.h <span style="color: grey">(7d31881)</span></li>

 <li>core/backends/lan/landevicelink.cpp <span style="color: grey">(0987057)</span></li>

 <li>core/backends/lan/lanlinkprovider.h <span style="color: grey">(b379434)</span></li>

 <li>core/backends/lan/lanlinkprovider.cpp <span style="color: grey">(2555668)</span></li>

 <li>core/backends/lan/lanpairinghandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/lanpairinghandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/server.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/server.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/socketlinereader.h <span style="color: grey">(29b059a)</span></li>

 <li>core/backends/lan/socketlinereader.cpp <span style="color: grey">(a6bd85e)</span></li>

 <li>core/backends/lan/uploadjob.h <span style="color: grey">(40056b3)</span></li>

 <li>core/backends/lan/uploadjob.cpp <span style="color: grey">(90978f2)</span></li>

 <li>core/backends/linkprovider.h <span style="color: grey">(f4fc309)</span></li>

 <li>core/backends/loopback/loopbackdevicelink.h <span style="color: grey">(9d1ae14)</span></li>

 <li>core/backends/loopback/loopbackdevicelink.cpp <span style="color: grey">(718c5b8)</span></li>

 <li>core/backends/pairinghandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/pairinghandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/daemon.h <span style="color: grey">(d263163)</span></li>

 <li>core/daemon.cpp <span style="color: grey">(cb6999e)</span></li>

 <li>core/device.h <span style="color: grey">(03f528c)</span></li>

 <li>core/device.cpp <span style="color: grey">(d53b3c5)</span></li>

 <li>core/kdeconnectconfig.h <span style="color: grey">(af6c6df)</span></li>

 <li>core/kdeconnectconfig.cpp <span style="color: grey">(37f33d5)</span></li>

 <li>core/networkpackage.cpp <span style="color: grey">(64cfab7)</span></li>

 <li>plugins/sftp/mounter.h <span style="color: grey">(76ac860)</span></li>

 <li>tests/CMakeLists.txt <span style="color: grey">(b00a574)</span></li>

 <li>tests/devicetest.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/kdeconnectconfigtest.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/lanlinkprovidertest.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/testsocketlinereader.cpp <span style="color: grey">(77a9b4b)</span></li>

 <li>tests/testsslsocketlinereader.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/124312/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







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