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

Pointy Castle tests broken in Dart 2.0 - does bignum work? #46

Open
stevenroose opened this issue Apr 6, 2018 · 3 comments
Open

Pointy Castle tests broken in Dart 2.0 - does bignum work? #46

stevenroose opened this issue Apr 6, 2018 · 3 comments

Comments

@stevenroose
Copy link
Contributor

Pointy Castle relies on BigInteger everywhere. However, while starting to port it to Dart 2.0, a lot of the unit tests are broken. I'm having trouble figuring out what is the root cause, but it seems like bignum could be the cause.

F.e. BigIntegers instantiated using new BigInteger("<hex>", 16) print as 0 and comparisons fails. (Not sure if the actual value is 0 (constructor fails) or if the print function fails.)

@azenla
Copy link

azenla commented Apr 6, 2018

Note, Dart has switched to int64 in 2.0

https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md

The BigInt class is now available in 2.0, however there are some bugs that must be worked around:
dart-lang/sdk#32626

@stevenroose
Copy link
Contributor Author

I saw that. And yes, working on it :)

@stevenroose
Copy link
Contributor Author

Damn. I should read this more carefully! I've been trying to debug that code for PointyCastle for over a week and I couldn't get my head around it. It's a blessing someone found that bug in modPow. Still not sure though if it's actually that!

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

No branches or pull requests

2 participants