Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2004 11:08:38 +0200
From:      Pawel Worach <pawel.worach@telia.com>
To:        Ian Grigg <iang@systemics.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: Crypto takes 17 seconds to wind up for the throw...
Message-ID:  <417F6596.8050808@telia.com>
In-Reply-To: <417ECD08.8010805@systemics.com>
References:  <417ECD08.8010805@systemics.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Grigg wrote:
> Cipher DES:       17025

What takes time in this situation I belive is.

   // this depends on the quality of the randomness your system provides
   SecureRandom random = SecureRandom.getInstance("SHA1PRNG");

   // done by Cipher.getInstance("DES"); in the background, the constructor
   // of DESCipher is pretty slow, don't really know what is does, generates
   // keys?
   com.sun.crypto.provider.DESCipher dc =
     new com.sun.crypto.provider.DESCipher();

Random stir:    1155 (those two above combined)
Cipher DES:       686 (if above is pre-done this goes faster)

Your system must be quite slow if that takes 17 seconds,
getInstance("DES") in your program out of the box took me 1230 msec.

Java HotSpot(TM) Client VM (build 1.4.2-p6-current-2004-07-21, mixed mode)
FreeBSD 6.0-CURRENT #0: Sun Oct 17 18:21:05 CEST 2004
PIII 600Mhz

ps. Any plans for getting the hotspot profiler working?

-- 
Pawel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?417F6596.8050808>