Skip to content

shx-lyu/lattice-codes-for-pke

Repository files navigation

Lattice Codes for Lattice-Based PKE

This repository contains MATLAB files used to demonstrate the effectiveness of lattice codes for lattice-based public key encryption (PKE), as described in the paper "Lattice Codes for Lattice-Based PKE." The provided MATLAB codes simulate the encryption and decryption processes, showcasing the benefits of using lattice codes for error correction in PKE systems.

MATLAB Files

The MATLAB files in this repository correspond to the implementation of algorithms and simulations related to the paper. The following files are included:

  1. BitDemapper.m: MATLAB function for bit demapping.
  2. BitMapper.m: MATLAB function for bit mapping.
  3. DnDecoding.m: MATLAB function for decoding algorithm of Dn Lattices.
  4. E8Decoding.m: MATLAB function for decoding algorithm of E8 Lattices.
  5. L16Decoding.m: MATLAB function for decoding algorithm of Lambda16.
  6. main_experiment_1.m: MATLAB script for simulating the experiment with Z-based encoding and decoding.
  7. main_experiment_2.m: MATLAB script for simulating the experiment with E8-based encoding and decoding.
  8. main_experiment_3.m: MATLAB script for simulating the experiment with BW16 (L16)-based encoding and decoding.
  9. CompareDFR_Z_E8_L16.m: MATLAB script for comparing the decryption failure rate (DFR) of Z, E8 and BW16 based encoding and decoding.

Python Files

The Python files in this repository correspond to the Python implementation of algorithms and simulations related to the paper. The following files are included:

  1. BitDemapper.py: Python function for bit demapping.
  2. BitMapper.py: Python function for bit mapping.
  3. DnDecoding.py: Python function for decoding algorithm of Dn Lattices.
  4. E8Decoding.py: Python function for decoding algorithm of E8 Lattices.
  5. L16Decoding.py: Python function for decoding algorithm of Lambda16.
  6. main_experiment_1.py: Python script for simulating the experiment with Z-based encoding and decoding.
  7. main_experiment_2.py: Python script for simulating the experiment with E8-based encoding and decoding.
  8. main_experiment_3.py: Python script for simulating the experiment with BW16 (L16)-based encoding and decoding.
  9. CompareDFR_Z_E8_L16.py: Python script for comparing the decryption failure rate (DFR) of Z, E8, and BW16 based encoding and decoding.

Note:

In the simulation, the discrete Gaussian samples are generated by rounding continuous Gaussian distributions. It is important to mention that researchers and practitioners can replace this step with alternative methods for generating discrete Gaussian samples, depending on their specific requirements and preferences.

Paper Information

  • Title: Lattice Codes for Lattice-Based PKE
  • Authors:
  • Affiliations:
    • College of Cyber Security, Jinan University, Guangzhou, China
    • State Key Laboratory of Cryptology, P. O. Box 5159, Beijing, China
    • College of Computer Science and Software Engineering, Shenzhen University, Shenzhen, China
    • Department of Electrical and Electronic Engineering, Imperial College London, London, United Kingdom

Abstract

Existing error correction mechanisms in lattice-based public key encryption (PKE) rely on either trivial modulation or its concatenation with error correction codes (ECC). This paper demonstrates that lattice coding, as a combined ECC and modulation technique, can replace trivial modulation in current lattice-based PKEs, resulting in improved error correction performance. We model the FrodoPKE protocol as a noisy point-to-point communication system, where the communication channel resembles an additive white Gaussian noise (AWGN) channel. To utilize lattice codes for this specific channel with hypercube shaping, we propose an efficient labeling function that converts binary information bits to lattice codewords and vice versa. The parameter sets of FrodoPKE are enhanced to achieve higher security levels or smaller ciphertext sizes. For instance, the proposed Frodo-1344-E8 offers a 10-bit classical security improvement over Frodo-1344.

For more details, please refer to the paper at the following URL: Paper URL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published