-r--r--r-- 5841 lib25519-20260614/doc/html/x25519-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;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: X CLI</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=away><a href=install.html>Install</a> </li><li class=away><a href=test.html>Test</a> </li><li class=here>X CLI </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: X CLI</div> <h3>NAME</h3> <p>x25519-cli - command-line interface for the lib25519 implementation of the X25519 encryption system</p> <h3>SYNOPSIS</h3> <p>Key generation:</p> <pre><code>x25519-keypair 5&gt;publickey 9&gt;secretkey </code></pre> <p>Shared-secret generation for Alice:</p> <pre><code>x25519-dh 8&lt;alicesecret 4&lt;bobpublic 7&gt;sharedsecret </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 two X25519 tools, documented here, and three Ed25519 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>x25519-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>SHARED-SECRET GENERATION</h3> <p>Alice runs the <code>x25519-dh</code> command. This command reads Alice's secret key from file descriptor 8. It then reads Bob's public key from file descriptor 4. It then writes a secret shared between Alice and Bob to file descriptor 7.</p> <h3>SEE ALSO</h3> <p><strong>ed25519-cli</strong>(1), <strong>lib25519</strong>(3)</p><hr><font size=1><b>Version:</b> This is version 2024.02.18 of the "X CLI" web page. </font> </div> </body> </html>