<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Sahana is working on implementing RFC-7457 and has some interesting questions.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">It would be useful to have that discussion here with a larger audience (I will also reply later myself with my thoughts)<br><br><br></div><div><br>Begin forwarded message:<br><br></div><blockquote type="cite"><div><br></div></blockquote><blockquote type="cite"><div><div dir="ltr">Hello,<div><br></div><div>1.  'authby' in ipsec.conf </div><div>In the ipsec.conf file, is the authby value going to be changed?</div><div>    <span style="font-family:Menlo;font-size:11px">authby=rsasig (currently for libreswan)</span></div><div><span style="font-family:Menlo;font-size:11px">  </span></div><div><font face="arial, helvetica, sans-serif">authby will take values like 'dsssig' , 'ecdsa' ( if these are implemented in libreswan in future)</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><span style="font-family:arial,helvetica,sans-serif">or is the operator going to specify authby = digsig (digital signature = 14) - I hope not.</span><br></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><font face="arial, helvetica, sans-serif">I ask this because , with RFC 7427 , authtype will always be 'Digital Signature =14' and as initiator libreswan will always send a Hash algorithm Notification. And this will be the default behaviour.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">If it does not receive a Hash algorithm Notification , then we know that the receiver does not support RFC 7427 and we fall back to the older method and send authtype as rsasig=1.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Also can authby have multiple values?</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I'd like to know this because , if libreswan supported both RSA and ECDSA (in future) , then will the operator always specify auth type as  'RSA|ECDSA' or  just 'RSA' or just  'ECDSA' ? </font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">{In the below link  i saw a possibility of sharedkey|rsasig for authby , so just wondered if it could ever be rsasig|ecdsa </font></div><div><a href="https://libreswan.org/man/ipsec.conf.5.html">https://libreswan.org/man/ipsec.conf.5.html</a> }</div><div><br></div><div><br></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">2. How do we decide what to send in Hash Algorithm Notification?</font></div><div><br></div><div><font face="arial, helvetica, sans-serif">It should be  based on the 'authtype' configured by the operator in the ipsec.conf.</font></div><div><font face="arial, helvetica, sans-serif">so i'll look at c->policy and decide.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">If it is RSA then send only SHA1 (because the rest is not supported currently by libreswan)</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">If libreswan supports ECDSA in future , then SHA2-256 , SHA2-384 , SHA2-512 should be sent.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Let us assume for a moment that Libreswan supports both RSA and ECDSA (this is likely to happen in future).</font></div><div><font face="arial, helvetica, sans-serif">Should I already send </font><span style="font-family:arial,helvetica,sans-serif">SHA1 , </span><span style="font-family:arial,helvetica,sans-serif">SHA2-256 , SHA2-384 , SHA2-512 ? (Because I know for sure that libreswan supports all these 4)</span></div><div><font face="arial, helvetica, sans-serif">Or Should I check the authtype and send only </font><span style="font-family:arial,helvetica,sans-serif">SHA1 if it is RSA and </span><span style="font-family:arial,helvetica,sans-serif">SHA2-256 , SHA2-384 , SHA2-512 if it is ECDSA ?</span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">I would prefer the former method , since it give more flexibility.</span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">If the responder says he supports only SHA1 , I can set up a connection with RSA keys.</span></div><div><font face="arial, helvetica, sans-serif">If the responder says he supports only SHA2-384 , I can set up a connection with ECDSA keys.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">(But this again depends on the answer to question one. Does the operator set the authtype to "rsasig/ecdsa" or just "rsasig" or just "ecdsa" )</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">3. Would libreswan plan to add support for RSA with </font><span style="font-family:arial,helvetica,sans-serif">SHA2-256 , SHA2-384 and SHA2-512</span><span style="font-family:arial,helvetica,sans-serif"> ?</span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><font face="arial, helvetica, sans-serif">I know this is less likely  to happen as ECDSA with the above mentioned Hash algorithms is stronger anyway.</font></div><div><font face="arial, helvetica, sans-serif">But I continue to ask this because RFC has </font><span style="font-size:1em;color:rgb(80,0,80)">sha256WithRSAEncryption , </span><span style="font-size:1em;color:rgb(80,0,80)">sha384WithRSAEncryption and </span><span style="font-size:1em;color:rgb(80,0,80)">sha512WithRSAEncryption</span><span style="font-size:1em;color:rgb(80,0,80);font-weight:bold"> </span><span style="font-family:arial,helvetica,sans-serif">as Identifiers.</span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">So should our code comply to it?</span></div><div><br></div><div><font face="arial, helvetica, sans-serif">And if SHA2-256 is received from the Responder in the Hash algorithm Notification  both  </font><span style="color:rgb(80,0,80);font-size:13px">sha256WithRSAEncryption and </span><span style="font-size:1em;color:rgb(80,0,80)">ecdsa-with-sha256</span><span style="font-family:arial,helvetica,sans-serif"> </span><font face="arial, helvetica, sans-serif">would be valid algorithm Identifiers to be sent in the in AUTH request .</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">(Again depends on the answer to question 1 )</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">4. How do we handle a case of more than 1  Hash algorithms being received by the responder?</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">directly take the first one or choose the stronger one.</font></div><div><font face="arial, helvetica, sans-serif">(Discussed this with Paul already , and we decided to take the first one for now)</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Sorry for the long email.</font></div><div><font face="arial, helvetica, sans-serif">The more number of times I read the RFC , the more number of questions and doubts :) Or am I overthinking? :)</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thank you for your patience and time in advance.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Regards,</font></div><div><font face="arial, helvetica, sans-serif">Sahana Prasad</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><br></div></div>
</div></blockquote></body></html>