fentec-project / gofe

Functional encryption library in Go
Apache License 2.0
166 stars 51 forks source link

Public key quadratic scheme #33

Closed tilenmarc closed 4 years ago

tilenmarc commented 4 years ago

This PR implements a FE public key quadratic scheme for multivariate polynomials. The scheme allows to encrypt vectors x and y using a public key and to derive a FE key corresponding to a matrix F so that using the FE key one can decrypt the value x^TFy without revealing x or y.

Additionally, a partially function hiding inner product FE scheme (partFHIPE) is implemented on which the quadratic scheme is based. partFHIPE is a public key FE scheme that allows to encrypt vectors and produce FE keys to be able to decrypt only the inner product of the encryption and chosen vector without revealing the encrypted or FE key vector. Public key encryption allows to encrypt only vectors from a chosen subspace. This way a functional encryption key does not reveal its corresponding inner product vector.

tilenmarc commented 4 years ago

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


Complexity increasing per file
==============================
- quadratic/quad.go  13
- innerprod/fullysec/part_fh_ipe.go  8
- innerprod/fullysec/part_fh_ipe_test.go  15
- quadratic/quad_test.go  10

Clones added
============
- data/matrix_test.go  2
- data/matrix.go  2
- innerprod/fullysec/part_fh_ipe.go  2
- data/vector.go  2

See the complete overview on Codacy