# Quantum-Proof Security with pyoqs_sdk in Python
[](https://pypi.org/project/pyoqs-sdk/)
[](https://github.com/sagarbhure/pyoqs_sdk/releases/tag/v2.0)    
pyoqs_sdk PyPi : https://pypi.org/project/pyoqs-sdk/
The Open Quantum Safe (OQS) project has the goal of developing and prototyping quantum-resistant cryptography. liboqs is an open source C library for quantum-resistant cryptographic algorithms. See more about liboqs at https://github.com/open-quantum-safe/liboqs/, including a list of supported algorithms.
pyoqs_sdk is an open-source Python 3 library that wraps the liboqs C library. It offers a unified API for post-quantum key encapsulation and digital signature schemes, as well as a collection of open-source implementations of post-quantum cryptography algorithms.
The OQS project also includes prototype integrations into various application-level protocols to test the effectiveness of quantum-resistant cryptography. For more information, visit https://openquantumsafe.org/ ## Pre-requisite Python 3.x pyoqs_sdk depends on the liboqs C library; liboqs must first be compiled as a Linux/macOS/Windows library. ## Contents
This Project contains following Contents
pyoqs_sdk/pyoqs_sdk.py: a Python 3 module wrapper for the liboqs C library.
pyoqs_sdk/rand.py: a Python 3 module supporting RNGs from <oqs/rand.h>
test: unit test to be added
## Installation
This project is on [PyPI](https://pypi.org/project/pyoqs-sdk/) and can be installed with
` pip install pyoqs_sdk `
First, you must build liboqs according to the liboqs building instructions with shared library support enabled (add -DBUILD_SHARED_LIBS=ON to the cmake command), followed (optionally) by a sudo ninja install to ensure that the shared library is visible system-wide (by default it installs under /usr/local/include and /usr/local/lib on Linux/macOS).
On Linux/macOS you may need to set the LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS) environment variable to point to the path to liboqs’ library directory, e.g. ` export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib `
Alternatively, you can install it from this repository directly:
` git clone https://github.com/sagarbhure/pyoqs_sdk cd pyoqs_sdk python3 setup.py install `
## Running Tests [In-progress]
To run the unit tests without a test runner: ` python3 tests/test_kem.py python3 tests/test_sig.py `
## Usage
The pyoqs_sdk library offers two main classes, KeyEncapsulation and Signature, for implementing post-quantum key encapsulation and signature mechanisms. To use these classes, you must instantiate them with a string that identifies one of the mechanisms supported by liboqs.
You can use the get_enabled_KEM_mechanisms() and get_enabled_sig_mechanisms() functions to enumerate the available options. The examples in the examples/ directory show how to use the library’s API. Additionally, the library supports alternative RNGs through the randombytes[] functions. ## Authors
[@sagarbhure](https://www.github.com/sagarbhure)
Metadata
Release files for pyoqs-sdk 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyoqs_sdk-1.0-py3-none-any.whl | Python 3 | none | any | Details for pyoqs_sdk-1.0-py3-none-any.whl |
Release files / pyoqs_sdk-1.0-py3-none-any.whl
| Download URL | pyoqs_sdk-1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28659bb00be87bb0c9011dc03048faf9e1dda2ee715bd468f0b7a815334ebbd0
|
|
BLAKE2b-256 checksum How to use checksums |
81ffbb20e0b1125611ad4bcfa2a7451f280f1460424397aec88cfc6da7315981
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for pyoqs-sdk 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.