All Projects → mariiatuzovska → frodo

mariiatuzovska / frodo

Licence: other
practical quantum-secure key encapsulation from generic lattices

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to frodo

kyber
No description or website provided.
Stars: ✭ 170 (+900%)
Mutual labels:  post-quantum-cryptography, key-exchange-algorithms, lattice-based-crypto, module-lattices
dilithium
No description or website provided.
Stars: ✭ 166 (+876.47%)
Mutual labels:  post-quantum-cryptography, lattice-based-crypto, module-lattices
lwe-frodo
Post-quantum key exchange from the learning with errors problem — from the paper "Frodo: Take off the ring! Practical, Quantum-Secure Key Exchange from LWE", published in ACM CCS 2016, https://eprint.iacr.org/2016/659
Stars: ✭ 36 (+111.76%)
Mutual labels:  post-quantum-cryptography, key-exchange-algorithms, learning-with-errors
prune-horst
Signature scheme submitted to NIST's Post-Quantum Cryptography Project
Stars: ✭ 23 (+35.29%)
Mutual labels:  quantum, post-quantum-cryptography
gravity-sphincs
Signature scheme submitted to NIST's Post-Quantum Cryptography Project
Stars: ✭ 67 (+294.12%)
Mutual labels:  quantum, post-quantum-cryptography
Q.js
Quantum computing in your browser.
Stars: ✭ 158 (+829.41%)
Mutual labels:  matrix, quantum
Syphon
⚗️ a privacy centric matrix client
Stars: ✭ 245 (+1341.18%)
Mutual labels:  matrix
kmstool
Tool for using AWS Kms data keys to encrypt and decrypt large files.
Stars: ✭ 33 (+94.12%)
Mutual labels:  decryption
Nio
💬 Nio is an upcoming matrix client for iOS.
Stars: ✭ 235 (+1282.35%)
Mutual labels:  matrix
Maubot
A plugin-based Matrix bot system.
Stars: ✭ 226 (+1229.41%)
Mutual labels:  matrix
strong-cryptor
Strong encryption and decryption node js
Stars: ✭ 18 (+5.88%)
Mutual labels:  decryption
elm-3d-camera
Camera type for doing 3D rendering in Elm
Stars: ✭ 12 (-29.41%)
Mutual labels:  matrix
PyGLM
Fast OpenGL Mathematics (GLM) for Python
Stars: ✭ 167 (+882.35%)
Mutual labels:  matrix
Pygraphblas
GraphBLAS for Python
Stars: ✭ 252 (+1382.35%)
Mutual labels:  matrix
Shafa-CD
File Compressor written in C using both Shannon Fano and RLE algorithms
Stars: ✭ 24 (+41.18%)
Mutual labels:  matrix
Blasjs
Pure Javascript manually written 👌 implementation of BLAS, Many numerical software applications use BLAS computations, including Armadillo, LAPACK, LINPACK, GNU Octave, Mathematica, MATLAB, NumPy, R, and Julia.
Stars: ✭ 241 (+1317.65%)
Mutual labels:  matrix
interview-cookbook
A playground for learning DataStructures, Algorithms, and Object-Oriented Concepts.
Stars: ✭ 25 (+47.06%)
Mutual labels:  matrix
Tmatrix
Terminal based replica of the digital rain from The Matrix.
Stars: ✭ 227 (+1235.29%)
Mutual labels:  matrix
python
A Python 3 asyncio Matrix framework.
Stars: ✭ 115 (+576.47%)
Mutual labels:  matrix
matrix-synapse-rest-password-provider
Password Provider for Synapse fetching data from a REST endpoint
Stars: ✭ 35 (+105.88%)
Mutual labels:  matrix

Frodo

Practical quantum-secure key encapsulation from generic lattices library.

Abstract. The FrodoKEM schemes are designed to be conservative yet practical post-quantum constructions whose security derives from cautious parameterizations of the well-studied learning with errors problem, which in turn has close connections to conjectured-hard problems on generic, “algebraically unstructured” lattices.

https://frodokem.org/

Progress

  • Selected parameter sets;

  • Success encode & decode matrices in Zq;

  • Success pack & unpack matrices;

  • Sampling from the error distribution;

  • Pseudorandom matrix generation using SHAKE128, SHAKE256;

  • IND-CPA-secure public-key encryption (PKE) scheme (encryption/decryption, key generation);

  • IND-CCA-secure key encapsulation mechanism (KEM);

  • Written tests.

