You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2006/07/02 22:31:25 UTC
svn commit: r418646 -
/jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Author: psteitz
Date: Sun Jul 2 13:31:25 2006
New Revision: 418646
URL: http://svn.apache.org/viewvc?rev=418646&view=rev
Log:
Suspended setSecureAlgorithm test, since it takes several minutes on Ubuntu.
Modified:
jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Modified: jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java?rev=418646&r1=418645&r2=418646&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java (original)
+++ jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java Sun Jul 2 13:31:25 2006
@@ -419,7 +419,7 @@
!hex.equals(randomData.nextSecureHexString(40)));
/* remove this test back soon,
- * since it takes about 4 seconds */
+ * since it takes about 4 seconds
try {
randomData.setSecureAlgorithm("SHA1PRNG","SUN");
@@ -443,6 +443,7 @@
} catch (NoSuchProviderException ex) {
;
}
+ */
// test reseeding without first using the generators
RandomDataImpl rd = new RandomDataImpl();
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: svn commit: r418646 - /jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Posted by Martin van den Bemt <ml...@mvdb.net>.
Thanx for a more rigid explenation :)
Mvgr,
Martin
Luc Maisonobe wrote:
> Martin van den Bemt wrote :
>
>> I read somewhere that linux will speed up doing encryption when eg the
>> keyboard is used (those tokens are used in the linux SecureRandom
>> generator.
>
>
> It is true when the generator is based on bytes read from the
> /dev/random device, false when /dev/urandom device is used. The former
> can block read access when the entropy pool gathering environmental
> noise is empty. This pool is replenished when events caused by keyboard
> use, mouse motion and interrupts from disk or other devices. This is the
> price to pay for cryptographically secure randomness except if you
> motherborad has some hardware-based random generator chip supported by
> the kernel (I think there are some) ... However this is far beyond the
> scope of this list.
>
> Luc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: svn commit: r418646 - /jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Posted by Phil Steitz <ph...@gmail.com>.
On 7/3/06, Luc Maisonobe <Lu...@free.fr> wrote:
> Martin van den Bemt wrote :
>
> > I read somewhere that linux will speed up doing encryption when eg the
> > keyboard is used (those tokens are used in the linux SecureRandom
> > generator.
>
Hmm...I guess I would have to really fess up to my *real* strategy for
the nightlies to make this work (typing at the keyboard each night) -
:D
> It is true when the generator is based on bytes read from the
> /dev/random device, false when /dev/urandom device is used. The former
> can block read access when the entropy pool gathering environmental
> noise is empty. This pool is replenished when events caused by keyboard
> use, mouse motion and interrupts from disk or other devices. This is the
> price to pay for cryptographically secure randomness except if you
> motherborad has some hardware-based random generator chip supported by
> the kernel (I think there are some) ... However this is far beyond the
> scope of this list.
>
I wonder if that is what causes the big delay in
setSecureRandomAlgorithm. Sounds plausible actually, if Ubuntu is
trying to seed the secure random generator with environment noise.
Interesting. The code to set / reset is well-tested in any case and
unchanged for a long time, so I don't see it as a big loss to suspend
the test. Thanks for the info, though.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: svn commit: r418646 - /jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Posted by Luc Maisonobe <Lu...@free.fr>.
Martin van den Bemt wrote :
> I read somewhere that linux will speed up doing encryption when eg the
> keyboard is used (those tokens are used in the linux SecureRandom
> generator.
It is true when the generator is based on bytes read from the
/dev/random device, false when /dev/urandom device is used. The former
can block read access when the entropy pool gathering environmental
noise is empty. This pool is replenished when events caused by keyboard
use, mouse motion and interrupts from disk or other devices. This is the
price to pay for cryptographically secure randomness except if you
motherborad has some hardware-based random generator chip supported by
the kernel (I think there are some) ... However this is far beyond the
scope of this list.
Luc
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: svn commit: r418646 - /jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Posted by Martin van den Bemt <ml...@mvdb.net>.
Don't laugh :)
I read somewhere that linux will speed up doing encryption when eg the keyboard is used (those
tokens are used in the linux SecureRandom generator.
Disclaimer : I ain't no expert on this, just read something somewhere..
Mvgr,
Martin
psteitz@apache.org wrote:
> Author: psteitz
> Date: Sun Jul 2 13:31:25 2006
> New Revision: 418646
>
> URL: http://svn.apache.org/viewvc?rev=418646&view=rev
> Log:
> Suspended setSecureAlgorithm test, since it takes several minutes on Ubuntu.
>
> Modified:
> jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
>
> Modified: jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
> URL: http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java?rev=418646&r1=418645&r2=418646&view=diff
> ==============================================================================
> --- jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java (original)
> +++ jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java Sun Jul 2 13:31:25 2006
> @@ -419,7 +419,7 @@
> !hex.equals(randomData.nextSecureHexString(40)));
>
> /* remove this test back soon,
> - * since it takes about 4 seconds */
> + * since it takes about 4 seconds
>
> try {
> randomData.setSecureAlgorithm("SHA1PRNG","SUN");
> @@ -443,6 +443,7 @@
> } catch (NoSuchProviderException ex) {
> ;
> }
> + */
>
> // test reseeding without first using the generators
> RandomDataImpl rd = new RandomDataImpl();
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org