Lightcrypto (lightweight cryptographic library)Beta 3, Oct-2003© Copyright 2003 Gert Van Ham, open source LGPL license Home: http://jcetaglib.sourceforge.net/lightcrypto Project: http://sourceforge.net/projects/jcetaglib/ |
This page is best viewed with ... no, not Internet Explorer but ... Mozilla!
Looking for standard JCE (Java Cryptographic Extensions)? Check out the main project at http://jcetaglib.sourceforge.net
It uses a minimal amount of memory so it can be used with J2ME (Java 2 Micro Edition), browser applets, on small Java devices such as PDA's or Java enabled mobile phones or in any other situation where JCE (Java Cryptographic Extensions) is too heavy for the job. Check out the library section of my other project called JCE taglib if you are looking for JCE.
Features:
However, to use this package, you will have to download this provider so you will be bound to any of your country's cryptographic import regulation (check the CryptoLaw document). The author(s), nor any of the organisations/people listed in the credits do NOT take any responsibility in this matter. By downloading and/or using LightCrypto you agree with these terms.
Disclaimer
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
Credits
If you need other algorithms/combinations (see available algorithms) you can build the library yourself.
Don't forget that this package DOES NOT INCLUDE the lightweight API and that it must be downloaded separately from Bouncycastle.org
Just put both LightCrypto & LightWeight API JAR files in your classpath and you are ready to go.
You can use the library directly inside HSQLDB SQL statements using the "net.sourceforge.lightcrypto.Hsqldb"
class.
Example:
SELECT "net.sourceforge.lightcrypto.Hsqldb.digest"(str_col) AS digest FROM sample_table
The lightweight API JAR is still too large for many applications so you will need to use an obfuscator to remove unwanted classes. Check out the excellent article on http://wireless.java.sun.com/midp/ttips/proguard/ how to do this with the free ProGuard obfuscator.
The following example combines the lightcrypto library together with the lightweight API with only the necessary classes into one shrinked JAR (about 32 Kb):
java -jar proguard.jar -libraryjars rt.jar;junit.jar;hsqldb.jar -injars lapi.jar;lightcrypto.jar -outjar lightcrypto-new.jar -keep "public class net.sourceforge.lightcrypto.* { public static *;}"
If need another encryption algorithm you can easily change the code. I only included one algorithm because I wanted to minimize the JAR files. The AESLight algorithm is the fastest algorithm with the smallest memory footprint. The Bouncycastle lightweight API supports may more algorithms such as Twofish, Blowfish and Serpent. Check it out at http://www.bouncycastle.org/specifications.html
Just send me an e-mail if you want to contribute code.
Beta 2
Beta 1
As a pioneer in Internet & Intranet database development, he successfully deployed and administered multiple large Intranet sites for industrial & governmental organizations using Oracle, Netscape & Cold Fusion web technology. He focusses now on security, middleware and the J2EE platform.
E-mail: hamgert@users.sourceforge.net
Personal homepage: http://users.pandora.be/gert.van.ham