Hello,

I have recently started looking at HSQLDB and I am interested in participating
in it's development. I have added encryption support to the text tables. It currently, encrypts/decrypts each line (record) as it is read/written to the file.
I don't know if the way that I implemented this is the best way, but basically:


TextDatabaseRowInput:
   public void setSource(String text, int pos) {
       String temp = cr.decrypt(text) + "\n";
       this.text = temp.substring(0, temp.indexOf('\n'));
         ...

TextDatabaseRowOutput:
   public byte[] toByteArray() throws IOException {
       ...
       return (cr.encrypt(ret));
   }

where cr is an object which contains the appropriate key/cipher algorithm for this table.

I read all (I think) the previous posting regarding encryption and it was not
clear to me what has been done in this area. But there was a lot of discussion
a couple of years ago. Anyway, this is what I envision:


- The encryption should be optional for each text table (some encrypted, some plain).
- In addition to whether a text table is encrypted, the table should also be associated
with an encryption class. Each class should specify an algorithm (RC4, DES, 3DES...)
and a key. Such that, different text tables may be encrypted with different keys/algorithms.



- For stand alone implementations:
The encryption key should be provided by the enclosing application. This means that it would be up to the application developer to decide how the
key will be provided to the database engine. This includes whether the key
is stored on the file system, is provided by the user, etc.


- For client/server implementations:
     Anybody???

Questions:

How do I extend the SET TABLE ... SOURCE "...", so that in addition to the source file,
field separator, etc., it has encrypted=y;class=c1?


How do I get these properties back in the TextDataRowInput/Output classes?

What's the best (good enough) way for the TextDataRowInput/Output classes to obtain the
cr object? I thought of static methods of some class, let say, "org.hsqldb.ciphers" and then
both TextDataRowInput/Output classes can retrieve the ciphers that the application placed there
prior to accessing the tables.


What do you think?

Be kind... I don't deal well with rejection, criticism, spellling... ;-}

-Edwin S. Ramirez-




------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ hsqldb-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hsqldb-developers

Reply via email to