Signing and Encryption with GnuPG



Similar documents
Signing and Encryption with GnuPG

Pretty Good Privacy with GnuPG

Dip a toe in crypto (aka encryption and GnuPG) Zak Rogoff & Steve Revilak

GPG installation and configuration

Tutorial: Encrypted with Thunderbird and Enigmail. Author: Shashank Areguli. Published: Ed (August 9, 2014)

Encrypting with KMail, Mozilla Thunderbird, and Evolution LOCK AND KEY BY FRAUKE OSTER

GPG - GNU Privacy Guard

HW/Lab 1: Security with PGP, and Crypto CS 336/536: Computer Network Security DUE 09/28/2015 (11am)

Introduce. your tech. Who? Why? Expectations? Operating System? Client or Webmail? Provider?

Networks & Security Course. Web of Trust and Network Forensics

Encrypting and signing

Encrypting your Communications using PGP

GPG Tutorial. 1 Introduction. 2 Creating a signing and encryption keys. 3 Generating a revocation certicate. Andreas Hirt July 12, 2009

The KGpg Handbook. Jean-Baptiste Mardelle Rolf Eike Beer

File and encryption with GPG4win & Enigmail

Published : License : None

PGP from: Cryptography and Network Security

Concepts in Crypto. Parker Micah PGP: 4FF3 AA1B D29E DE C F88 9A

LiteCommerce Advanced Security Module. Version 2.8

An Introduction to Secure . Presented by: Addam Schroll IT Security & Privacy Analyst

The Surveillance State and what to do about it

The Handbook V 1.8 Adaptations by Ludwig Hügelschäfer Based on Version 1 by Daniele Raffo with Patrick Brunschwig and Robert J. Hansen.

GPG4win / Kleopatra Documentation. Secure file and encryption by using GnuPG for Windows

Introduction to Cryptography

Ciphire Mail. Abstract

How to Setup Privacy Guard Encryption.

WiMAX Public Key Infrastructure (PKI) Users Overview

ENCRYPTION ENCRYPTION A BLACK PAPER HOW TO SECURE YOUR S FOR FREE WITH THE STRONGEST ENCRYPTION IN THE WORLD A BLACK PAPER

Biography of Trainer. Education. Experience. Summary. TLS/SSL : Securing your website PGP : Secure your communication. Topic

Using Your PGP Tool to Update Your Address Settings for Encrypted Messaging

THUNDERBIRD WORKBOOK

Ubuntu Open PGP IMPLEMENTATION. Dr. ENİS KARAARSLAN 2014

Sync Security and Privacy Brief

Everyday Cryptography

Secure Client Applications

Getting the most from Apple Mail

Cryptography & Digital Signatures

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Electronic Mail Security

Contingency Access to Enterprise Encrypted Data

CLIENT DATABASE SECURITY

Chapter 8 Security. IC322 Fall Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Receiving Secure from Citi For External Customers and Business Partners

Open Source Tools for Security with Mail.app in Mac OS X

Entrust Managed Services PKI. Getting started with digital certificates and Entrust Managed Services PKI. Document issue: 1.0

to hide away details from prying eyes. Pretty Good Privacy (PGP) utilizes many

What Are Certificates?

Initial Setup of Mozilla Thunderbird with IMAP for OS X Lion

Exam Papers Encryption Project PGP Universal Server Trial Progress Report

How to Create and Maintain an Anonymous Identity Online

Unifying Information Security. Implementing Encryption on the CLEARSWIFT SECURE Gateway

User Guide Supplement. S/MIME Support Package for BlackBerry Smartphones BlackBerry Pearl 8100 Series

The basic groups of components are described below. Fig X- 1 shows the relationship between components on a network.

Cryptography and Network Security Chapter 15

How To Encrypt Data With Encryption

PENN. Social Sciences Computing a division of SAS Computing. SAS Computing SSC. File Security. John Marcotte Director of SSC.

CS 3251: Computer Networking 1 Security Protocols I

Public Key Infrastructure

PRETTY EASY PRIVACY

Overview Keys. Overview

Office of Information Technologies (OIT)

Internet Programming. Security

PrivaSphere Gateway Certificate Authority (GW CA)

Getting started with IMAP for Aggi What is IMAP?

Djigzo S/MIME setup guide

GETTING STARTED SECURE FILE TRANSFER PROCEDURES A. Secure File Transfer Protocol (SFTP) Procedures

Steps for: POP (Post Office Protocol) and IMAP (Internet Message Access Protocol) setup on MAC Platforms

BatzenCA Documentation

Electronic Mail Security. Security. is one of the most widely used and regarded network services currently message contents are not secure

