开发者

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

I have some text that is in a file. I want to encrypt this file so that an end user can not read or write to this file, but the application 开发者_如何转开发can read it. There can be a stored secret in the application because it is being secured in another way.

What type of Encryption support these requirements?

I was thinking of AES. I do not know much about encryption, and was looking for a starting point. An algorithm or a framework suggestion would be great.

One last note, the code is in Java running on a Windows and Linux environment.


Since you've tagged the post as "Java" - I'd recommend looking at the "Java Cryptography Extension" (JCE). Since J2SE 1.4 it's been bundled with the SDK and JRE.

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


If the application can read it, the application has a key in it. And if the application has a key in it, a sufficiently energetic user can find that key and use it for themselves. Or spy on memory and see the decrypted version.


AES or RSA would be just fine. An important thing to notice though is that once your program decrypts data, a reverse engineer would easily recover the plaintext without any knowledge of the key or algorithm of encryption.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