Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4210047

SecureRandom Initialization VERY slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: security-libs
    • Labels:

      Description



      Name: jn10789 Date: 02/09/99


      SecureRandom takes an inordinate amount of time to initialize in Windows 98. I am running on a 300 MHz Pentium II with Windows 98, 192 MB RAM, and 8 GB HD space. Nothing else is running at the time the following program runs. I tried with and without optimization.

      import java.security.*;
      import java.util.*;

      public final class RandomTest {
        private SecureRandom random = new SecureRandom();

        public RandomTest() {
          Date start = new Date();
          System.out.println("Random int: " + random.nextInt());
          Date end = new Date();
          System.out.println("Start: " + start);
          System.out.println("End: " + end);
        }

        public static void main(String[] args) {
          new RandomTest();
        }
      }

      And the output:

      Random int: -1035658255
      Start: Sat Feb 06 12:19:10 EST 1999
      End: Sat Feb 06 12:19:44 EST 1999

      Note that it took 34 seconds to initialize!

      I have run SecureRandom (1.1.6) on a Windows NT machine (150 MHz Pentium) and it only took about 5 seconds to start up.

      Any ideas?

      Thanks, Ralph
      (###@###.###)
      (Review ID: 53841)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            claisunw Charlie Lai (Inactive)
            Reporter:
            jdn Jeffrey Nisewanger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: