bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/23899] BouncyCastle crypto library errors


From: csm at gnu dot org
Subject: [Bug classpath/23899] BouncyCastle crypto library errors
Date: 17 Apr 2006 23:49:13 -0000


------- Comment #3 from csm at gnu dot org  2006-04-17 23:49 -------
In all the tests that fail, I see that they are using `SecureRandom'
implementations that return predefined values. E.g, in DSATest, there is this
code:

    SecureRandom    random = new SecureRandom()
    {
        boolean first = true;

        public void nextBytes(byte[] bytes)
        {
            byte[] k1 = Hex.decode("d5014e4b60ef2ba8b6211b4062ba3224e0427dd3");
            byte[] k2 =
Hex.decode("345e8d05c075c3a508df729a1685690e68fcfb8c8117847e89063bca1f85d968fd281540b6e13bd1af989a1fbf17e06462bf511f9d0b140fb48ac1b1baa5bded");

            if (first)
            {
                System.arraycopy(k1, 0, bytes, 0, k1.length);
                first = false;
            }
            else
            {
                System.arraycopy(k2, 0, bytes, 0, k2.length);
            }
        }
    };

I would guess that the way Classpath uses this SecureRandom is different than
the way Sun's VM does, possibly in the `BigInteger' constructor that generates
a random MP integer.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23899





reply via email to

[Prev in Thread] Current Thread [Next in Thread]