p256: implement AffinePoint::identity() and ::is_identity()#167
Conversation
836c2c8 to
7155812
Compare
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 60.35% 60.71% +0.35%
==========================================
Files 25 25
Lines 3572 3597 +25
==========================================
+ Hits 2156 2184 +28
+ Misses 1416 1413 -3
Continue to review full report at Codecov.
|
This is a corresponding change ala #165, but for the `p256` crate.
7155812 to
e56ab3b
Compare
|
No strong opinions, but from a mathematical point of view, an "affine point" is one in the affine plane (i.e., not the point at infinity). So then what one might want is a kind of |
|
@nickray I agree, but unfortunately there is not such a thing as a |
|
Right, I made that up (as I was thinking of just an enum at first, and then saw your careful use of constant-time operations). You could get by with a |
|
That’s how things previously worked prior to this PR. The goal of this PR though is to support an infallible bidirectional conversion between It also makes |
|
I'm just saying this AffinePoint is a misnomer (and there is no such bijection); but it's fine -- one just has to mentally substitute either AffinePointOrInfinity or ProjectivePointWithNormalizedCoordinates or some such thing wherever it says AffinePoint :) |
|
Yeah. I tried introducing a I think unless you're dealing explicitly with scalars which by definition must be non-zero (e.g. using |
This is a corresponding change ala #165, but for the
p256crate.