classpathx-crypto
[Top][All Lists]
Advanced

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

Re: [Classpathx-crypto] latest checkins


From: Casey Marshall
Subject: Re: [Classpathx-crypto] latest checkins
Date: Thu, 1 Aug 2002 18:30:29 -0700 (PDT)

On Sun, 28 Jul 2002, Raif S. Naffah wrote:

> Olivier LF wrote:
> > On Sat, Jul 27, 2002 at 12:37:49PM +1000, Raif S. Naffah wrote:
>
> > Both crypto library and JUnit test suite build successfully however
> > Anubis still does not pass its self test!
>
> Anubis does not have anything specially different than the other ciphers
> --in terms of the java language constructs and invocations.  does any
> other cipher pass its self-test?
>

I think this is an optimization bug in GCJ. I inspected the selfTest()
method, and using good old print-out-the-state debugging found out that
selfTest() actually passes all of its tests -- ie it gets past the two
nested for loops -- but for some reason returns false. I re-made the
GCJ build after removing the -O2 flag and every cipher test succeeds.
It also works with just -O.

As for the other two build methods, Ant works for me, yet the top-level
make seems to want either the NIST test vectors to be in the tree, or
wants to try to build them (and there is no target for them). I'm guessing
that the test vectors will be included in the distribution, or that the
Makefile will not include these files and there will be a pointer in
the documentation to download and test these files.

I did some profiling of the libraries and discovered that because Serpent
creates a new integer array for every block it processes, a LOT of objects
are allocated during execution. This could be a problem in low-memory
devices, where a lot of time will be taken up with garbage collection.

Making the integer array 'x' on lines 597 and 686 a private instance
variable will correct this, but breaks thread-safety (if that's an issue).

-- 
Casey Marshall < address@hidden > http://metastatic.org/




reply via email to

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