Math & Implementations

The FrodoPKE scheme from this submission is an instantiation and implementation of the Lindner scheme with some modifications, such as the pseudorandom generation of the public matrix A from a small seed, more balanced key and ciphertext sizes, and new LWE parameters [FKEM]. The security of every public-key cryptosystem depends on the presumed intractability of one or more computational problems. In lattice-based cryptography, the (plain) LWE problem relates to solving a "noisy" linear system modulo a known integer; it can also be interpreted as the problem of decoding a random "unstructured" lattice from a certain class.

Vectors and matrices over the ring. The ring of integers Z for a positive integer q, the quotient ring of integers modulo q is denoted by Zq = Z/qZ.

Realisation of matrices over the ring. Matrix A (m*n) contains unsigned 16-bit numbers in ring of integers modulo q.

Realisation of bit-strings. Bit string s with length len defined like []byte slice with length (len / 8) in little-endian order.

Learning With Errors. The security of PKE and KEM relies on the hardness of the Learning With Errors (LWE) problem. Input instances are chosen at random from a prescribed probability distribution. Some parameterizations of LWE admit (quantum or classical) reductions from worst-case lattice problems. That is, any algorithm that solves n-dimensional LWE (with some non-negligible advantage) can be converted with some polynomial overhead into a (quantum) algorithm that solves certain short-vector problems on any n-dimensional lattice (with high probability). Therefore, if the latter problems have some (quantumly) hard instances, then random instances of LWE are also hard [FKEM].

LWE distribution. Let n,q be positive integers, and let X be a distribution over Z. For an s in (Zq)^n, the LWE distribution A(s,x) is the distribution over (Zq)^n * Zq obtained by choosing a in (Zq)^n uniformly at random and an integer error e in Z from X, and outputting the pair <a, <a, s> + e (mod q)> in (Zq)^n * Zq.

Pseudorandom matrix generation. As NIST currently does not standardize such a primitive, so I choose proposals in [FKEM] to use SHAKE128 & SHAKE256.

List of implementations/packages

👉 FrodoKEM specification papers;

👉 Matrix encoding of bit strings (decoding) frodo;

👉 Deterministic random bit generation & pseudorandom matrix generation using SHAKE128 frodo;

👉 SHAKE128 golang.org/x/crypto/sha3;

👉 Selected parameter sets frodo;

👉 Sampling from the error distribution frodo;

👉 IND-CPA-secure public-key encryption scheme pke;

👉 IND-CCA-secure key encapsulation mechanism kem;

👉 Testing PKE & KEM, unit tests test;

Advantages & Disadvantages of my implementation

😻 Pretty native Golang: using best practices of language;

😴 slower than portable C;

👾 written tests.

Inspiration

💥 microsoft git

💥 microsoft research

How to run

  1. install GO if you need and initialise GOPATH

  2. open terminal and go to your GOPATH folder

            $ cd ~/go/src
  1. get this project and golang.org/x/crypto library
            $ go get "github.com/mariiatuzovska/frodo"
            $ go get "golang.org/x/crypto"
  1. run test
	    $ go test 'github.com/mariiatuzovska/frodo'
  1. if test ok, use anywhere 😈

Example

Encryption & Decryption

    package main

    import (
        "fmt"
        
        "github.com/mariiatuzovska/frodo"
    )

    func main() {

        frodo := frodo.Frodo976()
        pk, sk := frodo.KeyGen()

        m := []byte("This is my pure frodo976")
        
	ct := frodo.Enc(m, pk)
	pt := frodo.Dec(ct, sk)

	fmt.Println(string(pt))
        
    } 

Encaps & Decaps

    package main

    import (
        "fmt"
        
        "github.com/mariiatuzovska/frodo"
    )

    func main() {

        frodo := frodo.Frodo1344()

	pk, sk := frodo.EncapsKeyGen()
	ct, ss := frodo.Encaps(pk)
	s2 := frodo.Decaps(ct, sk)

	fmt.Printf("%x\n", ss)
        fmt.Printf("%x\n", s2)
    } 

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].