Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace paired and zkcrypto with zexe as the pairing backend for the bls library #16

Closed
drskalman opened this issue Sep 29, 2020 · 2 comments
Assignees

Comments

@drskalman
Copy link
Collaborator

Following discussion with @burdges and experimenting with Zexe library it seems that adapting bls library to Zexe is an easier than to new zkcrypto even only if for a intermediary milestone. Hence this ticket tracks the transition in this library.

@drskalman
Copy link
Collaborator Author

I have added zexe_adapter.rs, to inherit, so to speak in C++ way, CurveAffine and CurveProjective from zexe's ProjectiveCurve and AffineCurve respectively to the missing pieces and properties which EngineBLS expect those curves to implement. Now I'm getting into this problem which I don't really know how to resolve:

error[E0277]: cannot multiply-assign `<Self as ProjectiveCurve>::ScalarField` to `<<Self as CurveProjective>::Affine as AffineCurve>::Projective`
   --> src/zexe_adapter.rs:38:49
    |
38  | ...: CurveAffine<Projective = Self, ScalarField = <Self as ProjectiveCurve>::ScalarField, BaseField = <Self as ProjectiveCurve>::BaseField>
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `<<Self as CurveProjective>::Affine as AffineCurve>::Projective *= <Self as ProjectiveCurve>::ScalarField`
    | 
   ::: /home/klaymen/.cargo/git/checkouts/zexe-f74c42809fa6cfe1/85cac17/algebra-core/src/curves/mod.rs:224:11
    |
224 |         + MulAssign<Self::ScalarField>; // needed due to https://github.com/rust-lang/rust/issues/69640
    |           ---------------------------- required by this bound in `AffineCurve`
    |
    = help: the trait `MulAssign<<Self as ProjectiveCurve>::ScalarField>` is not implemented for `<<Self as CurveProjective>::Affine as AffineCurve>::Projective`
help: consider further restricting the associated type
    |
36  |     + MulAssign<<Self as ProjectiveCurve>::ScalarField> where <<Self as CurveProjective>::Affine as AffineCurve>::Projective: MulAssign<<Self as ProjectiveCurve>::ScalarField>
    |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@drskalman
Copy link
Collaborator Author

This is done by 3821a36

@drskalman drskalman removed their assignment Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants