Open aayjaychan opened 1 year ago
Thanks for the report. I am able to reproduce it in small examples like this, though our scrypt tests pass as part of a full test suite run (but test vectors fail if run in isolation). The problem persists even when the library itself is compiled for net8.0. It doesn't seem to happen with debug builds.
From a brief investigation it appears related to the intrinsics-based code in Salsa20Engine.SalsaCore (commenting that out lets everything work normally). Given all the above I would suspect some sort of bug in the runtime (probably the JIT), but I will look into it a bit further.
@peterdettman do you have any update on this? we have the same issue
We were also able the reproduce this issue and tried to solve it via an initial static call to the generator function inside a utility class. This seems to somewhat consolidate the output, although it is still inconsistent in automated test context. We are looking forward to any update regarding this issue.
Program.cs
:ScryptTest.csproj
:Expected Result (when
<TargetFramework>
isnet7.0
):Actual result (when
<TargetFramework>
isnet8.0
):The result of the first run is different every time, and the rest doesn't match the output of .NET 7.