CYBER WELFARE

Protect your Digital Privacy

How to Encrypt a File Before You Send It: 7-Zip and Alternatives

Additional resource for the lesson “File Encryption” — Data Protection course

How to encrypt a file before it leaves your hands: before you attach it to an email, copy it to a USB stick or drop it in a shared cloud folder. This resource explains when encrypting a single file helps and what it leaves exposed, guides you through a short 7-Zip exercise on Windows with a Mac alternative, and shows why the passphrase should travel by a different route from the file.

The key idea: the encryption on your phone or laptop stays with the device. When a file leaves it, it leaves that protection behind, so a file worth protecting needs its own lock, and the key needs to travel separately.

A. Why this matters

In this course, data protection means looking after the data you hold: keeping it confidential, intact and available, from the day it is created to the day it is deleted, and beyond. Most of the time, the protection of a file comes from where it sits: an encrypted phone, a laptop with its storage encrypted, an account with a strong sign-in. That protection belongs to the place, not to the file.

When you send a file, it starts a new life elsewhere. An attachment usually stays in your sent folder and the recipient’s inbox until someone deletes it; a USB stick can be left on a train. Encrypting the file itself gives it a protection that travels with every copy. It is most useful for the few documents that would cause real trouble if a stranger read them: identity documents, contracts, financial or health records.

What the sources say

The UK’s Information Commissioner’s Office (ICO), the data protection regulator, gives organisations a clear rule for encrypted attachments: “Do not include the password within the same email as the encrypted file attachment.” Its guidance on storage adds a reason to care about portable copies: “It can be easy to lose or misplace removable media.” The advice is written for organisations, but it travels well to a household.

France’s data protection authority, the CNIL, makes the same point in its practice guide on the security of personal data. It recommends keeping secrets such as an encryption key or a password confidential “by transmitting them via a separate channel from protected data”, giving the example of sending the encrypted file by email and the password “by phone or SMS”. It also advises encrypting data before putting it on a physical medium for someone else.

Not every “password-protected” file is protected equally. The cryptographers Eli Biham and Paul Kocher studied the encryption built into the classic ZIP format and concluded that it “is weak, and should not be used to protect valuable data.” The method matters as much as the password.

B. Key concepts

Six ideas on what an encrypted file protects, and where that protection stops.

File encryption is not disk encryption

Encryption turns data into something unreadable without the right key. Disk encryption does this for the whole storage of a device, and the data is readable again for anyone using the unlocked device. File encryption locks one file, or a few bundled together, so that the lock goes wherever the file goes.

Why it matters to you: A file copied from an encrypted laptop to a USB stick, an email or a cloud folder does not take the laptop’s encryption with it. If it matters, give it its own lock before it leaves.

One passphrase, one key

7-Zip’s own documentation explains that it uses AES-256 (the Advanced Encryption Standard with a 256-bit key, a widely used encryption method) and creates the key from the password you type. A passphrase is a long password, often several words. The same passphrase locks and unlocks the file: this is symmetric encryption, because both sides share one secret.

Why it matters to you: The file is only as hard to open as the passphrase is to guess. 7-Zip makes each guess slower on purpose, “for increasing the cost of exhaustive search for passwords”, but a short or obvious passphrase still undoes a strong method.

Locked is not backed up

Encryption protects confidentiality: who can read the file. It does nothing for availability, whether you still have the data. Forget the passphrase and the file stays locked for you too: Apple warns that you “won’t be able to open the disk image”, and Microsoft says Word cannot recover a lost document password.

Why it matters to you: Treat the encrypted file as a parcel for one journey, and keep your ordinary copy safely backed up. Only a backup brings lost data back.

The label on the parcel

An encrypted archive (a single file that bundles and compresses one or more files) hides the contents, but not always everything about them. Without extra care, the names of the files inside can remain readable to anyone who opens the archive without the passphrase. The archive’s own name and size are visible too.

Why it matters to you: A file called “passport-scan.pdf” says a lot on its own. 7-Zip’s “Encrypt file names” option hides the names, but only in the .7z format: a ZIP archive keeps them visible. The archive’s own name is up to you.

ZipCrypto or AES-256

When 7-Zip creates a .zip file, it offers two encryption methods: ZipCrypto and AES-256. ZipCrypto is the old method (also called traditional or legacy ZIP encryption), kept because most ZIP tools can open it; it is the cipher that Biham and Kocher showed to be weak. AES-256 is stronger, but 7-Zip’s help notes that in ZIP files it is supported “only by 7-Zip, WinZip and some other ZIP archivers.” In 7-Zip’s own .7z format, AES-256 is the only option.

