Ankaj Gupta
June 04, 2025

libmceliece: Full Installation Guide

libmceliece Installation Guide

Complete guide for installing libmceliece — a high-performance C implementation of the McEliece post-quantum cryptosystem — from source globally on Linux systems.

Note: If you see warnings like this script does not know how to check instruction-set extensions without python3-capstone, install python3-capstone for accurate CPU detection.

Prerequisites

Install all necessary dependencies:

sudo apt update && sudo apt install -y autoconf build-essential clang python3 python3-pip gcc valgrind libcpucycles-dev librandombytes-dev python3-capstone wget curl make man-db

Package Categories

Category Packages
Build Tools gcc, clang, build-essential, make
Testing Tools valgrind
Crypto Dependencies libcpucycles-dev, librandombytes-dev
Python Environment python3, python3-pip, python3-capstone
Network & CLI wget, curl, man-db

Download Source

Fetch the latest libmceliece release:

# Download latest version
wget https://lib.mceliece.org/libmceliece-latest-version.txt
version=$(cat libmceliece-latest-version.txt)
wget https://lib.mceliece.org/libmceliece-$version.tar.gz
tar -xzf libmceliece-$version.tar.gz
cd libmceliece-$version

Build & Install

Configure, build and install the library:

./configure
make -j$(nproc)
sudo make install

This installs to /usr/local.

Installation Locations

  • • Headers: /usr/local/include/
  • • Libraries: /usr/local/lib/
  • • Binaries: /usr/local/bin/
  • • Man pages: /usr/local/man/

Testing & Verification

Run the test suite and configure the system:

Run Test Suite

make check

Configure Dynamic Linker

sudo ldconfig

Verify the installation:

ldconfig -p | grep mceliece
ls /usr/local/include | grep mceliece
mceliece-keygen --help

Troubleshooting

Missing Capstone Warning

Error: this script does not know how to check instruction-set extensions without python3-capstone

Fix: sudo apt install python3-capstone

Missing Libraries

Error: Missing libraries like libcpucycles or librandombytes

Fix: sudo apt install libcpucycles-dev librandombytes-dev

Package Reference

Complete package breakdown by function:

Category Packages
Build Tools gcc, clang, build-essential, make
Testing Tools valgrind
Post-quantum Dependencies libcpucycles-dev, librandombytes-dev
Python Environment python3, python3-pip, python3-capstone
Network & CLI Tools wget, curl, man-db

Optional Verification

Additional checks for complete setup:

Verify All Prerequisites

gcc --version
clang --version
python3 --version
python3 -c "import capstone; print('Capstone OK')"

If all commands print versions or success messages, your prerequisites are ready.

References

Version: Based on 2025.04.28 release.

libmceliece Python

Join the discussion

Comments

0 comments

No comments yet — be the first to share your thoughts.

Related Posts