Archive:Security Guide/7Zip

From FedoraProject

Jump to: navigation, search
Cog.png
It has been requested that this page be deleted.


Important.png
Old page
This page has been marked as "old", and likely contains content that is irrelevant or incorrect. If you can, please update this page. This page will be deleted if action is not taken.

Contents

Chapter 4, Section 3 - 7-Zip Encrypted Archive

Introduction to 7-Zip Encrypted Archives

7-Zip is a cross-platform, next generation, file compression tool that can also use strong encryption (AES-256) to protect the contents of the archive. This is extremely useful when you need to move data between multiple computers that use varying operating systems (i.e. Linux at home, Windows at work) and you want a portable encryption solution.

7-Zip Installation in Fedora

7-Zip is not a base package in Fedora, but it is available in the software repository. Once installed, the package will update alongside the rest of the software on the computer with no special attention necessary.

Step-by-Step Installation Instructions

  • Open a Terminal:

Click Activities -> Applications -> Terminal

  • Install 7-Zip with sudo access:
sudo yum install p7zip
  • Close the Terminal:
exit

Step-by-Step Command Line Usage Instructions

By following these instructions you are going to compress and encrypt your "Documents" directory. Your original "Documents" directory will remain unaltered. This technique can be applied to any directory or file you have access to on the filesystem.

  • Open a Terminal: Click Activities -> Applications -> Terminal
  • Compress and Encrypt: (enter a password when prompted)
7za a -mhe=on -ms=on -p Documents.7z Documents/

The "Documents" directory is now compressed and encrypted. The following instructions will move the encrypted archive somewhere new and then extract it.

  • Create a new directory:
mkdir newplace
  • Move the encrypted file:
mv Documents.7z newplace
  • Go to the new directory:
cd newplace
  • Extract the file: (enter the password when prompted)
7za x Documents.7z

The archive is now extracted into the new location. The following instructions will clean up all the prior steps and restore your computer to its previous state.

  • Go up a directory:
cd ..
  • Delete the test archive and test extraction:
rm -r newplace
  • Close the Terminal:
exit

Creating a Secure 7-Zip Archive via the GUI

7-Zip archives can be extracted just like any other archive via the GUI, but creating a secure 7-Zip archive requires a few additional steps.

By following these instructions you are going to compress and encrypt your "Documents" directory. Your original "Documents" directory will remain unaltered. This technique can be applied to any directory or file you have access to on the filesystem.

  • Open the file browser: Click Activities -> Files
  • Right-Click on the "Documents" folder
  • Select the "Compress" option
  • Select ".7z" as the file extension
  • Expand "Other Options"
  • Check "Encrypt the file list too"
  • Enter a password into the password field
  • Click the "Create" button

You will now see a "Documents.7z" file appear in your home directory. If you try to open the file, you will be asked for the archive password before being shown the contents of the archive. The file will open once the correct password is supplied, and the archive can then be manipulated as usual. Deleting the "Documents.7z" file will conclude this exercise and return your computer to its previous state.

Things of note

7-Zip is not shipped by default with Microsoft Windows or Mac OS X. If you need to use your 7-Zip files on those platforms you will need to install the appropriate version of 7-Zip on those computers. See the 7-Zip download page.