项目作者: xsnpdngv

项目描述 :
Makefile for basic PGP operations
高级语言: Makefile
项目地址: git://github.com/xsnpdngv/keep.git
创建时间: 2017-03-21T13:56:57Z
项目社区:https://github.com/xsnpdngv/keep

开源协议:

下载


Keep files safe with PGP

This is a Makefile project for basic PGP (Pretty Good Privacy) operations
(keygen, export/import, encrypt/decrypt) utilizing the GnuPG (GNU Privacy Guard)
implementation in order to easily encrypt and decrypt files with sensitive
content.

Prerequisites

Install GnuPG package on Debian/Ubuntu machine:

  1. sudo apt-get install gnupg2

or for other OS download from GnuPG’s site and install:

www.gnupg.org/download/index.en.html

Usage

Generate Key Pair

Generate private/public key pair interactively if there are no such yet

  1. make keys

Keys are going to be stored under ~/.gnupg in a key database protected
with the password given through the process of generation.

Export/Import Keys

Keys might need to be ported to other systems. In order to port the whole key
database it is enough to copy the ~/.gnupg directory to the target system.

To port only the keys of interest exporting and importing them is needed.
To do so set the UID in the Makefile to the one whose keys are to be
ported and make export. On the target machine with the same Makefile and
the exported keys along make import.

Encrypt/Decrypt Files

To encrypt a file with the name filename:

  1. make filename.asc

To decrypt an encrypted file with the name filename.asc and get back the
original one:

  1. make filename

To decrypt all encrypted files *.asc:

  1. make plain

To clean directory from plain (sensitive) files by encrypting them if needed
and securely delete them:

  1. make clean