GoldKey Software. User s Manual. Revision WideBand Corporation Copyright WideBand Corporation. All Rights Reserved.

Secure Part II Due Date: Sept 27 Points: 25 Points

Overview of edx Analytics

Brocade Engineering. PKI Tutorial. Jim Kleinsteiber. February 6, Page 1

1. Open Thunderbird. If the Import Wizard window opens, select Don t import anything and click Next and go to step 3.

COMP 3704 Computer Security

Lecture 9: Application of Cryptography

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

How To Encrypt A Traveltrax Report On Gpg On A Pc Or Mac Or Mac (For A Free Download) On A Thumbdrive Or Ipad Or Ipa (For Free) On Pc Or Ipo (For An Ipo)

Key Management. CSC 490 Special Topics Computer and Network Security. Dr. Xiao Qin. Auburn University

Key Management and Distribution

The Case For Secure

WS_FTP Professional 12. Security Guide

PGP: What, Why, When, Which, How, and More...

CS Computer Security Third topic: Crypto Support Sys

Secured Mail through PGP Mail Gateway

Booth Gmail Configuration

What is network security?

FRCC Secure Data Transfer. Users Guide V1.0

1.2 Using the GPG Gen key Command

PKI Contacts PKI for Fraunhofer Contacts

BCTextEncoder Help File

HMRC Secure Electronic Transfer (SET)

User Guide. Please visit the Helpdesk website for more information:

EXAM - ST Symantec PGP Universal Server 3.2 Technical Assessment. Buy Full Product.

On-Core Software, LLC. 893 Sycamore Ave. Tinton Falls, NJ United States of America

PGP (Pretty Good Privacy) INTRODUCTION ZHONG ZHAO

Sharing Secrets Using Encryption Facility

Chapter 6 Electronic Mail Security

Key Management Interoperability Protocol (KMIP)

1 Thunderbird v3 and IMAP/SMTP Configuration

Transcription:

Signing and Encryption with GnuPG Steve Revilak http://www.srevilak.net/wiki/talks Cryptoparty @ Somerville Public Library January 10, 2015 1 / 20

What is GnuPG? GnuPG is a free software implementation of the OpenPGP standard. PGP stands for Pretty Good Privacy PGP is a system for encrypting data, and for creating digital signatures (aka signing). Commonly used for Email, but can be used with any type of data or file. PGP takes a little work to set up. After that, it s easy to use. Today, we ll focus on the setup part. 2 / 20

Where do I get GnuPG? Mac OS https://gpgtools.org/ Windows http://gpg4win.org/ Also useful: Linux GnuPG may already be installed. If not, use your package manager (yum, apt-get, zypper, synaptic, aptitude, etc.) to install it. Thunderbird https://www.mozilla.org/en-us/thunderbird/ Enigmail https://www.enigmail.net/home/index.php 3 / 20

Why Use GnuPG? 4 / 20

A brief introduction to keys Objective: Alice wants to (securely) send a file to Bob. Alice encrypts the file with a password Alice sends the encrypted file to Bob Bob gets the encrypted file, but... How does Alice (securely) get the password to Bob? This is the dilemma with password-based encryption. Public key cryptography avoids this problem entirely. Instead of passwords, you can use public and private keys. 5 / 20

Public and Private Keys In order to do anything with PGP, you ll need a key. Keys exist as a pair, called a keypair. There s a public key. You share this with everyone (because it s public). There s a private key, sometimes called a secret key. Don t share this with anyone (because it s a secret). The private key will undo what the public key does, and vice versa; think of them as inverse functions. If a public key encrypts a message, then the corresponding private key decrypts it. Now, Alice can encrypt the file with Bob s public key. Bob decrypts the file with his private key. 6 / 20

What can you do with a key? Keys allow you to sign and encrypt messages. Signing Guarantees that a message was sent by someone with a specific private key (and wasn t subsequently altered). Encryption The purpose is to ensure that a message is readable only by someone possessing a specific private key. (Here I use the term message in a very generic sense it could be an email message, a file, or any arbitrary piece of data). Leap of faith: You need some level of trust that a particular key belongs to a particular person. 7 / 20

Equations!?! Oh NOES! decrypt(privkey, encrypt(pubkey, MSG)) = MSG This is how encryption/decryption works decrypt(pubkey, encrypt(privkey, MSG)) = MSG This is how signing/verification works Many crypto applications use this technique. For example, PGP, HTTPS, OTR. 8 / 20

Goals for this part of the workshop Generate a keypair (if you don t already have one). Upload your public key to a keyserver Download my public key. Set up your mail program to send and receive signed and encrypted email. (Mail program = Mail User Agent, or MUA) Send me a signed and encrypted message. (I should be able to decrypt your message, and verify your signature.) I ll respond with a signed and encrypted message. (You should be able to decrypt my message and verify my signature.) 9 / 20

Mail Client Basics Sending: You ll use a protocol called SMTP, or Simple Mail Transfer Protocol. Receiving: Two options: IMAP (Internet Mail Access Protocol), or POP (Post Office Protocol) IMAP stores all messages on your ESP s mail server. You can move them to local folders, but you have to do this explicitly. POP downloads mail from your ESP s mail server. By default, the server copy is deleted; you can also configure your mail client to leave it on the server. If you have a lot of mail on the server, the initial synchronization might take a while, especial with POP. 10 / 20

Generating a Keypair I m going to demonstrate with Thunderbird and Enigmail. The command-line equivalents are here for reference. Generate a key (if you don t already have one). gpg --gen-key Choose RSA, RSA. Use the longest key possible (4096 bits). Upload your key to a keyserver. gpg --send-key KEYID Download my public key. gpg --search steve@srevilak.net OR gpg --recv-key 28C2A300 11 / 20

Sending and receiving mail We ll take this one step at a time. Send me a signed and encrypted message. Open your Sent Mail folder. Make sure you can read the encrypted message that you just sent! I ll respond. Work on downloading, decrypting, and reading my message. Be sure to verify the signature. 12 / 20

Backing up your keys If you lose your private key, then forget about decryption. There is no password recovery for keys! This is by design. Backup your private key gpg -a --export-secret-keys KEYID > private-key.asc Store a copy of private-key.asc in a safe place. For example, keep electronic and printed copies in a safe deposit box. 13 / 20

Revocation Certificates What if (say) your laptop is stolen, and you lose your private key? If this happens, you ll want to revoke your key. Generate a revocation certificate gpg -a --gen-revoke KEYID > pgp-revoke.asc Uploading the revocation certificate (to a keyserver) cancels your key. Note: you cannot generate a revocation certificate without a private key! Keep the revocation certificate in a safe place. 14 / 20

Trusting and Signing Keys (1) How do you know that a given key belongs to a given person? You check the key s fingerprint. Here s my fingerprint: gpg --fingerprint 28C2A300... Key fingerprint = 6F09 15FF 59CE E093 56F4 BEEC E772 7C56 28C2 A300 The fingerprint uniquely identifies a PGP key. If the fingerprints match, you ve got the right one. Note: the key id is the last eight digits of the fingerprint. 15 / 20

Trusting and Signing Keys (2) Signing a key indicates that you trust it. gpg --sign-key 28C2A300 OR gpg --lsign-key 28C2A300 --lsign-key makes a local signature; it s only visible to you. To distribute a non-local (--sign-key) signature: Send it to a key server: gpg --send-key 28C2A300 Export the key (containing your signature), and send it to the key holder. gpg -a --export 28C2A300 > signed-key.asc The key holder will gpg --import signed-key.asc to import your signature. 16 / 20

Some Advanced Tips $HOME/.gnupg/gpg.conf is GnuPG s configuration file. Some things you should consider adding: # Sign keys using SHA256, instead of SHA1 cert-digest-algo SHA256 # Sign messages using SHA256, too personal-digest-preferences SHA256 # Set stronger preferences on newly-generated keys # Put this all on one line. default-preference-list SHA512 SHA384 SHA256 SHA224 \ AES256 AES192 AES CAST5 ZLIB BZIP2 \ ZIP Uncompressed 17 / 20

More Advanced Tips Change the preferences of your existing key, to match the default-preference-list in the previous slide. See instructions at http://www.apache.org/dev/openpgp.html. Tip: It doesn t hurt to back up your key before trying this. 18 / 20

GnuPG Wrap Up PGP protects your privacy through encryption. PGP provides non-repudiation through digital signatures. PGP is something that you can (and should!) use every day. GnuPG is a free software implementation of a public standard. It s harder to backdoor software when the source code is public. 19 / 20

PGP Resources GnuPG: http://gnupg.org/ GPG4win: http://www.gpg4win.org/ GPG Tools: http://gpgtools.org/ Riseup.net s Best practices for OpenPGP: https://we.riseup.net/riseuplabs+paow/ openpgp-best-practices Cryptoparty handbook: https://www.cryptoparty.in/documentation/handbook Surveillance Self-Defense: https://ssd.eff.org/ Email Self-Defense: https://emailselfdefense.fsf.org/en/ 20 / 20