Compare Proposal

Nothing to compare.

C# NIST Random Number Generator and Test Suite

  • Posted at : 1 month ago
  • Post Similar Project
50

Budget
3
Proposals
104
Views
Expired
Status
Skills Required

Posted By -

SM

USA
0.0
Projects Posted : 2
Projects Paid : 0
Services Purchased : 1
Total Spent :
0
Feedbacks : 0 %

Project Details show (+) hide (-)

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:
https://github.com/saamerm/NIST-Statistical-Test-Suite-CPP-Language/tree/main/sts-2.1.2/src