What encryption algorithm is useful for encrypting a file stored on disk?

I have text that is in a file. I want to encrypt this file so that the end user cannot read or write to this file, but the application can read it. A secret may be kept in the application, as it is protected differently.

What type of encryption supports these requirements?

I was thinking about AES. I am not very good at encryption and have been looking for a starting point. An algorithm or frame proposal would be great.

Last note: the code is in Java, running on Windows and Linux.

+6
java encryption
source share
3 answers

AES or RSA will be fine. However, it is important to note that after your program decrypts the data, the reverse engineer will easily recover plaintext without any knowledge of the key or encryption algorithm.

+3
source share

Since you marked the message as “Java,” I would recommend looking at the Java Cryptography Extension (JCE). With J2SE 1.4, it has been linked to the SDK and JRE.

And, of course, a props example and overview of using AES in JCE.

+5
source share

If the application can read it, the application has a key in it. And if the application has a key, a rather energetic user can find this key and use it for himself. Or look into the memory and see the decrypted version.

+4
source share

All Articles