| 1 |
<html> |
| 2 |
<head> |
| 3 |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
| 4 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 5 |
<style type="text/css"> |
| 6 |
html{overflow-y:scroll;background-color:#091552} |
| 7 |
body{font-family:"Noto Sans","Droid Sans","DejaVu Sans","Arial",sans-serif;line-height:1.5} |
| 8 |
tt,code{background-color:#f0f0f0;font-family:Consolas,Monaco,"Noto Sans Mono","DejaVu Sans Mono",monospace,sans-serif;font-size:1em;} |
| 9 |
pre{margin-left:3em} |
| 10 |
p,ul,ol,blockquote,pre{font-size:1.0em;line-height:1.6} |
| 11 |
li p{font-size:1.0em} |
| 12 |
blockquote p{font-size:1.0em} |
| 13 |
h1{font-size:1.5em} |
| 14 |
h2{font-size:1.3em} |
| 15 |
h3{font-size:1.0em} |
| 16 |
h1 a{text-decoration:none} |
| 17 |
table{border-collapse:collapse} |
| 18 |
th,td{border:1px solid black} |
| 19 |
table a{text-decoration:none} |
| 20 |
table tr{font-size:1.0em;line-height:1.6em} |
| 21 |
table tr{font-size:1.0em;line-height:1.5} |
| 22 |
tbody tr:nth-child(12n+1){background-color:#f0ffff} |
| 23 |
tbody tr:nth-child(12n+2){background-color:#f0ffff} |
| 24 |
tbody tr:nth-child(12n+3){background-color:#f0ffff} |
| 25 |
tbody tr:nth-child(12n+4){background-color:#f0ffff} |
| 26 |
tbody tr:nth-child(12n+5){background-color:#f0ffff} |
| 27 |
tbody tr:nth-child(12n+6){background-color:#f0ffff} |
| 28 |
tbody tr:nth-child(12n+7){background-color:#fffff0} |
| 29 |
tbody tr:nth-child(12n+8){background-color:#fffff0} |
| 30 |
tbody tr:nth-child(12n+9){background-color:#fffff0} |
| 31 |
tbody tr:nth-child(12n+10){background-color:#fffff0} |
| 32 |
tbody tr:nth-child(12n+11){background-color:#fffff0} |
| 33 |
tbody tr:nth-child(12n+12){background-color:#fffff0} |
| 34 |
|
| 35 |
#headline{display:block;margin:0;padding:0;color:#ffffff;background-color:#091552} |
| 36 |
#headline .text{font-weight:bold;font-size:1.0em} |
| 37 |
#headline input{display:none} |
| 38 |
#nav ul{margin:0;padding:0} |
| 39 |
#nav li{list-style-type:none;margin:0;padding:0} |
| 40 |
.navtop{padding-bottom:0.5em;font-weight:bold;font-size:1.0em} |
| 41 |
.navtop{background-color:#091552;color:#ffffff} |
| 42 |
#nav .here{background-color:#091552;color:#ffffff} |
| 43 |
#nav .away{background-color:#091552;color:#ffffff} |
| 44 |
#nav .away a{text-decoration:none;display:block;color:#ffffff} |
| 45 |
#nav .away a:hover,.away a:active{text-decoration:underline} |
| 46 |
#hidemenu{visibility:hidden;display:none;overflow:hidden;position:fixed;top:0;left:0;height:100%;width:100%} |
| 47 |
|
| 48 |
.main{padding:5px} |
| 49 |
.main{background-color:#ffffff} |
| 50 |
.pagetitle{font-size:1.4em;font-weight:bold} |
| 51 |
@media only screen and (min-width:512px) { |
| 52 |
.navtop{padding-top:5px} |
| 53 |
#headline{top:0;margin:0;width:110px;height:100%;position:fixed;overflow:auto} |
| 54 |
#headline .noselect{display:none} |
| 55 |
#headline #nav{visibility:visible;display:block;width:auto;height:auto} |
| 56 |
.main{margin-left:120px} |
| 57 |
#headline #hidemenu{visibility:hidden} |
| 58 |
} |
| 59 |
@media not screen and (min-width:512px) { |
| 60 |
#headline .noselect{-webkit-user-select:none;-ms-user-select:none;user-select:none;} |
| 61 |
#headline #nav #navbot{visibility:hidden;position:fixed;top:0;left:-70%;z-index:2;transition:0.2s;margin:0;padding:0} |
| 62 |
#headline input:checked ~ #nav #navbot{height:100%;position:fixed;top:0;left:0;visibility:visible;display:block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;vertical-align:center;font-size:1.0em;width:70%;overflow:auto} |
| 63 |
#headline input:checked ~ #hidemenu{visibility:visible;display:block;background:black;opacity:0.3;z-index:1} |
| 64 |
} |
| 65 |
|
| 66 |
.openssl{color:#900009} |
| 67 |
.s2n{color:#004040} |
| 68 |
.lib25519{color:#091552} |
| 69 |
</style> |
| 70 |
<title> |
| 71 |
lib25519: People</title> |
| 72 |
</head> |
| 73 |
<body> |
| 74 |
<label id=headline> |
| 75 |
<input type=checkbox /> |
| 76 |
<nav id=nav> |
| 77 |
<div class=navtop> |
| 78 |
<span class=noselect>≡</span> |
| 79 |
lib25519</div> |
| 80 |
<ul id=navbot> |
| 81 |
<li class=away><a href=index.html>Intro</a> |
| 82 |
</li><li class=away><a href=download.html>Download</a> |
| 83 |
</li><li class=away><a href=install.html>Install</a> |
| 84 |
</li><li class=away><a href=test.html>Test</a> |
| 85 |
</li><li class=away><a href=x25519-cli.html>X CLI</a> |
| 86 |
</li><li class=away><a href=ed25519-cli.html>Ed CLI</a> |
| 87 |
</li><li class=away><a href=api.html>API</a> |
| 88 |
</li><li class=away><a href=security.html>Security</a> |
| 89 |
</li><li class=away><a href=speed.html>Speed</a> |
| 90 |
</li><li class=away><a href=internals.html>Internals</a> |
| 91 |
</li><li class=here>People |
| 92 |
</li><li class=away><a href=license.html>License</a> |
| 93 |
</li></ul></nav> |
| 94 |
<div id=hidemenu></div> |
| 95 |
</label> |
| 96 |
<div class=main> |
| 97 |
<div class=pagetitle>lib25519: People</div> |
| 98 |
<p>lib25519 draws on many previous implementations listed below, plus new |
| 99 |
speedups from Kaushik Nath and new infrastructure work and factoring |
| 100 |
from Daniel J. Bernstein. |
| 101 |
Nath's work on this project was |
| 102 |
<a href="https://nlnet.nl/project/lib25519">initially funded</a> |
| 103 |
through the |
| 104 |
<a href="https://nlnet.nl/internethardening">Internet Hardening Fund</a>, |
| 105 |
a fund established by |
| 106 |
<a href="https://nlnet.nl/">NLnet</a> |
| 107 |
with financial support from the |
| 108 |
<a href="https://www.rijksoverheid.nl/ministeries/ministerie-van-economische-zaken-en-klimaat">Netherlands Ministry of Economic Affairs and Climate Policy</a>, |
| 109 |
and received |
| 110 |
<a href="https://nlnet.nl/project/lib25519-ARM/">further funding</a> |
| 111 |
through the |
| 112 |
<a href="https://nlnet.nl/entrust">NGI0 Entrust Fund</a>, |
| 113 |
another fund from NLnet established with financial support |
| 114 |
from the European Commission's |
| 115 |
<a href="https://ngi.eu">Next Generation Internet</a> program.</p> |
| 116 |
<p>Some code was originally copied from public-domain code in the SUPERCOP |
| 117 |
benchmarking framework. See <a href="https://bench.cr.yp.to/supercop.html"><span class="url">https://bench.cr.yp.to/supercop.html</span></a> |
| 118 |
for SUPERCOP releases. The following small changes from code available |
| 119 |
in SUPERCOP are made in lib25519 without further comment:</p> |
| 120 |
<ul> |
| 121 |
<li>Returning <code>void</code> rather than <code>int</code> for functions that never fail in |
| 122 |
lib25519.</li> |
| 123 |
<li>Message lengths <code>long long</code> rather than <code>unsigned long long</code>.</li> |
| 124 |
<li>Defining various constants in <code>.c</code> files (to simplify PIC handling) |
| 125 |
instead of <code>.S</code> files.</li> |
| 126 |
<li>Moving some C files to <code>shared-*.c</code> (which in lib25519 means that |
| 127 |
these files are compiled by only one compiler).</li> |
| 128 |
<li>Using <code>CRYPTO_SHARED_NAMESPACE</code> rather than <code>CRYPTO_NAMESPACE</code> for |
| 129 |
symbols defined in <code>*.S</code> and <code>shared-*.c</code>.</li> |
| 130 |
<li>Adding various <code>linker define</code> and <code>linker use</code> lines.</li> |
| 131 |
</ul> |
| 132 |
<p>Larger changes from code in SUPERCOP, such as new code divisions across |
| 133 |
lib25519 primitives, are indicated below.</p> |
| 134 |
<p>Sources of Curve25519 software (this is not a comprehensive list, just |
| 135 |
the software that lib25519 is derived from):</p> |
| 136 |
<ul> |
| 137 |
<li> |
| 138 |
<p>Daniel J. Bernstein. "Curve25519: new Diffie-Hellman speed |
| 139 |
records." Pages 207–228 in Public key cryptography—PKC 2006, 9th |
| 140 |
international conference on theory and practice in public-key |
| 141 |
cryptography, New York, NY, USA, April 24–26, 2006, proceedings, |
| 142 |
edited by Moti Yung, Yevgeniy Dodis, Aggelos Kiayias, Tal Malkin, |
| 143 |
Lecture Notes in Computer Science 3958, Springer, 2006, ISBN |
| 144 |
3-540-33851-9.</p> |
| 145 |
<p>This is the source of the Curve25519 design, the X25519 design, and |
| 146 |
various speedups. Most of the software from that paper is specific |
| 147 |
to a variety of 32-bit platforms (radix 2<sup>25.5</sup> or radix 2<sup>21.25</sup>), |
| 148 |
but the portable <code>supercop/crypto_scalarmult/curve25519/ref10</code> |
| 149 |
(radix 2<sup>25.5</sup>) is derived from this.</p> |
| 150 |
<p><code>lib25519/crypto_nP/montgomery25519/ref10</code> starts with |
| 151 |
<code>supercop/crypto_scalarmult/curve25519/ref10</code>, and tweaks the API to |
| 152 |
provide <code>crypto_nP</code> instead of <code>crypto_scalarmult</code>. Inversion is |
| 153 |
factored out, producing <code>crypto_pow/inv25519/ref10</code>. The trivial |
| 154 |
<code>crypto_scalarmult_base</code> wrapper is factored out, producing |
| 155 |
<code>crypto_nG/montgomery25519/ref/base.c</code>; lib25519 has faster <code>nG</code> |
| 156 |
functions, but intentionally provides <code>ref</code> for situations where |
| 157 |
speed is outweighed by simplicity, assurance, code size, etc.</p> |
| 158 |
</li> |
| 159 |
<li> |
| 160 |
<p><code>supercop/crypto_scalarmult/curve25519/donna_c64</code> (radix 2<sup>51</sup>) from |
| 161 |
Adam Langley.</p> |
| 162 |
<p><code>lib25519/crypto_nP/montgomery25519/donna_c64</code> starts from this and |
| 163 |
tweaks the API to provide <code>crypto_nP</code> instead of <code>crypto_scalarmult</code> |
| 164 |
(and removes <code>crypto_scalarmult_base</code>). |
| 165 |
<code>crypto_pow/inv25519/donna_c64</code> is factored out.</p> |
| 166 |
</li> |
| 167 |
<li> |
| 168 |
<p>Daniel J. Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, Bo-Yin |
| 169 |
Yang. "High-speed high-security signatures." Pages 124–142 in |
| 170 |
Cryptographic hardware and embedded systems—CHES 2011, 13th |
| 171 |
international workshop, Nara, Japan, September 28–October 1, 2011, |
| 172 |
proceedings, edited by Bart Preneel, Tsuyoshi Takagi, Lecture Notes |
| 173 |
in Computer Science 6917, Springer, 2011, ISBN 978-3-642-23950-2. |
| 174 |
Journal version: Journal of Cryptographic Engineering 2 (2012), |
| 175 |
77–89.</p> |
| 176 |
<p>This is the source of the Ed25519 design and various X25519/Ed25519 |
| 177 |
speedups for 64-bit Intel/AMD platforms, in particular producing |
| 178 |
<code>supercop/crypto_{scalarmult/curve,sign/ed}25519/amd64-{51,64}*</code> |
| 179 |
(radix 2<sup>51</sup> and radix 2<sup>64</sup> respectively). Peter Schwabe led the |
| 180 |
implementation work.</p> |
| 181 |
<p><code>lib25519/crypto_nP/montgomery25519/amd64-51</code> starts from |
| 182 |
<code>supercop/crypto_scalarmult/curve25519/amd64-51</code> and tweaks the API |
| 183 |
to provide <code>crypto_nP</code> instead of <code>crypto_scalarmult</code> (and removes |
| 184 |
<code>crypto_scalarmult_base</code>). <code>crypto_nG/merged25519/amd64-51</code> (for |
| 185 |
fixed-base-point multiplication), <code>crypto_mGnP/ed25519/amd64-51</code> (for |
| 186 |
double-scalar multiplication), and <code>crypto_sign/ed25519/amd64</code> (for |
| 187 |
the remaining signing components) factor |
| 188 |
<code>supercop/crypto_sign/ed25519/amd64-51</code> into smaller pieces. |
| 189 |
<code>crypto_pow/inv25519/amd64-51</code> is also factored out. <code>SMALLTABLES</code> |
| 190 |
support is removed. Support for batch verification is removed, |
| 191 |
although it could reappear in a subsequent lib25519 release.</p> |
| 192 |
<p>Similar comments apply to <code>amd64-64</code> and <code>ref10</code>. A compiler warning |
| 193 |
is eliminated (window size 64 in <code>amd64-64-24k/sc25519.h</code>).</p> |
| 194 |
</li> |
| 195 |
<li> |
| 196 |
<p>Tung Chou. "Sandy2x: New Curve25519 Speed Records." SAC 2015.</p> |
| 197 |
<p>This is the source of various X25519 speedups using 256-bit vector |
| 198 |
instructions, specifically AVX vector instructions in Intel's Sandy |
| 199 |
Bridge, in particular producing |
| 200 |
<code>supercop/crypto_scalarmult/curve25519/sandy2x</code> (radix 2<sup>25.5</sup>).</p> |
| 201 |
<p><code>lib25519/crypto_{nP,nG}/montgomery25519/sandy2x</code> start from |
| 202 |
<code>supercop/crypto_scalarmult/curve25519/sandy2x</code>, and tweak the API |
| 203 |
to provide <code>crypto_nP</code> and <code>crypto_nG</code> instead of |
| 204 |
<code>crypto_scalarmult</code> and <code>crypto_scalarmult_base</code> respectively. The |
| 205 |
top bit of the incoming point is cleared. |
| 206 |
<code>crypto_pow/inv25519/sandy2x</code> is factored out.</p> |
| 207 |
</li> |
| 208 |
<li> |
| 209 |
<p>Kaushik Nath and Palash Sarkar, "Efficient arithmetic in |
| 210 |
(pseudo-)Mersenne prime order fields", Advances in Mathematics of |
| 211 |
Communications 16 (2022), pages 303–348. |
| 212 |
Original release:</p> |
| 213 |
<ul> |
| 214 |
<li><a href="https://github.com/kn-cs/pmp-farith/tree/master/gf-p2-255-19/SL"><span class="url">https://github.com/kn-cs/pmp-farith/tree/master/gf-p2-255-19/SL</span></a></li> |
| 215 |
<li><a href="https://github.com/kn-cs/pmp-farith/tree/master/gf-p2-255-19/USL1"><span class="url">https://github.com/kn-cs/pmp-farith/tree/master/gf-p2-255-19/USL1</span></a></li> |
| 216 |
</ul> |
| 217 |
<p>The <code>SL</code> software is the source of various speedups to the <code>amd64-64</code> |
| 218 |
software, producing the <code>maa4</code> versions of <code>fe25519_mul.S</code>, |
| 219 |
<code>fe25519_square.S</code>, and <code>fe25519_nsquare.S</code>. These <code>.S</code> files are used |
| 220 |
inside the following lib25519 directories:</p> |
| 221 |
<ul> |
| 222 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-maa4</code></li> |
| 223 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-maa4</code></li> |
| 224 |
<li><code>crypto_mGnP/ed25519/amd64-maa4</code></li> |
| 225 |
<li><code>crypto_nG/merged25519/amd64-avx2-10l-maa4</code></li> |
| 226 |
<li><code>crypto_nG/merged25519/amd64-avx2-9l-maa4</code></li> |
| 227 |
<li><code>crypto_nG/merged25519/amd64-maa4</code></li> |
| 228 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey10l-maa4</code></li> |
| 229 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey9l-maa4</code></li> |
| 230 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns10l-maa4</code></li> |
| 231 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns9l-maa4</code></li> |
| 232 |
<li><code>crypto_nP/montgomery25519/amd64-maa4</code></li> |
| 233 |
<li><code>crypto_pow/inv25519/amd64-maa4</code></li> |
| 234 |
</ul> |
| 235 |
<p>The <code>USL</code> software is the source of various speedups to the |
| 236 |
<code>amd64-51</code> software, producing the <code>maa5</code> versions of <code>fe25519_mul.S</code> |
| 237 |
and <code>fe25519_nsquare.S</code>. These <code>.S</code> files are used inside the |
| 238 |
following lib25519 directories:</p> |
| 239 |
<ul> |
| 240 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey10l-maa5</code></li> |
| 241 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey9l-maa5</code></li> |
| 242 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns10l-maa5</code></li> |
| 243 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns9l-maa5</code></li> |
| 244 |
<li><code>crypto_pow/inv25519/amd64-maa5</code></li> |
| 245 |
</ul> |
| 246 |
</li> |
| 247 |
<li> |
| 248 |
<p>Kaushik Nath and Palash Sarkar, "Security and efficiency trade-offs |
| 249 |
for elliptic curve Diffie-Hellman at the 128-bit and 224-bit |
| 250 |
security levels." J. Cryptogr. Eng. 12(1): 107-121 (2022). |
| 251 |
Original release:</p> |
| 252 |
<ul> |
| 253 |
<li><a href="https://github.com/kn-cs/x25519/tree/master/intel64-mxaa-4limb"><span class="url">https://github.com/kn-cs/x25519/tree/master/intel64-mxaa-4limb</span></a></li> |
| 254 |
<li><a href="https://github.com/kn-cs/x25519"><span class="url">https://github.com/kn-cs/x25519</span></a></li> |
| 255 |
</ul> |
| 256 |
<p>This <code>mxaa-4limb</code> software is the source of various speedups to |
| 257 |
<code>maa4</code> on CPUs supporting BMI2 instructions (e.g., Intel Haswell |
| 258 |
from 2013), in particular producing the <code>mxaa</code> versions of |
| 259 |
<code>fe25519_mul.S</code> and <code>fe25519_nsquare.S</code>. These <code>.S</code> files are used |
| 260 |
inside the following lib25519 directories:</p> |
| 261 |
<ul> |
| 262 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-mxaa</code></li> |
| 263 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-mxaa</code></li> |
| 264 |
<li><code>crypto_mGnP/ed25519/amd64-mxaa</code></li> |
| 265 |
<li><code>crypto_nG/merged25519/amd64-avx2-10l-mxaa</code></li> |
| 266 |
<li><code>crypto_nG/merged25519/amd64-avx2-9l-mxaa</code></li> |
| 267 |
<li><code>crypto_nG/merged25519/amd64-mxaa</code></li> |
| 268 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey10l-mxaa</code></li> |
| 269 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey9l-mxaa</code></li> |
| 270 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns10l-mxaa</code></li> |
| 271 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns9l-mxaa</code></li> |
| 272 |
<li><code>crypto_nP/montgomery25519/amd64-mxaa</code></li> |
| 273 |
<li><code>crypto_pow/inv25519/amd64-mxaa</code></li> |
| 274 |
</ul> |
| 275 |
<p>This software is also the source of the following three different |
| 276 |
Montgomery-ladder functions, where the third also builds on the |
| 277 |
<code>maax</code> work listed below:</p> |
| 278 |
<ul> |
| 279 |
<li><code>crypto_nP/montgomery25519/amd64-maa4/mladder.S</code></li> |
| 280 |
<li><code>crypto_nP/montgomery25519/amd64-mxaa/mladder.S</code></li> |
| 281 |
<li><code>crypto_nP/montgomery25519/amd64-maax/mladder.S</code></li> |
| 282 |
</ul> |
| 283 |
</li> |
| 284 |
<li> |
| 285 |
<p>Kaushik Nath and Palash Sarkar, "Efficient arithmetic in |
| 286 |
(pseudo-)Mersenne prime order fields", Advances in Mathematics of |
| 287 |
Communications 16 (2022), pages 303–348. Original release:</p> |
| 288 |
<ul> |
| 289 |
<li><a href="https://github.com/kn-cs/pmp-farith/tree/master/gf-p2-255-19/SLDCC"><span class="url">https://github.com/kn-cs/pmp-farith/tree/master/gf-p2-255-19/SLDCC</span></a></li> |
| 290 |
</ul> |
| 291 |
<p>This is the source of various speedups to <code>mxaa</code> on CPUs that also |
| 292 |
support ADX instructions (e.g., Intel Broadwell from 2014), in |
| 293 |
particular producing the <code>maax</code> versions of <code>fe25519_mul.S</code>, |
| 294 |
<code>fe25519_square.S</code>, and <code>fe25519_nsquare.S</code>. These <code>.S</code> files are used |
| 295 |
inside the following lib25519 directories:</p> |
| 296 |
<ul> |
| 297 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-maax</code></li> |
| 298 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-maax</code></li> |
| 299 |
<li><code>crypto_mGnP/ed25519/amd64-avx512ifma-5l-maax</code></li> |
| 300 |
<li><code>crypto_mGnP/ed25519/amd64-maax</code></li> |
| 301 |
<li><code>crypto_nG/merged25519/amd64-avx2-10l-maax</code></li> |
| 302 |
<li><code>crypto_nG/merged25519/amd64-avx2-9l-maax</code></li> |
| 303 |
<li><code>crypto_nG/merged25519/amd64-avx512ifma-5l-maax</code></li> |
| 304 |
<li><code>crypto_nG/merged25519/amd64-maax</code></li> |
| 305 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey10l-maax</code></li> |
| 306 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey9l-maax</code></li> |
| 307 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns10l-maax</code></li> |
| 308 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns9l-maax</code></li> |
| 309 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-hey10l-maax</code></li> |
| 310 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-hey9l-maax</code></li> |
| 311 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-ns10l-maax</code></li> |
| 312 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-ns9l-maax</code></li> |
| 313 |
<li><code>crypto_nP/montgomery25519/amd64-avx512ifma-hey5l-maax</code></li> |
| 314 |
<li><code>crypto_nP/montgomery25519/amd64-avx512ifma-ns5l-maax</code></li> |
| 315 |
<li><code>crypto_nP/montgomery25519/amd64-maax</code></li> |
| 316 |
<li><code>crypto_pow/inv25519/amd64-maax</code></li> |
| 317 |
</ul> |
| 318 |
</li> |
| 319 |
<li> |
| 320 |
<p>Kaushik Nath and Palash Sarkar, "Efficient 4-Way Vectorizations of |
| 321 |
the Montgomery Ladder". IEEE Trans. Computers 71(3): 712-723 |
| 322 |
(2022). Original release:</p> |
| 323 |
<ul> |
| 324 |
<li><a href="https://github.com/kn-cs/vec-ladder/tree/master/Curve25519"><span class="url">https://github.com/kn-cs/vec-ladder/tree/master/Curve25519</span></a></li> |
| 325 |
</ul> |
| 326 |
<p>This is the source of the <code>hey10l</code> (radix 2<sup>25.5</sup>), <code>hey9l</code> (radix |
| 327 |
2<sup>29</sup>), <code>ns10l</code> (radix 2<sup>25.5</sup>), and <code>ns9l</code> (radix 2<sup>29</sup>) versions of |
| 328 |
<code>mladder.S</code> for CPUs that also support 256-bit AVX2 instructions |
| 329 |
(e.g., Intel Haswell from 2013). In lib25519, these four <code>.S</code> files |
| 330 |
are used in 16 directories:</p> |
| 331 |
<ul> |
| 332 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey10l-{maa4,maa5,maax,mxaa}</code></li> |
| 333 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-hey9l-{maa4,maa5,maax,mxaa}</code></li> |
| 334 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns10l-{maa4,maa5,maax,mxaa}</code></li> |
| 335 |
<li><code>crypto_nP/montgomery25519/amd64-avx2-ns9l-{maa4,maa5,maax,mxaa}</code></li> |
| 336 |
</ul> |
| 337 |
</li> |
| 338 |
<li> |
| 339 |
<p>Kaushik Nath, new Montgomery-ladder code new in lib25519 (no paper |
| 340 |
yet) for CPUs supporting AVX-512 instructions (e.g., Intel |
| 341 |
Skylake-X from 2017). These are seven files in lib25519:</p> |
| 342 |
<ul> |
| 343 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-hey10l-maax</code></li> |
| 344 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-hey9l-maax</code></li> |
| 345 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-ns10l-maax</code></li> |
| 346 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-ns9l-maax</code></li> |
| 347 |
<li><code>crypto_nP/montgomery25519/amd64-avx512ifma-hey5l-maax</code></li> |
| 348 |
<li><code>crypto_nP/montgomery25519/amd64-avx512ifma-ns5l-maax</code></li> |
| 349 |
<li><code>crypto_nP/montgomery25519/amd64-avx512-8x1-ns10l-maax</code></li> |
| 350 |
</ul> |
| 351 |
</li> |
| 352 |
<li> |
| 353 |
<p>Kaushik Nath, three versions of Montgomery ladder code new in |
| 354 |
lib25519 (no paper yet) for various AMD64 architectures. These ladders are |
| 355 |
optimized versions of the software available at <a href="https://github.com/kn-cs/x25519"><span class="url">https://github.com/kn-cs/x25519</span></a></p> |
| 356 |
<ul> |
| 357 |
<li><code>crypto_nP/montgomery25519/amd64-maa4/mladder.S</code></li> |
| 358 |
<li><code>crypto_nP/montgomery25519/amd64-maax/mladder.S</code></li> |
| 359 |
<li><code>crypto_nP/montgomery25519/amd64-mxaa/mladder.S</code></li> |
| 360 |
</ul> |
| 361 |
</li> |
| 362 |
<li> |
| 363 |
<p>Kaushik Nath, ten versions of Montgomery ladder code new in |
| 364 |
lib25519 (no paper yet) for ARM64 CPUs:</p> |
| 365 |
<ul> |
| 366 |
<li><code>crypto_nP/montgomery25519/arm64-maa4-{intmul,redmul}/mladder.S</code></li> |
| 367 |
<li><code>crypto_nP/montgomery25519/arm64-{uma10l,uma9l}/mladder.S</code></li> |
| 368 |
<li><code>crypto_nP/montgomery25519/arm64-{neon10l,neon9l}/mladder.S</code></li> |
| 369 |
<li><code>crypto_nP/montgomery25519/arm64-{neonplusuma10l,neonplusuma9l}/mladder.S</code></li> |
| 370 |
<li><code>crypto_nP/montgomery25519/arm64-{neonplusuma10l-opt,neonplusuma9l-opt}/mladder.S</code></li> |
| 371 |
</ul> |
| 372 |
<p>The ladder algorithm of the <code>arm64-neonplusuma</code> implementations has been taken from |
| 373 |
<a href="https://github.com/Emill/X25519-AArch64/blob/master/X25519_AArch64.pdf"><span class="url">https://github.com/Emill/X25519-AArch64/blob/master/X25519_AArch64.pdf</span></a>. |
| 374 |
The implementations have been done after vividly studying the code publicly available at |
| 375 |
<a href="https://github.com/Emill/X25519-AArch64/blob/master/X25519-AArch64.s"><span class="url">https://github.com/Emill/X25519-AArch64/blob/master/X25519-AArch64.s</span></a>. The assembly for |
| 376 |
field multiplication and field squaring used in the ladders are fresh developments.</p> |
| 377 |
<p>The ladder implementations of <code>arm64-neonplusuma10l</code> and <code>arm64-neonplusuma9l</code> |
| 378 |
have been optimized using Slothy <a href="https://github.com/slothy-optimizer/slothy"><span class="url">https://github.com/slothy-optimizer/slothy</span></a> |
| 379 |
to achieve <code>arm64-neonplusuma10l-opt</code> and <code>arm64-neonplusuma9l-opt</code>.</p> |
| 380 |
</li> |
| 381 |
<li> |
| 382 |
<p>Kaushik Nath, twenty versions of fixed-base-point |
| 383 |
scalar-multiplication code new in lib25519 (no paper yet) for |
| 384 |
various platforms:</p> |
| 385 |
<ul> |
| 386 |
<li><code>crypto_nG/merged25519/amd64-avx2-10l-maa4/ge25519_base.S</code></li> |
| 387 |
<li><code>crypto_nG/merged25519/amd64-avx2-10l-maax/ge25519_base.S</code></li> |
| 388 |
<li><code>crypto_nG/merged25519/amd64-avx2-10l-mxaa/ge25519_base.S</code></li> |
| 389 |
<li><code>crypto_nG/merged25519/amd64-avx2-9l-maa4/ge25519_base.S</code></li> |
| 390 |
<li><code>crypto_nG/merged25519/amd64-avx2-9l-maax/ge25519_base.S</code></li> |
| 391 |
<li><code>crypto_nG/merged25519/amd64-avx2-9l-mxaa/ge25519_base.S</code></li> |
| 392 |
<li><code>crypto_nG/merged25519/amd64-avx512ifma-5l-maax/ge25519_base.S</code></li> |
| 393 |
<li><code>crypto_nG/merged25519/amd64-maa4/ge25519_base.S</code></li> |
| 394 |
<li><code>crypto_nG/merged25519/amd64-maax/ge25519_base.S</code></li> |
| 395 |
<li><code>crypto_nG/merged25519/amd64-mxaa/ge25519_base.S</code></li> |
| 396 |
<li><code>crypto_nG/merged25519/amd64-maa4-opt/ge25519_base.S</code></li> |
| 397 |
<li><code>crypto_nG/merged25519/amd64-maax-opt/ge25519_base.S</code></li> |
| 398 |
<li><code>crypto_nG/merged25519/amd64-mxaa-opt/ge25519_base.S</code></li> |
| 399 |
<li><code>crypto_nG/merged25519/arm64-maa4-intmul/ge25519_base.S</code></li> |
| 400 |
<li><code>crypto_nG/merged25519/arm64-maa4-redmul/ge25519_base.S</code></li> |
| 401 |
<li><code>crypto_nG/merged25519/arm64-uma10l/ge25519_base.S</code></li> |
| 402 |
<li><code>crypto_nG/merged25519/arm64-uma9l/ge25519_base.S</code></li> |
| 403 |
<li><code>crypto_nG/merged25519/arm64-neonplusuma10l/ge25519_base.S</code></li> |
| 404 |
<li><code>crypto_nG/merged25519/arm64-neonplusuma10l-opt/ge25519_base.S</code></li> |
| 405 |
<li><code>crypto_nG/merged25519/arm64-neonplusuma9l/ge25519_base.S</code></li> |
| 406 |
</ul> |
| 407 |
<p>The implementation of <code>arm64-neonplusuma10l</code> has been optimized |
| 408 |
using Slothy <a href="https://github.com/slothy-optimizer/slothy"><span class="url">https://github.com/slothy-optimizer/slothy</span></a> |
| 409 |
to achieve <code>arm64-neonplusuma10l-opt</code>.</p> |
| 410 |
</li> |
| 411 |
<li> |
| 412 |
<p>Kaushik Nath, eighteen versions of double-scalar-multiplication code new |
| 413 |
in lib25519 (no paper yet) for various platforms. Each version has |
| 414 |
<code>precompute.S</code> and <code>process.S</code>:</p> |
| 415 |
<ul> |
| 416 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-maa4/ge25519_double_scalarmult_precompute.S</code></li> |
| 417 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-maax/ge25519_double_scalarmult_precompute.S</code></li> |
| 418 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-mxaa/ge25519_double_scalarmult_precompute.S</code></li> |
| 419 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-maa4/ge25519_double_scalarmult_precompute.S</code></li> |
| 420 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-maax/ge25519_double_scalarmult_precompute.S</code></li> |
| 421 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-mxaa/ge25519_double_scalarmult_precompute.S</code></li> |
| 422 |
<li><code>crypto_mGnP/ed25519/amd64-avx512ifma-5l-maax/ge25519_double_scalarmult_precompute.S</code></li> |
| 423 |
<li><code>crypto_mGnP/ed25519/amd64-maa4/ge25519_double_scalarmult_precompute.S</code></li> |
| 424 |
<li><code>crypto_mGnP/ed25519/amd64-maax/ge25519_double_scalarmult_precompute.S</code></li> |
| 425 |
<li><code>crypto_mGnP/ed25519/amd64-mxaa/ge25519_double_scalarmult_precompute.S</code></li> |
| 426 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-maa4/ge25519_double_scalarmult_process.S</code></li> |
| 427 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-maax/ge25519_double_scalarmult_process.S</code></li> |
| 428 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-10l-mxaa/ge25519_double_scalarmult_process.S</code></li> |
| 429 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-maa4/ge25519_double_scalarmult_process.S</code></li> |
| 430 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-maax/ge25519_double_scalarmult_process.S</code></li> |
| 431 |
<li><code>crypto_mGnP/ed25519/amd64-avx2-9l-mxaa/ge25519_double_scalarmult_process.S</code></li> |
| 432 |
<li><code>crypto_mGnP/ed25519/amd64-avx512ifma-5l-maax/ge25519_double_scalarmult_process.S</code></li> |
| 433 |
<li><code>crypto_mGnP/ed25519/amd64-maa4/ge25519_double_scalarmult_process.S</code></li> |
| 434 |
<li><code>crypto_mGnP/ed25519/amd64-maax/ge25519_double_scalarmult_process.S</code></li> |
| 435 |
<li><code>crypto_mGnP/ed25519/amd64-mxaa/ge25519_double_scalarmult_process.S</code></li> |
| 436 |
<li><code>crypto_mGnP/ed25519/arm64-maa4-intmul/ge25519_double_scalarmult_precompute.S</code></li> |
| 437 |
<li><code>crypto_mGnP/ed25519/arm64-maa4-intmul/ge25519_double_scalarmult_process.S</code></li> |
| 438 |
<li><code>crypto_mGnP/ed25519/arm64-maa4-redmul/ge25519_double_scalarmult_precompute.S</code></li> |
| 439 |
<li><code>crypto_mGnP/ed25519/arm64-maa4-redmul/ge25519_double_scalarmult_process.S</code></li> |
| 440 |
<li><code>crypto_mGnP/ed25519/arm64-uma10l/ge25519_double_scalarmult_precompute.S</code></li> |
| 441 |
<li><code>crypto_mGnP/ed25519/arm64-uma9l/ge25519_double_scalarmult_process.S</code></li> |
| 442 |
<li><code>crypto_mGnP/ed25519/arm64-uma10l/ge25519_double_scalarmult_precompute.S</code></li> |
| 443 |
<li><code>crypto_mGnP/ed25519/arm64-uma9l/ge25519_double_scalarmult_process.S</code></li> |
| 444 |
<li><code>crypto_mGnP/ed25519/arm64-neonplusuma10l/ge25519_double_scalarmult_precompute.S</code></li> |
| 445 |
<li><code>crypto_mGnP/ed25519/arm64-neonplusuma9l/ge25519_double_scalarmult_process.S</code></li> |
| 446 |
<li><code>crypto_mGnP/ed25519/arm64-neonplusuma10l/ge25519_double_scalarmult_precompute.S</code></li> |
| 447 |
<li><code>crypto_mGnP/ed25519/arm64-neonplusuma9l/ge25519_double_scalarmult_process.S</code></li> |
| 448 |
</ul> |
| 449 |
</li> |
| 450 |
<li> |
| 451 |
<p>Kaushik Nath, eleven versions of batch scalar-multiplication code new in lib25519 (no |
| 452 |
paper yet) for various platforms.</p> |
| 453 |
<ul> |
| 454 |
<li><code>crypto_nPbatch/montgomery25519/amd64-avx2-4x1-10l-{maa4,maa5,maax,mxaa}</code></li> |
| 455 |
<li><code>crypto_nPbatch/montgomery25519/amd64-avx2-4x1-9l-{maa4,maa5,maax,mxaa}</code></li> |
| 456 |
<li><code>crypto_nPbatch/montgomery25519/amd64-avx512ifma-8x1</code></li> |
| 457 |
<li><code>crypto_nPbatch/montgomery25519/arm64-neon-2x1-{uma-10l,uma-9l}</code></li> |
| 458 |
</ul> |
| 459 |
</li> |
| 460 |
<li> |
| 461 |
<p>Kaushik Nath, eighteen versions of multi-scalar-multiplication code new in lib25519 (no |
| 462 |
paper yet) for various platforms. Each version has <code>precompute.S</code> and <code>process.S</code>. |
| 463 |
Additionally, the <code>amd64-{maa4,maax,mxaa}-opt</code>, <code>arm64-maa4-{intmul,redmul}</code> versions |
| 464 |
have <code>p1p1_to_p2.S</code> and the <code>arm64-{uma10l,uma9l}</code>, <code>arm64-neonplusuma-{uma-10l,uma-9l}</code> versions |
| 465 |
have <code>p1p1_{10l,9l}_dense_to_p2_{10l,pl}.S</code>:</p> |
| 466 |
<ul> |
| 467 |
<li><code>crypto_multiscalar/ed25519/amd64-{maa4,maax,mxaa}-opt</code></li> |
| 468 |
<li><code>crypto_multiscalar/ed25519/amd64-{maa4,maax,mxaa}-p3-opt</code></li> |
| 469 |
<li><code>crypto_multiscalar/ed25519/arm64-maa4-{intmul,redmul}</code></li> |
| 470 |
<li><code>crypto_multiscalar/ed25519/arm64-maa4-{intmul,redmul}-p3</code></li> |
| 471 |
<li><code>crypto_multiscalar/ed25519/arm64-{uma10l,uma9l}</code></li> |
| 472 |
<li><code>crypto_multiscalar/ed25519/arm64-{uma10l,uma9l}-p3</code></li> |
| 473 |
<li><code>crypto_multiscalar/ed25519/arm64-{neonplusuma10l,neonplusuma9l}</code></li> |
| 474 |
<li><code>crypto_multiscalar/ed25519/arm64-{neonplusuma10l,neonplusuma9l}-p3</code></li> |
| 475 |
</ul> |
| 476 |
</li> |
| 477 |
</ul> |
| 478 |
<p>Many of the <code>crypto_pow/inv25519</code> implementations use exponentiation |
| 479 |
on top of the multipliers used in the above implementations. |
| 480 |
The feedback-squaring implementation in <code>crypto_pow/inv25519/arm64-uma10l/fe25519_nsquare.S</code> |
| 481 |
has been taken from the AArch64 implementation of X25519 by Emil Lenngren at |
| 482 |
<a href="https://github.com/Emill/X25519-AArch64/blob/master/X25519-AArch64.s"><span class="url">https://github.com/Emill/X25519-AArch64/blob/master/X25519-AArch64.s</span></a> and has been slightly modified.</p> |
| 483 |
<p>Some of the <code>crypto_pow/inv25519</code> implementations instead use the <code>safegcd</code> |
| 484 |
algorithm from the following papers:</p> |
| 485 |
<ul> |
| 486 |
<li> |
| 487 |
<p>Daniel J. Bernstein, Bo-Yin Yang. "Fast constant-time gcd |
| 488 |
computation and modular inversion." IACR Transactions on |
| 489 |
Cryptographic Hardware and Embedded Systems 2019 issue 3 (2019), |
| 490 |
340–398.</p> |
| 491 |
</li> |
| 492 |
<li> |
| 493 |
<p>Daniel J. Bernstein, Han-Ting Chen, John R. Harrison, Cesare Huang, |
| 494 |
Gregory Maxwell, Bow-Yaw Wang, Pieter Wuille, Bo-Yin Yang. |
| 495 |
"Accelerating and verifying constant-time modular inversion." |
| 496 |
Eurocrypt 2026, volume 7, 598–627.</p> |
| 497 |
</li> |
| 498 |
</ul> |
| 499 |
<p>Specifically:</p> |
| 500 |
<ul> |
| 501 |
<li> |
| 502 |
<p>The <code>lib25519/crypto_pow/inv25519/amd64-safegcd</code> software is the |
| 503 |
<code>inverse25519skylake</code> software (Inverter 1X) described in the second paper.</p> |
| 504 |
</li> |
| 505 |
<li> |
| 506 |
<p>The <code>lib25519/crypto_pow/inv25519/arm64-safegcdneon</code> software is new |
| 507 |
software from Kaushik Nath (no paper yet).</p> |
| 508 |
</li> |
| 509 |
</ul> |
| 510 |
<p>For lower-layer SHA-512 functions:</p> |
| 511 |
<ul> |
| 512 |
<li>Daniel J. Bernstein, <code>supercop/crypto_hash*/sha512/*</code>. In lib25519, |
| 513 |
some unused variables are removed in <code>crypto_hashblocks/sha512/avx</code> |
| 514 |
to eliminate compiler warnings.</li> |
| 515 |
</ul> |
| 516 |
<p>Most of the lib25519 infrastructure, such as the run-time implementation |
| 517 |
selector automatically guided by CPU type and previous benchmarks, is |
| 518 |
new in lib25519 from Daniel J. Bernstein. Portions of <code>autogen/speed</code> |
| 519 |
(generating <code>lib25519-speed.c</code>) and <code>autogen/test</code> (generating |
| 520 |
<code>lib25519-test.c</code>) are based on benchmarking software and test software in |
| 521 |
SUPERCOP by Daniel J. Bernstein. The symmetric-cryptography code for |
| 522 |
generating pseudorandom test inputs and hashing test outputs is adapted |
| 523 |
from TweetNaCl, a library by Daniel J. Bernstein, Wesley Janssen, Tanja |
| 524 |
Lange, and Peter Schwabe.</p><hr><font size=1><b>Version:</b> |
| 525 |
This is version 2026.06.14 of the "People" web page. |
| 526 |
</font> |
| 527 |
</div> |
| 528 |
</body> |
| 529 |
</html> |