[Mono-list] Crypto Unit tests on linux

Sebastien Pouliot Sebastien Pouliot <spouliot@videotron.ca>
Wed, 16 Oct 2002 18:13:59 -0400


Thanks for the log file Nick!

The problem seems to come from all classes using RNGCryptoServiceProvider.
The first logs show that the test couldn't read from (or read enough) random
data from /dev/random.

> ...............
> ** (NUnitConsole_mono.exe:1759): WARNING **: Entropy error! Length !=
> bytes read
> E...........

Further down we see a System.NotImplementedException coming from unmanaged
code. AFAIK this exception can only be thrown from the rand.c file in mono
runtime.

>
TestFIPS140(MonoTests.System.Security.Cryptography.RandomNumberGeneratorTest
): The requested feature is not yet
implemented(System.NotImplementedException)
> in (unmanaged) 06
> System.Security.Cryptography.RNGCryptoServiceProvider:GetBytes (byte[])
> in <0x00004> 06
> System.Security.Cryptography.RNGCryptoServiceProvider:GetBytes (byte[])
> in <0x000b6> 00
>
MonoTests.System.Security.Cryptography.RandomNumberGeneratorTest:TestFIPS140
()
> in <0x00042> 04
>
MonoTests.System.Security.Cryptography.RandomNumberGeneratorTest:TestFIPS140
(object,intptr,intptr)
> in (unmanaged) 06 System.Reflection.MonoMethod:InternalInvoke
> (object,object[])
> in <0x00004> 06 System.Reflection.MonoMethod:InternalInvoke
> (object,object[])
> in <0x0009e> 00 System.Reflection.MonoMethod:Invoke
>
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],Sys
tem.Globalization.CultureInfo)

I don't know much about the internal of /dev/random so I'm not sure if this
is a configuration issue, affecting only your system, or something that's
affecting everyone.

Can anyone confirm is the tests pass or failed on their (non-Windows) OS ?

I've also c.c. Mark Crichton who's the author of both the
RNGCryptoServiceProvider.cs and rand.c files. Maybe he can help us determine
what's wrong about the test.

Thanks again for the log.

Sebastien Pouliot
Security Architect, Motus Technologies, http://www.motus.com/
work: spouliot@motus.com
home: spouliot@videotron.ca