Skip to content

brunoleomenezes/quantum_sphincs_api_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum SPHINCS+ API Demo logo

Quantum SPHINCS+ API Demo

License: Academic Non-Commercial DOI Python SPHINCS+

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.

Repository Structure

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

Cloning the Repository

git clone --recurse-submodules https://github.com/brunoleomenezes/quantum_sphincs_api_demo.git
cd quantum_sphincs_api_demo

Environment Setup

Dependencies

  • 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 qiskit

Compiling SPHINCS+

cd external/sphincsplus/ref
make

Running C Tests (Locally)

cd src/c_tests
make
./tests

Running Quantum Simulations (Locally)

cd src/quantum_codes
python quantum_simulation_ghz.py
python quantum_simulation_4_qubits.py
python quantum_simulation_grover.py

API for Integration and Automation

This 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 Example

curl https://your-domain-or-railway.app/run/ghz

Updating the SPHINCS+ Submodule

git submodule update --remote --merge
git add .gitmodules external/sphincsplus
git commit -m "Update SPHINCS+ submodule"
git push origin main

License

This project is licensed under the Academic Non-Commercial License v1.0. See the LICENSE file for details.

Credits

  • Bruno Leonardo Santos Menezes
  • Franklin de Lima Marquezino
  • Claudio Miceli de Farias

DOI: 10.5281/zenodo.15336618


This project is part of a scientific study focused on the evaluation of post-quantum algorithms and is under continuous development.

About

Demonstration of resilience in post-quantum cryptography using SPHINCS+. This project combines SPHINCS+ digital signatures with quantum circuit simulations built using Qiskit. A REST API is included to enable automated and remote execution of tests, making the framework suitable for integration.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors