This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
ITEM 2 - Implement all of FieldElement
and Scalar
operations for non-reference values
#47
Labels
Comments
CPerezz
added a commit
that referenced
this issue
Jul 5, 2019
The implementation intends to make the point implementations easier, avoiding the &(&(&())) problem. Traits implemented: - Add - Sub - Mul - Neg This closes #47 on the field part.
CPerezz
added a commit
that referenced
this issue
Jul 5, 2019
The implementation intends to make the point implementations easier, avoiding the &(&(&())) problem mentioned on #47.
CPerezz
added a commit
that referenced
this issue
Jul 5, 2019
The implementation intends to make the point implementations easier, avoiding the &(&(&())) problem mentioned on #47 .
CPerezz
added a commit
that referenced
this issue
Jul 5, 2019
Following the guidelines specified on #47 , negate trait is implemented for Scalar and a reference of it. Performs the negation operation over the modular field formed by the prime of the sub-group.
CPerezz
added a commit
that referenced
this issue
Jul 5, 2019
Square performs the operation `a^2` for whatever element of the field generated by the prime of the sub-group. NOTE: Here we don't implement it fo `Scalar` also (as said in #47) because it only has one operator, se we are not winning anything.
With the last commit, this issue can be closed, now we should refactor the Point operations to enable an easy to read version of them. |
CPerezz
added a commit
that referenced
this issue
Jul 6, 2019
Following guidelines of #47 we've implemented addition for reference, and non-reference ProjectivePoints.
CPerezz
added a commit
that referenced
this issue
Jul 6, 2019
Note that the sub implementation is just the addition but negating the second point. The trait has been implemented following #47 suggestions.
CPerezz
added a commit
that referenced
this issue
Jul 7, 2019
This follows #47 guidelines. Performs the op: `x / y (mod l)`. Since on modular fields we don't divide, the equivanelnt op is: `x * (y^-1 (mod l))`, which is equivalent to the naive division but for Finite Fields.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This issue lives under the item: https://gitlab.dusk.network/dusk-org/tech/issues/2
Some implementations have the issue called
Eye of Sauron
by Dalek guys team on it's Curve25519 RustConf talk, which consists of something that looks like:As can be seen, it turns out much more complex and uncomfortable to write these kinds of operatios.
This problem comes from the implementation of the
Add
and other Traits, which are always implemented for&'a TRAIT
. So in order to avoid this, we should implement all of theFieldElement
,Scalar
,EdwardsPoint
andProjectivePoint
for non-reference items.The text was updated successfully, but these errors were encountered: