Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 308
user489041 Avatar asked Mar 04 '11 22:03

user489041


People also ask

What algorithm is used to encrypt files?

RSA Security RSA is a public-key encryption algorithm and the standard for encrypting data sent over the internet. It also happens to be one of the methods used in PGP and GPG programs. Unlike Triple DES, RSA is considered an asymmetric algorithm due to its use of a pair of keys.

What encryption method is using to encrypt a separate file?

File encryption takes place through asymmetric or symmetric encryption. Some systems use both of them in a combination to strengthen security. Asymmetric encryption or public-key cryptography is a cryptographic system that employs two different keys: a public (or shared) key and a private (or secret) key.


1 Answers

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.

like image 164
xelco52 Avatar answered Oct 10 '22 15:10

xelco52