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 @starcoin/stc-ed25519, instead of noble-ed25519 #24

Merged
merged 4 commits into from May 30, 2021
Merged

Conversation

wk3368
Copy link
Collaborator

@wk3368 wk3368 commented May 29, 2021

@tarvos21 tarvos21 merged commit a43e26c into master May 30, 2021
@paulmillr
Copy link

Doing this will produce incorrect results for ed25519. As I have said, your bundler converts bigints to something else and then does Math.pow. Which loses precision if the number is more than 53 bits.

@wk3368
Copy link
Collaborator Author

wk3368 commented Jun 3, 2021

Doing this will produce incorrect results for ed25519. As I have said, your bundler converts bigints to something else and then does Math.pow. Which loses precision if the number is more than 53 bits.

Thanks for the warning!

so far, this change won't break any existing test cases (both in this repo and noble-ed25519). That's why we did it this way.

I will check again and prepare some test cases to cover the scenario that number is more than 53 bits and verifying it.

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.

Uncaught TypeError: Cannot convert a BigInt value to a number
3 participants