xlab-si / emmy

Library for zero-knowledge proof based applications (like anonymous credentials)
Apache License 2.0
233 stars 54 forks source link

Retire groups package #97

Closed mancabizjak closed 6 years ago

mancabizjak commented 6 years ago

This is the first in the series of PRs aimed at reorganizing emmy library to achieve a more idiomatic structure. The goal is to have a simler API, so that the library will be easier to understand, maintain, and use.

The general idea is to get rid of multiple layers of nested packages, and organize code such that functionality that belongs together is defined in the same package (where it makes sense). Although it logically makes sense to group in a single package, for instance, all groups / all dlog proofs / all schemes / specific primitives, this is not the most appropriate. Such an organization creates countless inter-package dependencies and demands a more verbose (Java-like) API (for instance, why keep groups.SchnorrGroup, when we can have schnorr.Group instead?).

This PR retires the groups package, and puts some existing functionality in newly introduced packages. Not only group definitions, but some other related functionality was put into these new packages. The most notable changes are: