-r--r--r-- 8063 lib25519-20260614/doc/html/install.html raw
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html{overflow-y:scroll;background-color:#091552}
body{font-family:"Noto Sans","Droid Sans","DejaVu Sans","Arial",sans-serif;line-height:1.5}
tt,code{background-color:#f0f0f0;font-family:Consolas,Monaco,"Noto Sans Mono","DejaVu Sans Mono",monospace,sans-serif;font-size:1em;}
pre{margin-left:3em}
p,ul,ol,blockquote,pre{font-size:1.0em;line-height:1.6}
li p{font-size:1.0em}
blockquote p{font-size:1.0em}
h1{font-size:1.5em}
h2{font-size:1.3em}
h3{font-size:1.0em}
h1 a{text-decoration:none}
table{border-collapse:collapse}
th,td{border:1px solid black}
table a{text-decoration:none}
table tr{font-size:1.0em;line-height:1.6em}
table tr{font-size:1.0em;line-height:1.5}
tbody tr:nth-child(12n+1){background-color:#f0ffff}
tbody tr:nth-child(12n+2){background-color:#f0ffff}
tbody tr:nth-child(12n+3){background-color:#f0ffff}
tbody tr:nth-child(12n+4){background-color:#f0ffff}
tbody tr:nth-child(12n+5){background-color:#f0ffff}
tbody tr:nth-child(12n+6){background-color:#f0ffff}
tbody tr:nth-child(12n+7){background-color:#fffff0}
tbody tr:nth-child(12n+8){background-color:#fffff0}
tbody tr:nth-child(12n+9){background-color:#fffff0}
tbody tr:nth-child(12n+10){background-color:#fffff0}
tbody tr:nth-child(12n+11){background-color:#fffff0}
tbody tr:nth-child(12n+12){background-color:#fffff0}
#headline{display:block;margin:0;padding:0;color:#ffffff;background-color:#091552}
#headline .text{font-weight:bold;font-size:1.0em}
#headline input{display:none}
#nav ul{margin:0;padding:0}
#nav li{list-style-type:none;margin:0;padding:0}
.navtop{padding-bottom:0.5em;font-weight:bold;font-size:1.0em}
.navtop{background-color:#091552;color:#ffffff}
#nav .here{background-color:#091552;color:#ffffff}
#nav .away{background-color:#091552;color:#ffffff}
#nav .away a{text-decoration:none;display:block;color:#ffffff}
#nav .away a:hover,.away a:active{text-decoration:underline}
#hidemenu{visibility:hidden;display:none;overflow:hidden;position:fixed;top:0;left:0;height:100%;width:100%}
.main{padding:5px}
.main{background-color:#ffffff}
.pagetitle{font-size:1.4em;font-weight:bold}
@media only screen and (min-width:512px) {
.navtop{padding-top:5px}
#headline{top:0;margin:0;width:110px;height:100%;position:fixed;overflow:auto}
#headline .noselect{display:none}
#headline #nav{visibility:visible;display:block;width:auto;height:auto}
.main{margin-left:120px}
#headline #hidemenu{visibility:hidden}
}
@media not screen and (min-width:512px) {
#headline .noselect{-webkit-user-select:none;-ms-user-select:none;user-select:none;}
#headline #nav #navbot{visibility:hidden;position:fixed;top:0;left:-70%;z-index:2;transition:0.2s;margin:0;padding:0}
#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}
#headline input:checked ~ #hidemenu{visibility:visible;display:block;background:black;opacity:0.3;z-index:1}
}
.openssl{color:#900009}
.s2n{color:#004040}
.lib25519{color:#091552}
</style>
<title>
lib25519: Install</title>
</head>
<body>
<label id=headline>
<input type=checkbox />
<nav id=nav>
<div class=navtop>
<span class=noselect>≡</span>
lib25519</div>
<ul id=navbot>
<li class=away><a href=index.html>Intro</a>
</li><li class=away><a href=download.html>Download</a>
</li><li class=here>Install
</li><li class=away><a href=test.html>Test</a>
</li><li class=away><a href=x25519-cli.html>X CLI</a>
</li><li class=away><a href=ed25519-cli.html>Ed CLI</a>
</li><li class=away><a href=api.html>API</a>
</li><li class=away><a href=security.html>Security</a>
</li><li class=away><a href=speed.html>Speed</a>
</li><li class=away><a href=internals.html>Internals</a>
</li><li class=away><a href=people.html>People</a>
</li><li class=away><a href=license.html>License</a>
</li></ul></nav>
<div id=hidemenu></div>
</label>
<div class=main>
<div class=pagetitle>lib25519: Install</div>
<p>Prerequisites:</p>
<ul>
<li><code>python3</code> (for: build, test)</li>
<li>recommended <code>python3-capstone</code> (for: build)</li>
<li><code>gcc</code> and/or <code>clang</code> (for: build)</li>
<li><code>valgrind</code> (for: build, test)</li>
<li><a href="https://cpucycles.cr.yp.to"><code>libcpucycles</code></a> (for: build, bench)</li>
<li><a href="https://randombytes.cr.yp.to"><code>librandombytes</code></a> (for: build, test, bench, run)</li>
</ul>
<p>Make sure to <a href="test.html">test</a> the compiled library.
The tests check for subtle security problems that can be created by compilers.
A compiled version of lib25519 is <strong>not supported</strong> unless it passes the full test suite.</p>
<h3>For sysadmins</h3>
<p>To install in <code>/usr/local/{include,lib,bin,man}</code>:</p>
<pre><code>./configure && make -j8 install
</code></pre>
<h3>For developers with an unprivileged account</h3>
<p>Typically you'll already have</p>
<pre><code>export LD_LIBRARY_PATH="$HOME/lib"
export LIBRARY_PATH="$HOME/lib"
export CPATH="$HOME/include"
export MANPATH="$HOME/man"
export PATH="$HOME/bin:$PATH"
</code></pre>
<p>in <code>$HOME/.profile</code>. To install in <code>$HOME/{include,lib,bin,man}</code>:</p>
<pre><code>./configure --prefix=$HOME && make -j8 install
</code></pre>
<h3>For distributors creating a package</h3>
<p>Run</p>
<pre><code>./configure --prefix=/usr && make -j8
</code></pre>
<p>and then follow your usual packaging procedures for the
<code>build/0/package</code> files:</p>
<pre><code>build/0/package/include/lib25519.h
build/0/package/lib/lib25519*
build/0/package/bin/lib25519*
build/0/package/man/man3/*.3
build/0/package/man/man1/*.1
</code></pre>
<h3>More options, part 1: s2n-bignum</h3>
<p>Before <code>./configure</code> you can run <code>./use-s2n-bignum</code>
to download various assembly implementations from
<a href="https://github.com/awslabs/s2n-bignum">s2n-bignum</a>
and integrate them into lib25519.
These implementations save time on some CPUs,
but the more important feature of these implementations
is that they are formally verified to work correctly on all inputs.
The implementations cover, for 64-bit Intel/AMD/ARM,
the main <code>nG</code> and <code>nP</code> subroutines used in X25519 key generation and shared-secret generation,
along with a lower-level <code>pow/inv25519</code> subroutine having further applications.</p>
<p>You can run</p>
<pre><code>./configure --prioritizeverified
</code></pre>
<p>to prioritize implementations marked as verified even when they are slower.
Beware that this will still fall back to unverified implementations
for primitives and CPUs that do not have verified implementations.</p>
<h3>More options, part 2: architectures</h3>
<p>You can run</p>
<pre><code>./configure --host=amd64
</code></pre>
<p>to override <code>./configure</code>'s guess of the architecture that it should
compile for.</p>
<p>Inside the <code>build</code> directory, <code>0</code> is symlinked to <code>amd64</code> for
<code>--host=amd64</code>. Running <code>make clean</code> removes <code>build/amd64</code>. Re-running
<code>./configure</code> automatically starts with <code>make clean</code>.</p>
<p>A subsequent <code>./configure --host=arm64</code> will create <code>build/arm64</code> and
symlink <code>0 -> arm64</code>, without touching an existing <code>build/amd64</code>. However,
cross-compilers aren't yet selected automatically.</p>
<h3>More options, part 3</h3>
<p>One further <code>./configure</code> option is supported for
<a href="internals.html">developers</a>:
<code>--no-trim</code>.</p>
<p>All <code>./configure</code> options not listed above are experimental and <strong>not supported</strong>.
Use them at your own risk.</p><hr><font size=1><b>Version:</b>
This is version 2026.06.13 of the "Install" web page.
</font>
</div>
</body>
</html>