Reputation: 1
I am currently developing a simplified Python implementation of the X3DH Signal Protocol for my master's dissertation. My primary objective is to compare the performance of three versions: a classical implementation, a post-quantum secure variant using Kyber, and a lattice-based approach employing PSWOOSH.
However, I am encountering some errors with the pqcrypto library, specifically an import error for pqcrypto._kem.kyber512. Given the library's lack of updates in the past four years, I am concerned its no longer useable. I would appreciate recommendations for alternative python post-quantum cryptography libraries.
Code:
from pqcrypto.kem import kyber512
error:
"C:\Users\-----\AppData\Local\Programs\Python\Python312\Lib\site-packages\pqcrypto\kem\kyber512.py", line 1, in <module>
from .._kem.kyber512 import ffi as __ffi, lib as __lib
ModuleNotFoundError: No module named 'pqcrypto._kem.kyber512'
I tried going into the specified path where I found this:
from .._kem.kyber512 import ffi as __ffi, lib as __lib
from .common import _kem_generate_keypair_factory, _kem_encrypt_factory, _kem_decrypt_factory
PUBLIC_KEY_SIZE = __lib.CRYPTO_PUBLICKEYBYTES
SECRET_KEY_SIZE = __lib.CRYPTO_SECRETKEYBYTES
CIPHERTEXT_SIZE = __lib.CRYPTO_CIPHERTEXTBYTES
PLAINTEXT_SIZE = __lib.CRYPTO_BYTES
generate_keypair = _kem_generate_keypair_factory(__ffi, __lib)
encrypt = _kem_encrypt_factory(__ffi, __lib)
decrypt = _kem_decrypt_factory(__ffi, __lib)
However (._kem.) was fully empty
Upvotes: 0
Views: 351
Reputation: 1
I was initially planning to make a wrapper for the PQClean library. However, I discovered a pure Python implementation of Kyber which has been immensely helpful.
Upvotes: 0