This repository demonstrates the integration of the SPHINCS+ post-quantum digital signature algorithm with quantum circuit simulations using Qiskit
The project includes:
- Quantum circuit simulations using GHZ states, Grover’s algorithm, and entanglement.
- Seamless integration between native C execution and Python scripting.
- Evaluation of signature integrity in quantum simulation contexts.
- A ready-to-use REST API for automation in local or cloud environments.
quantum_sphincs_api_demo/
├── external/ # SPHINCS+ Submodule (https://github.com/sphincs/sphincsplus.git)
├── src/
│ ├── c_tests/ # C tests with CMocka
│ └── quantum_attacks/ # Python scripts with Qiskit
├── LICENSE
├── .gitignore
└── README.md
git clone --recurse-submodules https://github.com/brunoleomenezes/quantum_sphincs_api_demo.git
cd quantum_sphincs_api_demo- GCC
- Python 3.12
- Qiskit
- CMocka
- OpenSSL
For Fedora-based systems (as used in the study):
sudo dnf install gcc python3 python3-devel cmocka-devel openssl-devel
pip install qiskitcd external/sphincsplus/ref
makecd src/c_tests
make
./testscd src/quantum_codes
python quantum_simulation_ghz.py
python quantum_simulation_4_qubits.py
python quantum_simulation_grover.pyThis project provides a complete REST API.
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Checks if the API is online |
| GET | /run_c_tests |
Runs SPHINCS+ C tests locally |
| GET | /run_codes/ghz |
Runs GHZ |
| GET | /run_codes/4qubits |
Runs 4-qubit |
| GET | /run_codes/grover |
Runs Grover's |
| GET | /run_codes/all |
Runs all |
curl https://your-domain-or-railway.app/run/ghzgit submodule update --remote --merge
git add .gitmodules external/sphincsplus
git commit -m "Update SPHINCS+ submodule"
git push origin mainThis project is licensed under the Academic Non-Commercial License v1.0. See the LICENSE file for details.
- Bruno Leonardo Santos Menezes
- Franklin de Lima Marquezino
- Claudio Miceli de Farias
This project is part of a scientific study focused on the evaluation of post-quantum algorithms and is under continuous development.