The past year was a tough one for data security, with consumers being affected by ransomware attacks, phishing scams, and a dizzying number of data breaches at big companies.

As consumers, we don’t have much direct control over how companies such as Equifax, Uber, and Yahoo handle sensitive data, but we can do a lot to protect the photos, emails, text messages, and files on our own computers and phones.

more on data security

There’s no single tool that’s guaranteed to keep your data safe from attack, but one comes pretty close: encryption, which scrambles data so that it can be read only by authorized users.

Encryption is occasionally in the news when law enforcement agencies warn that terrorists can use the technology to avoid detection, or when civil rights groups describe how encryption protects activists living under repressive governments.

But to everyday consumers, encryption is a basic building block of the digital world. As a recent white paper from Consumers Union, the policy and mobilization division of Consumer Reports, points out, encryption allows big organizations to safely offer online banking, shopping, tax filing services, and digital health records.

You can use the same technology to protect your personal smartphone, laptop, and router. Here’s how.

How to Encrypt Your Smartphone

Everything you do on a mobile device adds to the potentially sensitive data stored on it—from last-minute Valentine’s Day shopping to video chats to logging in to your email account.

All that makes the phone something like a safe deposit box of data, one that you can accidentally leave in a restaurant or have stolen from a bag.  

That’s why Citizen Lab, a research group at the University of Toronto, recommends that consumers encrypt their smartphones.

The organization recently launched an online tool called Security Planner, supported by Consumers Union, that gives users customized advice on protecting their personal information.

“In the hierarchy of recommendations that we make,” says Christine Schoellhorn, the project’s product manager, “most users will get a recommendation around encrypting their devices.” (She say most users will also be advised to use two-factor authentication and a password manager.)

Encrypting your smartphone is a simple task.

If you have an Apple iPhone, you just need to create a passcode during setup, or later on by going to the Passwords and Security section of the Settings app.

Encrypting an Android smartphone is just as easy and can be done either at the time of setup or by navigating to Settings, selecting Security, and selecting Encrypt Device. (The wording can vary by phone brand. If you’re having trouble, try searching for “encryption” under Settings.)

Now that your smartphone is encrypted, you may want to take an extra step by using a encrypted messaging service to prevent your text messages from being read in transit. You may already be doing this: Apple’s iMessage is encrypted, as long as you’re texting someone else who is also using iMessage. (Texts sent between iMessage and another messaging app are not encrypted.) WhatsApp also uses encryption.

However, security experts generally recommend an app called Signal. It gets the nod for several reasons, including the fact that it works on both Android and iOS devices, and how little user information the service collects.

“They’ve kind of cracked a puzzle,” says Harlo Holmes, director of newsroom digital security at Freedom of the Press Foundation, by combining ease of use and strong encryption. The app, she says, could be “history textbook-worthy—well, maybe not history textbook-worthy, but computer science textbook-worthy.” 

And Your Laptop, Too

Of course, as useful as smartphones are, people store lots of documents on their computers, from Microsoft Excel spreadsheets with family or business budgets to massive photo collections.

Enabling encryption on your Mac or Windows laptop is almost as easy as doing it on a smartphone.

Macs have the advantage here because the latest version of macOS, known as High Sierra, supports full disk encryption out of the box. The feature is called FileVault. Setting this up is as simple as opening your Mac’s System Preferences, then navigating to the Security & Privacy section. From there you can enable FileVault, which requires you to choose a passcode.

It’s not much more difficult to encrypt your Windows laptop, but there is one complication: Only Windows 10 Pro, and not the more consumer-oriented Windows 10 Home, supports full disk encryption.

For Windows 10 Pro users, enabling encryption (known as BitLocker) is merely a matter of clicking the Start button, typing “encryption,” then selecting Manage BitLocker.

Windows 10 Home users looking to add full disk encryption will either have to upgrade to Windows 10 Pro for $100 or choose a third-party solution such as the open-source tool VeraCrypt.

How to Lock Down Your Router

This fall, researchers revealed that a serious security flaw could affect the WiFi networks in millions of homes. The so-called Krack vulnerability was a reminder of the critical role wireless routers play as the connection point between the gadgetry in our homes and the internet.

And it alerted many consumers to how important it is to check for router updates and to understand your router’s encryption settings.

You can get to the router settings through any web browser on your computer. You’ll need the router’s IP address, which you can find by looking at the network connection information under your computer’s settings, whether you have a Windows machine or a Mac. (You’ll also need your router user name and password.)

Basically, once you’re in the router settings, there are two important tasks on the encryption to-do list.

First, you should turn on WPA2-AES encryption—you’ll have choices of other flavors of encryption, but this is the latest and best.

Second, you’ll need to create a password to set up the encryption, and you should pick a good one. (No using the name of your WiFi network, for instance). You’ll need that password to connect your laptop and other wireless devices, from streaming devices to smartphones, to the network.

Having a strong password will help lock out hackers and any neighbors looking for a free ride on your network. 

Editor’s Note: Funding for the encryption white paper and online SecurityPlanner cited in this article were made possible in part through the support of The William and Flora Hewlett Foundation.