Briefly: You need to provide a console app solution that converts a C++ function to a C# function. It will returns true (for pass) or false (for fail) if you don’t pass “truly” random numbers to it it.
Detais: In our project we need to use a random number generator that’s “cryptographically secure”. There’s many classes ( RNGCryptoServiceProvider is an example ) and libraries in C# that do it, so that part is easy. But we also need to make sure that it passes 4 of the 15 tests by NIST ( https://csrc.nist.gov/Projects/Random-Bit-Generation/Documentation-and-Software ). These tests are only provided in C++ in the document so we need to create them in C# to prove that it works. Here’s the 4 tests functions you would have to create:
1. The Frequency (Monobit) Test,
2. Frequency Test within a Block,
3. Runs Test
4. The Overlapping Template Matching Test.
3 out of 4 are provided by Microsoft here (https://docs.microsoft.com/en-us/archive/msdn-magazine/2013/government-special-issue/test-run-implementing-the-national-institute-of-standards-and-technology-tests-of-randomness-using-csharp) but since the post is from 2013, you need to make sure those tests haven’t passed.
Other: I wasn’t able to find a C# wrapper to the current NIST tests, but if there is one you can use, then just use that and provide the solution to me.
You can see the 4 C++ files corresponding to the tests in this folder:
Copyright © 2021 | Truelancer.com