April 01, 2011 (updated 8 years ago), Chemtable Software
File Archiver as an Encryption Tool
We all know what a file archive is. Simply put, an archive is a container with a certain amount of files put together so that an operating system treats them as a single file. The advantages of using archives are also well known: at first, archiving can significantly reduce the amount of disk space needed to store the files, both due to compression of files and due to space saved from partially occupied clusters. Also it is much easier to send a single archive via FTP or by e-mail rather than scattered files.
But did you know, that aside from compression and saving files, archivers also allow restricting the access to the contents of an archive? This way, a user not only saves disk space, but also protects crucial files with encryption algorithms. Let’s look how you can protect your archive using WinRAR archiver as the example.
Password protected compression is supported both by the RAR and the ZIP formats. Though there are differences too, we’ll talk about them below. Archiving of files can be performed both with command line execution and via the usual interface of a program.
To encrypt an archive with a password using the command line, you should add the following command line switch: -p[pwd]. To set the password from the interface of the program you can use one of the following ways: first, you can set the password from the corresponding command in the “File” menu. Second, you can click the “key” icon in the bottom left corner of the window. Also, you can use the keyboard shortcut: Ctrl+P. And finally, you can set the password at the “Advanced” tab of the archive settings window.
Please keep in mind that if you assign a password to the archive using the command line or the “Advanced” tab, it only applies to the current archiving process. All other options mentioned above set the default password that will be used for any further archiving.
The ZIP format implements its own encryption algorithm, while the RAR format uses stronger AES-128 encryption. That’s why if you need better protection for your data, choose RAR archiving.
Whenever you attempt to unpack the contents of a password protected archive, you will be asked to enter the password. If you enter the correct one, the decompression continues as usual, otherwise it fails.
What is the difference between ZIP and RAR encryption? ZIP archiver encrypts data, while RAR is able to additionally encrypt file information, such as: file names, size, attributes, comments. So, if you have selected file name encryption you will see an empty folder every time you try to open archive’s contents. If file name encryption isn’t used, the contents of an archive are visible. In order to additionally encrypt file names from the command line, use the following extended parameter: -hp[pwd].
The strength of your encrypted archive fully depends on you. Why is that? Because there are many programs that brute-force a password one by one using various dictionaries. So to keep your archives safe, you should use a password no less than 8 symbols long that isn’t a usual word that could be found in a dictionary and it should contain both letters and numbers. Also remember that a password is case-sensitive. If you follow these simple rules while encrypting an archive, it is very unlikely that someone will be able to hack your password.