Closed imloama closed 5 years ago
Try upgrading to latest Flutter stable, e.g. 1.7.x. That fixed it for me.
I narrowed the issue down to the _pack25519 function after https://github.com/jspschool/tweetnacl-dart/blob/master/lib/src/tweetnacl_base.dart#L1503 Then it went Heisenbug. (After I add debugPrint()s to the rest of _pack25519 the issue stops reproducing)
I'd say this has to be a Dart bug.
It's always a good practice to run a unit test with an objective test vector before any highly sensitive cryptography (e.g. sending a cryptocurrency transaction)
Thanks @GreenAppers I test it in flutter,version 1.7.8, and it works well.
from the same seed, I got two different result in modes of debug and release
environment:
• Flutter version 1.5.4 • Framework revision b593f5167b (3 months ago), 2019-04-22 07:51:33 -0700 • Engine revision ca31a7c57b • Dart version 2.3.0 (build 2.3.0-dev.0.1 cf4444b803)