Why it matters to you: A ZIP file with a password can look protected and still be weak. Choosing the .7z format avoids the question altogether.

Two channels, not one

The file and its passphrase should not travel together. If both are in the same email, anyone who gets into that mailbox, or receives the message by mistake, has both.

Why it matters to you: Sending the passphrase another way, such as a call or a message in a different app, means one mistake or one compromised account is not enough to open the file.

C. A practical example: Lucia’s travel documents

Lucia is 48, a parent who keeps the family’s paperwork in order. Her sister was booking a family trip abroad and needed copies of everyone’s passports. Lucia had scanned them on her Windows laptop and was about to attach them to an email, as before.

Then she thought about where that email would end up, in her sent folder and her sister’s inbox, long after the trip. She also planned to carry copies on a USB stick, which is easy to leave behind.

What changed when Lucia encrypted the file

Lucia did the exercise in section D that evening and changed three things:

  • She put the scans into a single .7z archive with AES-256 and ticked “Encrypt file names”. She named the archive “trip-documents”, which says nothing about the contents.
  • She chose a passphrase of several unrelated words, emailed the archive, then rang her sister and read the passphrase out.
  • She copied the encrypted archive, not the scans, to the USB stick.

Her sister uses a Mac, so Lucia checked first that Keka, an archive tool for Mac, opens .7z files.

Two things stayed outside the lock. Once opened, the scans on her sister’s Mac were ordinary files again; they agreed she would delete them after the booking. And the originals were still in Lucia’s Downloads folder, protected only by her laptop’s own encryption. The lock had done its job for the journey.

D. Try it yourself: how to encrypt a file with 7-Zip (20 minutes)

Five short steps. Use a practice file with nothing private in it, such as a shopping list or a recipe. Never write your passphrase down in your notes for this exercise, and do not use one you use anywhere else.

Step 1 — Pick a practice file (2 minutes)

  • Create or choose a small document with no personal data in it.
  • Give it a revealing name, such as “test-private-letter”, so that you can see later whether the name is hidden.
  • Note, as a label only, one real document you might send this way: “rental contract — laptop Documents folder”.

Step 2 — Get the right tool (3 minutes)

  • On Windows: download 7-Zip from its official website. It is free and open source, and the site states that “You don’t need to register or pay for 7-Zip.”
  • On a Mac: Disk Utility is built in and can create an encrypted disk image. Keka is an archive tool that, according to its website, uses AES-256 for 7z files.
  • These are examples, not endorsements. Download tools only from their official sites.

Step 3 — Create the encrypted file (6 minutes)

  • In 7-Zip on Windows: right-click the practice file, open the 7-Zip menu and choose “Add to archive…”. On Windows 11 you may first need to open the full right-click menu.
  • Set the archive format to 7z. Check that the encryption method shows AES-256.
  • Type a passphrase of several unrelated words in “Enter password” and again in “Reenter password”, tick “Encrypt file names”, then click OK.
  • On a Mac with Disk Utility: choose File › New Image › Blank Image, give it a name and size, choose an option in the Encryption pop-up menu, set a password and choose “read/write” as the image format. Copy the practice file into the image, then eject it.
  • In Keka: choose the 7z format and set a password before dragging the file in; for ZIP files Keka uses the older legacy method.

Step 4 — Test it as the recipient would (4 minutes)

  • Open the new archive or disk image. You should be asked for the passphrase before you see any contents.
  • In 7-Zip, check that the file name “test-private-letter” does not appear until you enter the passphrase. If it does, “Encrypt file names” was not ticked: make the archive again.
  • Notice what is still visible without the passphrase: the archive’s own name and its size.

Step 5 — Plan the handover (5 minutes)

  • Decide how you would give the passphrase: a call, in person, or a different app from the one carrying the file.
  • Check what the recipient uses: a .7z file needs software such as 7-Zip or Keka; a Mac disk image suits another Mac user.
  • Agree what happens after: once opened, the file is an ordinary unencrypted copy on their device.
  • Delete the practice archive and file when you are done.

Already covered in the Online Security course

Data Encryption: Already On, and Worth Understanding
It explains the encryption already running on your phone and computer and why recovery keys and backup drives need attention too; this resource covers the single file that leaves those devices, and how to give it a lock of its own before you send it.

E. Videos, articles and further resources

Institutional guidance, the research behind the ZIP warning, and the documentation of the tools named above.

Institutional sources

