/*! \mainpage RQC: a Public-Key Encryption scheme
 *
 *  1. SUBMISSION OVERVIEW
 *  ----------------------
 *
 *  In order to fully understand this submission, one should note that RQC is a public-key encryption scheme submitted as a KEM for which NIST "standard conversion techniques" should be applied (see NIST FAQ#13). In addition, the aforementionned KEM is obtained by applying a conversion technique to a PKE. In order to avoid any confusion, we may refer to:
 *
 * - <b>RQC_PKE IND-CPA</b>: RQC PKE IND-CPA scheme due to \cite cryptoeprint:2016:1194.
 * - <b>RQC_KEM IND-CCA2</b>: RQC KEM IND-CCA2 scheme obtained by applying the transformation from \cite cryptoeprint:2017:604 to the RQC PKE IND-CPA scheme. It is the implementation provided.
 * - <b>RQC_PKE IND-CCA2</b>: RQC PKE IND-CCA2 scheme obtained by applying NIST "standard conversion techniques" to the RQC KEM IND-CCA2 scheme. It is the scheme submitted.<br />
 *
 * 
 * Both reference implementation and optimized implementation provided for this submission are the same. Three parameters sets denoted respectively RQC-128, RQC-192 and RQC-256 are provided as explained in the supporting documentation. Each parameter set folder is organized as follows:
 * 
 *  - <b>bin/</b>: Files generated during compilation
 *  - <b>doc/</b>: Technical documentation of the scheme
 *  - <b>lib/</b>: Third party libraries used 
 *  - <b>src/</b>: Source code of the scheme  
 *  - <b>doxygen.conf</b>: Documentation configuration file
 *  - <b>configure</b>: Configuration file
 *  - <b>Makefile</b>: Makefile
 *  
 *  <br />
 *  
 *  2. INSTALLATION INSTRUCTIONS
 *  ----------------------------
 *  
 *  <h3>2.1 Requirements</h3>
 *
 *  The following softwares and librairies are required: <b>g++</b>, <b>ntl</b>, <b>openssl</b> and <b>gmp</b>.
 *
 *  <h3>2.2 Compilation Step</h3>
 *
 *  Let <b>X</b> denotes <b>128</b>, <b>192</b> or <b>256</b> depending on the parameter set considered. RQC can be compiled in three differents ways:
 *  - Execute <b>make rqcX</b> to compile a working example of the scheme. Run <b>bin/rqcX</b> to execute the scheme and display its performances.
 *  - Execute <b>make rqcX-kat</b> to compile the NIST KAT generator. Run <b>bin/rqcX-kat</b> to generate KAT files.
 *  - Execute <b>make rqcX-verbose</b> to compile a working example of the scheme in verbose mode. Run <b>bin/rqcX-verbose</b> to generate intermediate values.
 *
 *  During compilation, the following files are created inside the <b>bin/build</b> folder:
 *  - <b>hash.o</b>: A wrapper around openssl SHA512 implementation
 *  - <b>rng.o</b>: NIST rng
 *  - <b>ffi_field.o</b>: Functions to manipulate finite fields.
 *  - <b>ffi_elt.o</b>: Functions to manipulate finite fields elements.
 *  - <b>ffi_vec.o</b>: Functions to manipulate vectors over finite fields.
 *  - <b>parsing.o</b>: Functions to parse public key, secret key and ciphertext of the scheme.
 *  - <b>q_polynomial.o</b>: Functions to manipulate q_polynomials.
 *  - <b>gabidulin.o</b>: Functions to encode and decode messages using Gabidulin codes (either in normal mode or verbose mode).
 *  - <b>rqc.o</b>: The RQC PKE IND-CPA scheme (either in normal mode or verbose mode).
 *  - <b>kem.o</b>: The RQC KEM IND-CCA2 scheme (either in normal mode or verbose mode).
 *
 * <br />
 *
 *  3. DOCUMENTATION GENERATION
 *  ---------------------------
 *
 *  <h3>3.1 Requirements</h3>
 *
 *  The following softwares are required: <b>doxygen</b> and <b>bibtex</b>.
 *
 *  <h3>3.2 Generation Step</h3>
 * 
 *  - Run <b>doxygen doxygen.conf</b> to generate the code documentation
 *  - Browse <b>doc/html/index.html</b> to read the documentation
 *
 * <br />
 *
 *  4. ADDITIONAL INFORMATIONS
 *  --------------------------
 *
 *  <h3>4.1 Implementation overview</h3>
 *
 *  The <b>RQC_KEM IND-CCA2</b> scheme is defined in the api.h and parameters.h files and implemented in kem.cpp.
 *  The latter is based on the <b>RQC_PKE IND-CPA</b> scheme that is defined in rqc.h and implemented in rqc.cpp.
 *  The <b>RQC_PKE IND-CPA</b> scheme uses Gabidulin codes (see gabidulin.h and gabidulin.cpp) which relies on q-polynomials (see q_polynomial.h and q_polynomial.cpp).
 *  The files ffi.h, ffi_field.h, ffi_elt.h, ffi_vec.h, ffi_field.cpp, ffi_elt.cpp and ffi_vec.cpp provide the functions performing the various operations over finite fields required by the scheme.
 *  As public key, secret key and ciphertext can manipulated either with theirs mathematical representations or as bit strings, the files parsing.h and parsing.cpp provide functions to switch between these two representations.
 *  Finally, the files <b>hash.h</b>, <b>rng.h</b>, <b>hash.cpp</b> and <b>rng.cpp</b> (inside the <b>lib/</b> folder) contain respectively a wrapper around OpenSSL SHA512 implementation and the NIST random functions.  
 *
 *  <h3>4.2 Finite field interface</h3>
 *
 *  RQC is a rank-based scheme and as such heavily relies on finite field arithmetic. 
 *  We have provided an interface for finite fields (through files ffi.h, ffi_field.h, ffi_elt.h and ffi_vec.h) describing the various operations required by the scheme. 
 *  In this submission, the <b>f</b>inite <b>f</b>ield <b>i</b>nterface (<b>ffi</b>) is implemented using the NTL library \cite ntl but one should note that RQC can work with any implementation of our finite field interface as long as its API is respected (one may use MPFQ \cite mpfq for instance). 
 *  In the context of our ffi interface, a finite field always describes an extension of a binary field namely a finite field of the form GF(2^m).

 *  The ffi interface works as follows:
 *  - <b>ffi.h</b>: Constants that defines the considered finite field ;
 *  - <b>ffi_field.h</b>: Functions to initialize finite fields ;
 *  - <b>ffi_elt.h</b>: Functions to manipulate elements of GF(2^m) ;
 *  - <b>ffi_vec.h</b>: Functions to manipulate vectors over GF(2^m).
 *  
 *  In our reference implementation, the considered fields are <b>GF(2^97)</b>, <b>GF(2^107)</b> and <b>GF(2^137)</b> for RQC-128, RQC-192 and RQC-256.
 *
 *  <h3>4.3 Public key, secret key, ciphertext and shared secret</h3>
 *
 *  The public key, secret key and ciphertext are respectively composed of (<b>h</b>, <b>s</b>), (<b>x</b>, <b>y</b>) and (<b>u</b>, <b>v</b>, <b>d</b>).
 *  The shared secret is the output of the hash of <b>m</b>, <b>u</b> and <b>v</b> using SHA512.
 *  In order to shorten the keys, the public key is stored as (<b>seed1</b>, <b>s</b>) and the secret key is stored as (<b>seed2</b>).
 *  To this end, the seed expander provided by the NIST was used along with 40 bytes long seeds. 
 *
 */
