Java Cryptography Extension (JCE) and data types

Hello,

I am trying to encrypt my database. I want to encrypt before I write and decrypte when I do a read from the database. However, if I am going to be writing to columns that are text, number, dates, etc, won't I receive errors when I attempt that?

I am using prepared staments to communicate with the database and using jdk1.3

Thanks!

[371 byte] By [ebraun123] at [2007-9-30 14:59:54]
# 1

Have you looked up info on the Java Cryptographic API?

Why do you think that you will receive errors?

Have you tried to implement a crypto layer into your existing design?

You could start by explore the Cipher class, and different ways to convert primitives to byte[] arrays and back.

Ivar_Svendsen at 2007-7-5 21:32:41 > top of Java-index,Archived Forums,Java Programming...
# 2

His point is that ciphertext is random binary data. If you encrypt before storing, what you're saying is that your DB is going to be a bunch of BLOBs. You won't be able to sort, search, implement constraints, or take advantage of stored procedures.

To the OP - I believe a number of DBs implement encryption "inside" themselves. You have to supply the password/key through the driver. Beyond that, I know very little. Try Googling "encrypted database" and see what you get.

Grant

ggainey at 2007-7-5 21:32:41 > top of Java-index,Archived Forums,Java Programming...