Information Commissioner’s Office (UK) — Encryption scenarios
Practical scenarios for emailing encrypted files and using removable media, including why the password should never travel with the file.
https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/security/encryption/encryption-scenarios/

CNIL (France) — Practice guide GDPR: Security of personal data (2024)
The French regulator’s guide, with factsheets on exchanging data with others and on encryption, including sending a password by a separate channel.
https://www.cnil.fr/sites/default/files/2024-03/cnil_guide_securite_personnelle_ven_0.pdf

Research

Eli Biham and Paul C. Kocher (Springer) — A Known Plaintext Attack on the PKZIP Stream Cipher
The classic paper showing why traditional ZIP encryption should not be trusted with valuable data. Technical.
https://link.springer.com/chapter/10.1007/3-540-60590-8_12

Tool documentation

7-Zip — 7z Format
7-Zip’s own description of its format and its AES-256 encryption, with the key derived from your password.
https://7-zip.org/7z.html

Apple Support — Create a disk image using Disk Utility on Mac
Apple’s steps for creating an encrypted disk image, including the warning about forgotten passwords.
https://support.apple.com/guide/disk-utility/create-a-disk-image-dskutl11888/mac

Keka — Keka, the macOS file archiver
The official site of a Mac archive tool that creates and opens 7z files, with AES-256 for 7z.
https://www.keka.io/en/

Microsoft Support — Protect a Word document with a password
How to encrypt a single Word document with a password, if the file you need to send is a Word file.
https://support.microsoft.com/en-us/word/protect-a-word-document-with-a-password

Links checked in November 2026. If an address changes, searching for the title on the organisation’s site usually finds it.

F. The Cyber Welfare Framework: Skills, Awareness, Secure Behaviour

This resource sits on the Skills pillar at level FL2 – Beginner, where you carry out a protection with guidance and check that it worked.

Skills

  • Creating a .7z archive with AES-256 and encrypted file names, or an encrypted disk image on a Mac.
  • Testing an encrypted file the way a recipient would open it.
  • Choosing a passphrase and a separate channel to share it.

Awareness

  • Knowing that device encryption stays with the device and does not follow a copied or attached file.
  • Recognising that a password-protected ZIP file may use a weak method.
  • Seeing what stays visible: the archive’s name, its size and, unless hidden, the file names inside.

Secure Behaviour

  • Never putting the passphrase in the same email or message as the file.
  • Encrypting the copy that travels, and keeping your ordinary copy safely backed up.
  • Agreeing with the recipient what happens to the opened file afterwards.

G. Questions to sit with

  • Which documents have you emailed in the past year that you would not want a stranger to read, and where do those emails still sit?
  • If you forgot the passphrase of an encrypted file tomorrow, would you still have the original somewhere?
  • Which of your USB sticks or shared folders holds a document that could do with a lock of its own?

H. What to do now

The recommendations (R) and security measures (MS) from the Cyber Welfare database that apply most directly here.

1. Lock the file that travels

  • R3 — Use passwords of sixteen characters or more: for an encrypted file, the passphrase is the whole lock. Several unrelated words reach that length and are easy to say over the phone.
  • Prefer the .7z format with AES-256 and “Encrypt file names”; avoid ZipCrypto for anything that matters.
  • Never reuse the passphrase for an account.

Minimum commitment: the next time you send a sensitive document, send it as an encrypted archive and give the passphrase by phone, never in the same message.

2. Look after the copies that stay behind

  • R18 — Encrypt your personal devices: the original files on your laptop or phone are protected by the device’s encryption, not by the archive you sent. It keeps them unreadable on a lost device; it does not bring them back.
  • MS8 — Use VeraCrypt as an extra layer to encrypt highly sensitive files: a next step, covered at the Intermediate level, for documents you keep rather than send.
  • Deleting a file may not erase it from a USB stick, so it is better never to copy the unencrypted version there in the first place.

Minimum commitment: this month, look through the USB stick you use most and list, by label only, any sensitive document stored on it without encryption.

In short

  • Device encryption stays with the device; a file that is sent or copied needs its own lock.
  • How to encrypt a file well: .7z with AES-256, a long passphrase and encrypted file names; avoid the old ZipCrypto method.
  • The passphrase travels by a different route from the file, and a forgotten passphrase means a locked file: keep your original safely backed up.
  • Once the recipient opens the file, it is an ordinary copy again, so agree what happens to it.

Related resources in this course

Discover more companion resources from the online courses of the Protect Your Digital Privacy programme.

If you would like to follow the whole path, the Cyber Welfare Program is free and open to everyone.

→ Join the Cyber Welfare Program