-r--r--r-- 4733 lib25519-20230630/doc/html/ed25519-cli.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}
body{font-family:"Noto Sans","Droid Sans","DejaVu Sans","Arial",sans-serif;line-height:1.6}
tt,code{font-family:"Noto Sans Mono","Droid Sans Mono","DejaVu Sans Mono","Courier New",monospace,sans-serif;font-size:1em;}
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}
.links a:hover{text-decoration:underline}
.links a:active{text-decoration:underline}
.links img{width:200px;padding-left:1em}
.links td{border:0px;padding-top:0.5em;padding-bottom:0.5em}
.openssl{color:#004040}
.lib25519{color:#c25519}
.headline{padding:0;font-weight:bold;font-size:1.5em;vertical-align:top;padding-bottom:0.5em;color:#c25519}
.navt{display:inline-block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;
min-width:16%;margin:0;padding:0;padding-left:0.5em;padding-right:0.5em;vertical-align:center;
font-weight:bold;font-size:1.1em;text-align:center;border:1px solid black}
.here{border-bottom:0px;background-color:#ffffff}
.away{background-color:#c25519;}
.away a{text-decoration:none;display:block;color:#ffffff}
.away a:hover,.away a:active{text-decoration:underline}
.main{margin:0;padding-top:0em;padding-bottom:1%;clear:both}
</style>
<title>
lib25519: Ed CLI</title>
</head>
<body>
<div class=headline>
lib25519</div>
<div class=nav>
<div class="navt away"><a href=index.html>Intro</a>
</div><div class="navt away"><a href=download.html>Download</a>
</div><div class="navt away"><a href=install.html>Install</a>
</div><div class="navt away"><a href=api.html>API</a>
</div><div class="navt away"><a href=x25519-cli.html>X CLI</a>
</div><div class="navt here">Ed CLI
</div><div class="navt away"><a href=security.html>Security</a>
</div><div class="navt away"><a href=speed.html>Speed</a>
</div><div class="navt away"><a href=internals.html>Internals</a>
</div><div class="navt away"><a href=people.html>People</a>
</div><div class="navt away"><a href=license.html>License</a>
</div></div>
<div class=main>
<h3>NAME</h3>
<p>ed25519-cli - command-line interface for the lib25519 implementation of the Ed25519 signature system</p>
<h3>SYNOPSIS</h3>
<p>Key generation:</p>
<pre><code> ed25519-keypair 5>publickey 9>secretkey
</code></pre>
<p>Signature generation:</p>
<pre><code> ed25519-sign 8<secretkey <message >signedmessage
</code></pre>
<p>Signature verification and message recovery:</p>
<pre><code> ed25519-open 4<publickey <signedmessage >message
</code></pre>
<h3>DESCRIPTION</h3>
<p>lib25519 is an implementation
of the X25519 encryption system
and the Ed25519 signature system.
The command-line interface for lib25519
provides three Ed25519 tools,
documented here,
and two X25519 tools,
documented separately.</p>
<p>Each tool exits nonzero on failure (e.g., running out of memory), 0 on success.</p>
<p>These tools allow lib25519
to be easily used from shell scripts.
Other languages can also use lib25519 via these tools,
but languages typically have good support for FFI
and can use the C interface directly.</p>
<h3>KEY GENERATION</h3>
<p>Alice runs the <code>ed25519-keypair</code> command.
This command randomly generates
Alice's secret key and Alice's corresponding public key.
It writes the public key to file descriptor 5,
and then writes the secret key to file descriptor 9.</p>
<h3>SIGNATURE GENERATION</h3>
<p>Alice runs the <code>ed25519-sign</code> command.
This command reads Alice's secret key from file descriptor 8.
It then reads a message (into memory) from standard input (file descriptor 0).
It signs the message using Alice's secret key,
and then writes the signed message to standard output (file descriptor 1).</p>
<h3>SIGNATURE VERIFICATION AND MESSAGE RECOVERY</h3>
<p>Bob runs the <code>ed25519-open</code> command.
This command reads Alice's public key from file descriptor 4.
It then reads a signed message (into memory) from standard input (file descriptor 0).
It verifies the signed message using Alice's public key,
and then writes the verified message to standard output (file descriptor 1).</p>
<p>For <code>ed25519-open</code>,
exit code 100 specifically indicates an invalid signature;
retrying on the same input will then always fail.
In this case, <code>ed25519-open</code> produces an empty output.</p>
<h3>SEE ALSO</h3>
<p><strong>x25519-cli</strong>(1), <strong>lib25519</strong>(3)</p><hr><font size=1><b>Version:</b>
This is version 2023.06.21 of the "Ed CLI" web page.
</font>
</div>
</body>
</html>