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

Use big-endian in all of the nameaccumulator spec. #76

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

matheus23
Copy link
Member

This is to avoid errors in implementation.
Some of the reasoning copied from this comment: #66 (comment)

  • Having both big & little endianess in the same protocol sucks. rs-wnfs had the endianess of some things wrong now for a while without me noticing. That's bad.
  • Most protocols that deal with RSA are big-endian. And because e.g. we're importing RSA moduli from the outside sometimes, we should also be big-endian. More concretely: I don't want an implementation to import a WebCrypto-generated RSA modulus (which is big-endian) and rs-wnfs interpreting that as little-endian and suddenly it's not a safe RSA modulus at all!
  • The performance difference between little & big endianess was in fact so minuscule, I didn't notice I used the wrong endianess for a while.

@matheus23 matheus23 self-assigned this Dec 6, 2023
@cla-bot cla-bot bot added the cla-signed label Dec 6, 2023
@matheus23 matheus23 merged commit 5229f36 into main Apr 11, 2024
2 checks passed
@matheus23 matheus23 deleted the matheus23/nameaccumulator-endianess branch April 11, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant