Book Image

Raspberry Pi for Secret Agents - Second Edition

By : Stefan Sjogelid
Book Image

Raspberry Pi for Secret Agents - Second Edition

By: Stefan Sjogelid

Overview of this book

Table of Contents (12 chapters)
Raspberry Pi for Secret Agents Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Keeping your data secret with encryption


In this section, we'll create a file container, you can think of it as a vault, and we encrypt whatever is put inside. As long as the vault is unlocked, files can be added to or deleted from it just like any regular filesystem, but once we lock it, no one will be able to peek inside or guess what's in the vault.

This technique will give you an encrypted vault mounted under a directory. You can then add files to it as you wish, and once locked, you can copy it and open it up in Windows.

We'll be using a tool called cryptsetup that will help us create and manage the encrypted containers:

pi@raspberrypi ~ $ sudo apt-get install cryptsetup
  1. First, we need to create an empty file to hold our vault. Here you'll have to decide how much storage space to allocate to your vault. Once created, you won't be able to increase the size, so think about what kind of files you plan to store and their average size. Use the following command but replace [size] with the...