-r--r--r-- 4847 libmceliece-20230612/doc/html/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:sans-serif}
p,ul,ol,blockquote,pre{font-size:1.0em;line-height:1.6em}
li p{font-size:1.0em}
blockquote p{font-size:1.0em}
tt{font-size:1.3em}
code{font-size:1.3em}
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}
.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}
.headline{padding:0;font-weight:bold;font-size:1.5em;vertical-align:top;padding-bottom:0.5em;color:#196069}
.navt{display:inline-block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;
min-width:14%;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:#196069;}
.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>
libmceliece: CLI</title>
</head>
<body>
<div class=headline>
libmceliece</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 here">CLI
</div><div class="navt away"><a href=security.html>Security</a>
</div><div class="navt away"><a href=verification.html>Verification</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>mceliece - command-line interface for the libmceliece implementation of the Classic McEliece cryptosystem</p>
<h3>SYNOPSIS</h3>
<p>Key generation (for, e.g., <code>mceliece6960119</code>):</p>
<pre><code> mceliece6960119-keypair 5>publickey 9>secretkey
</code></pre>
<p>Encapsulation (for, e.g., <code>mceliece6960119</code>):</p>
<pre><code> mceliece6960119-enc >ciphertext 7>sessionkey 4<publickey
</code></pre>
<p>Decapsulation (for, e.g., <code>mceliece6960119</code>):</p>
<pre><code> mceliece6960119-dec 7>sessionkey <ciphertext 8<secretkey
</code></pre>
<h3>DESCRIPTION</h3>
<p>libmceliece is an implementation
of the <a href="https://classic.mceliece.org">Classic McEliece</a> cryptosystem.
The command-line interface for libmceliece
provides the following command-line tools:</p>
<pre><code> mceliece{6960119,6688128,8192128,460896,348864}-keypair
mceliece{6960119,6688128,8192128,460896,348864}f-keypair
mceliece{6960119,6688128,8192128,460896,348864}-enc
mceliece{6960119,6688128,8192128,460896,348864}-dec
</code></pre>
<p>Each tool exits 0 on success, nonzero on failure.</p>
<p>These tools allow libmceliece
to be easily used from shell scripts.
Other languages can also use libmceliece via these tools,
but languages typically have good support for FFI
and can use the C interface directly.</p>
<p>The details below use <code>mceliece6960119</code> as an example.</p>
<h3>KEY GENERATION</h3>
<p>Alice runs the <code>mceliece6960119-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>
<p>The <code>mceliece6960119f-keypair</code> command
is internally more complicated
than the <code>mceliece6960119-keypair</code> command
but provides faster key generation.
The commands are interoperable.</p>
<h3>ENCAPSULATION</h3>
<p>Bob runs the <code>mceliece6960119-enc</code> command.
This command
reads Alice's public key from file descriptor 4.
It randomly generates
a ciphertext and the corresponding session key.
It writes the ciphertext to stdout,
and then writes the session key to file descriptor 7.</p>
<h3>DECAPSULATION</h3>
<p>Alice runs the <code>mceliece6960119-dec</code> command.
This command
reads Alice's secret key from file descriptor 8,
and then reads a ciphertext from stdin.
It computes the corresponding session key,
which it writes to file descriptor 7.</p>
<h3>SEE ALSO</h3>
<p><strong>mceliece</strong>(3)</p><hr><font size=1><b>Version:</b>
This is version 2023.02.19 of the "CLI" web page.
</font>
</div>
</body>
</html>