classpathx-crypto
[Top][All Lists]
Advanced

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

[Classpathx-crypto] [patch] Inlined Serpent


From: Casey Marshall
Subject: [Classpathx-crypto] [patch] Inlined Serpent
Date: Wed, 04 Sep 2002 19:21:51 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(I'm CC'ing this to the crypto list, too)

Attached is a patch to modify Serpent to use Dag Arne Osvik's inlined
versions of the encryption and decryption methods. The key setup is
still the same as before.

The bad news is that it is NOT always faster than the current
implementation. When run on Sun's HotSpot VMs (I've tried 1.3.1_04-b02,
1.4.0-b92, and 1.4.1-rc-b19 on Linux) the JIT will refuse to compile the
encrypt and decrypt methods, and all en/decrypting is done in
interpreted mode. Thus it is not much faster than interpreted mode (my
guess is that Sun is terminally too clever for their own good, and
their JIT will not compile methods that are too big or take too long to
compile).

The good news is that with other VMs this implementation is MUCH faster.
Kaffe (version 1.0.6, JIT v3) can get ~5.5 MB/s, and a native version
produced by GCJ runs at ~8 MB/s (second fastest for encryption, behind
Rijndael, and neck-and-neck with Anubis for decryption).

If we can come up with a way to make this inlined version more
digestible for certain JITs, I think this would be a good implementation
for future releases.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQE9dr+/gAuWMgRGsWsRAreRAJ9poU8hDRPjyuhHSB5uJDRMXbb+DACeOePj
88OIle6lNPdlQGehIrsstFI=
=Aw5o
-----END PGP SIGNATURE-----

Attachment: serpent-inlined.bz2
Description: Binary data


reply via email to

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