PyPolyCrypt
Abstract
PyPolyCrypt: A Python-Based Polynomial Cryptography System for Privacy-Preserving Database Operations PyPolyCrypt is a research-oriented implementation of a Somewhat Homomorphic Encryption (SHE) scheme designed to enable secure computations on encrypted database data. Built using Python and NumPy, the system leverages polynomial arithmetic inspired by Ring Learning-With-Errors (Ring-LWE) principles to support additive homomorphic operations while preserving data confidentiality. The proposed framework allows sensitive integer data to be encrypted, stored securely in a MySQL database, and processed without decryption. Practical use cases such as applying salary increments directly on encrypted values are demonstrated. Ciphertexts are serialized and compressed using zlib before being stored as BLOBs, optimizing storage overhead while maintaining security. PyPolyCrypt incorporates multiple security mechanisms, including randomized noise injection to ensure resistance against Chosen Plaintext Attacks (CPA), SHA-256 hashing for data integrity verification, and side-channel timing analysis to assess operational leakage. A comprehensive performance evaluation compares the system against industry standards such as the Advanced Encryption Standard (AES) and the TenSEAL homomorphic encryption library, highlighting the trade-offs between computational overhead, storage expansion, and privacy guarantees. This work serves as an educational and experimental platform for understanding homomorphic encryption in real-world database scenarios and lays the groundwork for future extensions toward fully homomorphic encryption, GPU acceleration, and support for real-world numeric data types. Keywords: Homomorphic Encryption, Polynomial Cryptography, Ring-LWE, Secure Databases, Privacy-Preserving Computation, Python
Fields of Study & Subjects
Cryptography and Data Security
Cloud Data Security Solutions
Cryptographic Implementations and Security
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 18 January 2026
- Language
- EN