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

poc/sswu_*.sage: use sgn0_be with bls12381, as specified. #211

Closed
wants to merge 1 commit into from

Conversation

dot-asm
Copy link
Contributor

@dot-asm dot-asm commented Feb 19, 2020

BLS12-381 suites are specified to use big-endian variant of sgn0, while sswu_*.sage scripts default to little-endian one in all cases. This pull request should probably be viewed rather as "here is a problem" than "this is how to fix it," as there might be better way to achieve the goal. Cheers.

@kwantam
Copy link
Collaborator

kwantam commented Feb 24, 2020

Thanks! I'll follow up asap.

@kwantam
Copy link
Collaborator

kwantam commented Feb 24, 2020

OK, looking into this more:

The suite definitions don't have any issues with this, because suites set the appropriate sgn0 variant as part of the suite definition (see h2c_suite.sage line 31).

So it looks to me like the only place that this could arguably be an issue is in the BLS12-381-isogenous curve in sswu_opt.sage. (To me, that doesn't matter much---it's a simple functionality test, not a suite definition---but I'm happy to fix it.)

I'll take care of this when editing suites for #212.

kwantam added a commit to kwantam/draft-irtf-cfrg-hash-to-curve that referenced this pull request Feb 24, 2020
kwantam added a commit to kwantam/draft-irtf-cfrg-hash-to-curve that referenced this pull request Feb 25, 2020
@dot-asm
Copy link
Contributor Author

dot-asm commented Feb 28, 2020

(To me, that doesn't matter much---it's a simple functionality test, not a suite definition---

While the test passes in so to say loopback mode, i.e. when both optimized and generic implementations use same variant of sgn0, I'd still argue that it's not insignificant difference. If an implementation fails to process test vector and you have to dig into it, rigid compliance with specification even at this level helps.

but I'm happy to fix it.)

Cool! Thanks!

@dot-asm dot-asm closed this Feb 28, 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