Open
Conversation
caa6bbd to
4688028
Compare
4688028 to
562b31a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fp2.isValidwas expecting both components to be between0andFp.ORDER * Fp.ORDER, when it should have expected them to be between0andFp.ORDERThis unifies
Fp2code withFp6andFp12.Fp2.fromBytesexpects both components to fit into separate full bytes, adjustFp2.BYTEScalculation to reflect that.noble-curves/src/abstract/tower.ts
Lines 334 to 338 in 40ef465
This also unifies
Fp2code withFp6andFp12.Fp2.ORDERis now unused, at least intower.tsThis expects
Fp.BITS,Fp.BYTES,Fp.isValidto be presentAlso, this does not fix the discrepancy between
.ORDER:Fp.ORDERisFpfield orderFp2.ORDERis{ Fp, Fp }quadratic field orderFp6.ORDERis{ Fp, Fp }quadratic field orderFp12.ORDERis{ Fp, Fp }quadratic field order2-4 are not really used and make little sense (and are likely a source of bugs), but this PR does not remove them