<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal">since DPDK 21.11 is out, we should start discussion to make asymmetric API stable.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-              Struct rte_crypto_vec vs struct rte_crypto_param_t<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have two almost identical functionally structs, one in _sym.h another in asym.h so we probably should pick one of them.<o:p></o:p></p>
<p class="MsoNormal">“rte_crypto_vec” additionally contains total length which will be useful information as PMD will overwrite “len” in many cases.<o:p></o:p></p>
<p class="MsoNormal">Unfortunately as “rte_crypto.h” includes “_sym.h” and “_asym.h” not other way around we cannot move it to “rte_crypto.h” but asymmetric will include symmetric anyway so it probably will not be that big of an issue.<o:p></o:p></p>
<p class="MsoNormal"><b>[Akhil ] +1<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-              Network byte order<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">               rte_crypto_param dP; /**<<o:p></o:p></p>
<p class="MsoNormal">               /**< dP - Private CRT component<o:p></o:p></p>
<p class="MsoNormal">               * Private CRT component of RSA parameter  required for CRT method<o:p></o:p></p>
<p class="MsoNormal">               * RSA private key operations in Octet-string network byte order<o:p></o:p></p>
<p class="MsoNormal">               * format.<o:p></o:p></p>
<p class="MsoNormal">               * dP = d mod ( p - 1 )<o:p></o:p></p>
<p class="MsoNormal">               */<o:p></o:p></p>
<p class="MsoNormal">We have plenty of these (sometimes in places where should not be, and not in places where should). Every member that contains this comment here is a big integer in big-endian format.<o:p></o:p></p>
<p class="MsoNormal">We could simplify it to:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">/** Big integer in big-endian format */<o:p></o:p></p>
<p class="MsoNormal">typedef struct rte_crypto_vec rte_crypto_bigint; <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">               rte_crypto_bigint dP; /**< d mod ( p - 1 ) */<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ED related algorithms like (EDDSA) will use little-endian bit integers so it will have to use different approach.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>[Akhil] Using different approaches for endianness may not be a good idea. Why can’t we use rte_crypto_vec for LE? It has a void * data. Right?<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>