Encrypting a File by intercepting its methods

J

Javier 12

Hi, I've been trying to encrypt file by intercepting File methods, or in
this case, Tempfile methods.

The problem is I need an algorithm that can be used transparently on
each byte, since I don't know how long will be the buffer used by the
user in each read.

For example, ROT13 (very weak) allows concatenation of crypted text like
this:

ABCDEF + XYZ = ABCDEFXYZ

this is the desired behaviour, so I can read buffers of any size and
still be able to decrypt them.

I've tried RC4 with no success.

I want to transparently encrypt reads and writes to disk, is it
possible?

thanks in advance
 
B

brabuhr

Hi, I've been trying to encrypt file by intercepting File methods, or in
this case, Tempfile methods.

I want to transparently encrypt reads and writes to disk, is it
possible?

Is this a learning exercise or do you really require a secure
solution? ("Anyone can design a security system so strong he himself
can't break it.")
 
J

Javier 12

unknown wrote in post #971322:
Is this a learning exercise or do you really require a secure
solution? ("Anyone can design a security system so strong he himself
can't break it.")

Finally I did it with RC4, but it's a bit slow for big files.
 
A

Aaron D. Gifford

Beware when using a stream cipher of reusing the same key (i.e. using
the same key on more than one file, etc.).

Aaron out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top