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

k256: implement AffinePoint::identity() and ::is_identity() #165

Merged
merged 1 commit into from
Sep 5, 2020

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Sep 4, 2020

Adds a Choice field to AffinePoint which encodes whether the point represents the point at infinity.

Inspired by the method used in the bls12_381 crate:

https://github.com/zkcrypto/bls12_381/blob/0d2c06dd/src/g1.rs#L25-L29

@tarcieri tarcieri requested review from fjarri, tuxxy and str4d September 4, 2020 22:25
@tarcieri tarcieri marked this pull request as draft September 4, 2020 22:25
@tarcieri tarcieri force-pushed the k256/affine-identity branch 3 times, most recently from 19fd272 to 8f1c5c7 Compare September 5, 2020 00:32
@tarcieri tarcieri changed the title [WIP] k256: implement AffinePoint::identity() and ::is_identity() k256: implement AffinePoint::identity() and ::is_identity() Sep 5, 2020
@tarcieri tarcieri marked this pull request as ready for review September 5, 2020 00:32
@RustCrypto RustCrypto deleted a comment from codecov-commenter Sep 5, 2020
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2020

Codecov Report

Merging #165 into master will increase coverage by 0.21%.
The diff coverage is 85.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
+ Coverage   60.14%   60.35%   +0.21%     
==========================================
  Files          25       25              
  Lines        3555     3572      +17     
==========================================
+ Hits         2138     2156      +18     
+ Misses       1417     1416       -1     
Impacted Files Coverage Δ
k256/src/ecdsa/verify.rs 51.42% <ø> (+1.42%) ⬆️
k256/src/ecdsa/recoverable.rs 65.75% <50.00%> (-0.47%) ⬇️
k256/src/arithmetic/affine.rs 87.65% <82.35%> (+4.32%) ⬆️
k256/src/arithmetic/projective.rs 85.51% <92.85%> (-0.21%) ⬇️
k256/src/ecdsa/sign.rs 29.82% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e30f84e...1131ff8. Read the comment docs.

Adds a `Choice` field to `AffinePoint` which encodes whether the point
represents the point at infinity.

Inspired by the method used in the `bls12_381` crate:

https://github.com/zkcrypto/bls12_381/blob/0d2c06dd/src/g1.rs#L25-L29
@tarcieri tarcieri force-pushed the k256/affine-identity branch from 8f1c5c7 to 1131ff8 Compare September 5, 2020 00:36
@tarcieri tarcieri merged commit 2377afa into master Sep 5, 2020
@tarcieri tarcieri deleted the k256/affine-identity branch September 5, 2020 00:38
tarcieri added a commit that referenced this pull request Sep 5, 2020
This is a corresponding change ala #165, but for the `p256` crate.
tarcieri added a commit that referenced this pull request Sep 5, 2020
This is a corresponding change ala #165, but for the `p256` crate.
tarcieri added a commit that referenced this pull request Sep 5, 2020
This is a corresponding change ala #165, but for the `p256` crate.
tarcieri added a commit that referenced this pull request Sep 5, 2020
This is a corresponding change ala #165, but for the `p256` crate.
@tarcieri tarcieri mentioned this pull request Sep 17, 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

Successfully merging this pull request may close these issues.

2 participants