Giter Site home page Giter Site logo

packlattice's Introduction

Compress-Lattice-Crypto

This program is a proof-of-concept implementation of key, signature, and ciphertext size reductino for lattice-based cryptography, written in SageMath 9.0.

Load the code

load('LatticeCompression.py')

Parameter Settings, public key

Kyber512

q = 3329
n = 256
k = 2

Falcon-512, public key

q = 12289
n = 512
k = 1

CRYSTALS-Dilithium NIST security level 1, (part of) signature

q = 2^17 + 90
n = 256
k = 3

Generate a sample key

A random element in R_q^k is generated.

t = get_key(n, k, q)
print_key(t, n, k, q)

Compress key

num = compress_key(t, n, k, q)

Decompress key

decomp = decompress_key(num, n, k, q)

Test the compression/decompression

compare_keys(t, decomp, n, k,q)

packlattice's People

Contributors

yongwoo-lee-ccl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.