fentec-project / gofe

Functional encryption library in Go
Apache License 2.0
170 stars 52 forks source link

Constant time Gaussian sampler #31

Closed tilenmarc closed 4 years ago

tilenmarc commented 4 years ago

This PR implements a discrete Gaussian sampler based on paper FACCT: FAst, Compact, and Constant-Time Discrete Gaussian Sampler over Integers (link. The Gaussian sampler is similar as already implemented, but in addition consists of two parts whose performance is constant-time, meaning that the result is independent of the time needed to calculate it. Note that this does not make the implementation fully constant-time, since it still uses big.Int struct. Nevertheless, this PR makes a step towards it. There is no known attack on cryptography written in Go based on timing big.Int operations.

tilenmarc commented 4 years ago

Codacy Here is an overview of what got changed by this pull request:


Complexity decreasing per file
==============================
+ innerprod/fullysec/lwe.go  -1

See the complete overview on Codacy