-
Notifications
You must be signed in to change notification settings - Fork 200
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
Introduce NonIdentityPoint
#1170
Comments
Seems fine to me. Wonder if it should be |
Personally I don't have a use-case for it, but it's a great idea. Alternatively we could also do I will start on an implementation with |
So somehow I have to implement the same functions over As they don't share traits I thought I could do something like this: I could solve this issue by making a So currently I'm leaning towards just making them two separate types, as proposed above. |
It seems like quite a few of them should be able to be generic. They do share traits, namely the |
Yeah, so the problem was how to make a Alternatively I will just make |
|
This is similar to
NonZeroScalar
.I often found myself handrolling custom serde implementations to make sure that a
ProjectivePoint
is not an identity element.Additionally it could be useful to allow arithmetic that can guarantee some outputs without having to constantly check for identity elements. For example multiplying a
NonIdentityElement
with aNonZeroScalar
should yield aNonIdentityElement
without having to do any checks or returning an(Ct)Option
.Interactions with
PublicKey
could be similar to whats done betweenNonZeroScalar
andSecretKey
, enabling non-fallible conversions.Happy to make a PR of course.
The text was updated successfully, but these errors were encountered: