-rw-r--r-- 2735 libmceliece-20241009/doc/man/mceliece.1 raw
.\" Automatically generated by Pandoc 2.17.1.1
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "mceliece" "1" "" "" ""
.hy
.SS NAME
.PP
mceliece - command-line interface for the libmceliece implementation of
the Classic McEliece cryptosystem
.SS SYNOPSIS
.PP
Key generation (for, e.g., \f[V]mceliece6960119\f[R]):
.IP
.nf
\f[C]
mceliece6960119-keypair 5>publickey 9>secretkey
\f[R]
.fi
.PP
Encapsulation (for, e.g., \f[V]mceliece6960119\f[R]):
.IP
.nf
\f[C]
mceliece6960119-enc >ciphertext 7>sessionkey 4<publickey
\f[R]
.fi
.PP
Decapsulation (for, e.g., \f[V]mceliece6960119\f[R]):
.IP
.nf
\f[C]
mceliece6960119-dec 7>sessionkey <ciphertext 8<secretkey
\f[R]
.fi
.SS DESCRIPTION
.PP
libmceliece is an implementation of the Classic
McEliece (https://classic.mceliece.org) cryptosystem.
The command-line interface for libmceliece provides the following
command-line tools:
.IP
.nf
\f[C]
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
\f[R]
.fi
.PP
Each tool exits 0 on success, nonzero on failure.
.PP
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.
.PP
The details below use \f[V]mceliece6960119\f[R] as an example.
.SS KEY GENERATION
.PP
Alice runs the \f[V]mceliece6960119-keypair\f[R] command.
This command randomly generates Alice\[cq]s secret key and Alice\[cq]s
corresponding public key.
It writes the public key to file descriptor 5, and then writes the
secret key to file descriptor 9.
.PP
The \f[V]mceliece6960119f-keypair\f[R] command is internally more
complicated than the \f[V]mceliece6960119-keypair\f[R] command but
provides faster key generation.
The commands are interoperable.
.SS ENCAPSULATION
.PP
Bob runs the \f[V]mceliece6960119-enc\f[R] command.
This command reads Alice\[cq]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.
.SS DECAPSULATION
.PP
Alice runs the \f[V]mceliece6960119-dec\f[R] command.
This command reads Alice\[cq]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.
.SS SEE ALSO
.PP
\f[B]mceliece\f[R](3)