Inspiration

The project was inspired by the growing need for secure encryption techniques, especially with the looming threat of quantum computers breaking traditional encryption methods. Lattice-based encryption, specifically Learning With Errors (LWE), offers quantum-resilient security, making it a fascinating and cutting-edge area to explore. I wanted to create an algorithm that effectively demonstrates how this encryption works in practice.

What it does

Lattice Cypher encrypts and decrypts messages using lattice-based cryptography, particularly the LWE problem. It converts a string message into its ASCII values, encrypts them using a public key, and then decrypts the encrypted message using a secret key. The encryption adds Gaussian noise to secure the data, ensuring it remains safe against attacks.

How we built it

I built the project using Python and the SciPy library for statistical functions like generating Gaussian noise. The main steps included:

  1. Key Generation: Creating a secret key and a public key matrix.
  2. Encryption: Encoding each character into its ASCII value, then using the public key and random binary vectors to encrypt the values.
  3. Decryption: Reversing the process using the secret key to retrieve the original ASCII values and convert them back into characters.

Challenges we ran into

The biggest challenge was ensuring the encrypted message could be successfully decrypted back to its original form without any data loss. Managing the Gaussian noise and ensuring that results stayed within the valid ASCII range was tricky. There were also challenges around efficiently handling the large lattice dimensions and ensuring the encryption remained robust yet functional for typical string messages.

Accomplishments that we're proud of

I am proud to have successfully implemented a working lattice-based encryption and decryption system, especially one based on LWE, which is known for its complexity. The project showcases how lattice-based encryption can be applied to real-world problems, and it provides a strong foundation for further cryptographic exploration.

What we learned

Through this project, I have deepened my understanding of lattice-based cryptography, particularly the mathematical principles behind LWE. I also learned how to implement these principles in Python and optimize the encryption and decryption process. Additionally, I have gained insight into the potential and challenges of quantum-resistant encryption methods.

What's next for Lattice Cypher

Moving forward, I'd like to:

  • Explore optimizing the code for larger datasets and more complex encryption needs.
  • Integrate a user interface to make the encryption and decryption process more accessible.
  • Investigate other lattice-based cryptographic algorithms and their applications.
  • Further explore post-quantum cryptography and its implications for future security.

Built With

Share this project:

Updates