![]() |
Re: Random access to an encrypted file
On Mon, 26 Apr 2010 10:41:36 -0500, Spud <fake@fkfkfkf.com> wrote,
quoted or indirectly quoted someone who said : >We've been told that we need to implement on-disk encryption of our data >files. We currently write them using RandomAccessFile and read them >using FileChannel.read(ByteBuffer). > >Before I go off on my own, slog through java.security, and write a >wrapper around these routines to encrypt/decrypt, is there an easy way >to do it? Perhaps something built into the JDK that I'm missing? The easy way would be to find a database that does encryption. see http://mindprod.com/jgloss/sqlvendors.html for candidates. The awkward thing about roll your own is the growth factor that encryption penalises you is not usually accurately predictable. Check out JCE and benchmark some algorithms. There is quite a difference in speed. In particular check out the new AES. See http://mindprod.com/jgloss/jce.html -- Roedy Green Canadian Mind Products http://mindprod.com It’s amazing how much structure natural languages have when you consider who speaks them and how they evolved. |
Re: Random access to an encrypted file
On 27-04-2010 04:15, Roedy Green wrote:
> On Mon, 26 Apr 2010 10:41:36 -0500, Spud<fake@fkfkfkf.com> wrote, > quoted or indirectly quoted someone who said : >> We've been told that we need to implement on-disk encryption of our data >> files. We currently write them using RandomAccessFile and read them >> using FileChannel.read(ByteBuffer). >> >> Before I go off on my own, slog through java.security, and write a >> wrapper around these routines to encrypt/decrypt, is there an easy way >> to do it? Perhaps something built into the JDK that I'm missing? > > The easy way would be to find a database that does encryption. > see http://mindprod.com/jgloss/sqlvendors.html > for candidates. > > The awkward thing about roll your own is the growth factor that > encryption penalises you is not usually accurately predictable. I would expect every algorithm to have a very well defined function for the size after encryption depending on the size before encryption. 100% predictable. Arne |
Re: Random access to an encrypted file
Arne Vajhøj wrote:
> On 27-04-2010 04:15, Roedy Green wrote: >> On Mon, 26 Apr 2010 10:41:36 -0500, Spud<fake@fkfkfkf.com> wrote, >> quoted or indirectly quoted someone who said : >>> We've been told that we need to implement on-disk encryption of our >>> data files. We currently write them using RandomAccessFile and read >>> them using FileChannel.read(ByteBuffer). >>> >>> Before I go off on my own, slog through java.security, and write a >>> wrapper around these routines to encrypt/decrypt, is there an easy >>> way to do it? Perhaps something built into the JDK that I'm missing? >> >> The easy way would be to find a database that does encryption. >> see http://mindprod.com/jgloss/sqlvendors.html >> for candidates. >> >> The awkward thing about roll your own is the growth factor that >> encryption penalises you is not usually accurately predictable. > > I would expect every algorithm to have a very well defined > function for the size after encryption depending on the > size before encryption. 100% predictable. I wouldn't. E.g an algortihm whose first step is to convert an array of chars to an array of bytes encoded in UTF-8. |
| All times are GMT. The time now is 12:17 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.