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:
New packages ec, zn, schnorr, ecschnorr, qr, and qnr.
The groups are now zn.Group, zn.GroupZp, ec.Group, qr.RSA and qr.RSASpecial.
Group descriptions in README were updated to reflect these changes.
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 haveschnorr.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:ec
,zn
,schnorr
,ecschnorr
,qr
, andqnr
.zn.Group
,zn.GroupZp
,ec.Group
,qr.RSA
andqr.RSASpecial
.