Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Rename PGP Sync to GPG Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
micahflee committed Jul 28, 2016
1 parent ebd1954 commit 1a6dbf1
Show file tree
Hide file tree
Showing 32 changed files with 84 additions and 84 deletions.
10 changes: 5 additions & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ Install some dependencies using pip3:
sudo pip3 install pyinstaller requests requests[socks] packaging
```

Now you're ready to build the actual app. Go to the `pgpsync` folder before and run this to build the app:
Now you're ready to build the actual app. Go to the `gpgsync` folder before and run this to build the app:

```sh
install/build_osx.sh
```

Now you should have `dist/PGP Sync.app`.
Now you should have `dist/GPG Sync.app`.

To codesign and build a .pkg for distribution:

```sh
install/build_osx.sh --sign
```

Now you should have `dist/PGP Sync.pkg`. NOTE: This isn't implemented yet.
Now you should have `dist/GPG Sync.pkg`. NOTE: This isn't implemented yet.

## Linux distributions

Expand All @@ -48,12 +48,12 @@ Make and install a .deb:

```sh
./install/build_deb.sh
sudo dpkg -i deb_dist/pgpsync_*.deb
sudo dpkg -i deb_dist/gpgsync_*.deb
```

## Run the tests

From the `pgpsync` folder run:
From the `gpgsync` folder run:

```sh
nosetests
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PGP Sync Changelog
# GPG Sync Changelog

## 0.1.0

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include *.md
include version
include install/pgpsync.desktop
include install/gpgsync.desktop
include share/*
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# PGP Sync
# GPG Sync

![PGP Sync](/logo/logo.png)
![GPG Sync](/logo/logo.png)

PGP Sync is designed to let users always have up-to-date PGP public keys for other members of their organization.
GPG Sync is designed to let users always have up-to-date GPG public keys for other members of their organization.

If you're part of an organization that uses PGP internally you might notice that it doesn't scale well. New people join and create new keys and existing people revoke their old keys and transition to new ones. It quickly becomes unwieldy to ensure that everyone has a copy of everyone else's current key, and that old revoked keys get refreshed to prevent users from accidentally using them.
If you're part of an organization that uses GPG internally you might notice that it doesn't scale well. New people join and create new keys and existing people revoke their old keys and transition to new ones. It quickly becomes unwieldy to ensure that everyone has a copy of everyone else's current key, and that old revoked keys get refreshed to prevent users from accidentally using them.

PGP Sync solves this problem by offloading the complexity of PGP to a single trusted person in your organization (referred to here as the "techie"). As a member of an organization, you install PGP Sync on your computer, configure it with a few settings that the techie gives you, and then you forget about it. PGP Sync takes care of everything else.
GPG Sync solves this problem by offloading the complexity of GPG to a single trusted person in your organization (referred to here as the "techie"). As a member of an organization, you install GPG Sync on your computer, configure it with a few settings that the techie gives you, and then you forget about it. GPG Sync takes care of everything else.

It works like this:

* The techie generates an "authority key". Then they create a list of PGP fingerprints that all members of your organization should keep updated, digitally sign this list with the authority key, and upload it to a website so that it's accessible from a public URL.
* All members of the organization install PGP Sync on their computers and configure it with the authority key's fingerprint and the URL of your signed fingerprint list. (Now, all of your members will automatically and regularly fetch this URL and then refresh all of the non-revoked keys on the list from a key server.)
* The techie generates an "authority key". Then they create a list of GPG fingerprints that all members of your organization should keep updated, digitally sign this list with the authority key, and upload it to a website so that it's accessible from a public URL.
* All members of the organization install GPG Sync on their computers and configure it with the authority key's fingerprint and the URL of your signed fingerprint list. (Now, all of your members will automatically and regularly fetch this URL and then refresh all of the non-revoked keys on the list from a key server.)
* When new keys in your organization are added, the techie adds them to the fingerprint list, re-signs it with the authority key, and upload it to the same URL. If users migrate to new keys, the techie leaves their old fingerprints on the list so that all other members can tell that their old keys were revoked.

Now each member of your organization will have up-to-date public keys for each other member, and key changes will be transitioned smoothly without any further work or interaction.
Expand All @@ -25,29 +25,29 @@ Here are some features:
* Makes sure non-revoked public keys are refreshed once a day
* Works seamlessly with the web of trust

## How is PGP Sync different than S/MIME, or running a Certificate Authority for PGP keys?
## How is GPG Sync different than S/MIME, or running a Certificate Authority for GPG keys?

PGP Sync does one thing: Makes sure members of an organization always have up-to-date public keys from a centrally-managed list.
GPG Sync does one thing: Makes sure members of an organization always have up-to-date public keys from a centrally-managed list.

Unlike with S/MIME or CAs, users don't need to trust the central authority. At worst, a malicious authority could make you download fake public keys. If you manually verify fingerprints and sign keys, your OpenPGP software should pick the correct key to encrypt to each time. If you don't manually verify fingerprints and sign keys, then at least you won't be automatically encrypting to people's old revoked keys, and you'll get the latest keys for new members of your organization without having to manually find them and import them.

If you trust the person who manages the authority key, you could even sign it and set an `ownertrust` to `Full`. If the authority key cross-signs the keys of everyone in your organization, you'll have an internal web of trust, and can have much stronger confidence in all of the keys, even without requiring everyone to sign everyone else's key (a decentralized process that requires exponentially more work with each person who joins the organization).

S/MIME might be a better option than OpenPGP for some organizations. But PGP has the advantage that it's more popular, it doesn't require trusting a central authority, and it's simpler to use when communicating securely with people across multiple organizations.
S/MIME might be a better option than OpenPGP for some organizations. But GPG has the advantage that it's more popular, it doesn't require trusting a central authority, and it's simpler to use when communicating securely with people across multiple organizations.

## Creating the fingerprints file

First you must generate an authority key. For higher security, I recommend that you store this key on an OpenPGP smart card such as a Yubikey. Here's an example authority key:

```sh
$ gpg2 --list-keys --fingerprint "PGP Sync Example Authority"
$ gpg2 --list-keys --fingerprint "GPG Sync Example Authority"
pub rsa4096/980EA13A 2016-07-07 [SC] [expires: 2017-07-07]
Key fingerprint = 2646 A274 C86C 618D 6DB9 23A1 F0B6 DC77 980E A13A
uid [ultimate] PGP Sync Example Authority
uid [ultimate] GPG Sync Example Authority
sub rsa4096/9484EB1D 2016-07-07 [E] [expires: 2017-07-07]
```

Now create a list of all of the fingerprints that your organization uses. I recommend that you manually compare each person's fingerprint before adding it to this list. And while this isn't required by PGP Sync, it's a good idea to sign each person's key with your authority key, and have them sign the authority key back, so you can build an internal web of trust.
Now create a list of all of the fingerprints that your organization uses. I recommend that you manually compare each person's fingerprint before adding it to this list. And while this isn't required by GPG Sync, it's a good idea to sign each person's key with your authority key, and have them sign the authority key back, so you can build an internal web of trust.

Each fingerprint should have its own line. Spaces within fingerprints are optional. Comments (which start with `#` characters) and whitespace is ignored, so feel free to mark up your fingerprints file with notes. Here's my example `fingerprints.txt`.

Expand Down Expand Up @@ -101,21 +101,21 @@ Mw4F3dk/+Xs9XnEh3R2q
-----END PGP SIGNATURE-----
```

Finally, upload `fingerprints.txt.asc` to a website (if you'd like, you could maintain this file in a public git repository) and make a note of the URL, as well as the authority key fingerprint. You'll need to give these two pieces of information to each member of your organization in order to configure PGP Sync on their computers.
Finally, upload `fingerprints.txt.asc` to a website (if you'd like, you could maintain this file in a public git repository) and make a note of the URL, as well as the authority key fingerprint. You'll need to give these two pieces of information to each member of your organization in order to configure GPG Sync on their computers.

Each time there is a key change in your organization, you need to add the new fingerprints to `fingerprints.txt`, re-sign it with your authority key, and re-upload it to the same URL.

## Configuring PGP Sync on everyone's computers
## Configuring GPG Sync on everyone's computers

![Screenshot](/logo/screenshot.png)

Each list of fingerprints that you'd like PGP Sync to keep refreshed is called an endpoint, and you can have as many as you'd like (for example, if you belong to multiple organizations). To get started, all you need to do is add an endpoint and specify the `Signing key fingerprint` and the `Signed fingerprints URL`, and click the save button. PGP Sync will verify that the fingerprints file has been set up correctly, and if so, immediately sync the endpoint.
Each list of fingerprints that you'd like GPG Sync to keep refreshed is called an endpoint, and you can have as many as you'd like (for example, if you belong to multiple organizations). To get started, all you need to do is add an endpoint and specify the `Signing key fingerprint` and the `Signed fingerprints URL`, and click the save button. GPG Sync will verify that the fingerprints file has been set up correctly, and if so, immediately sync the endpoint.

That's it. Just leave PGP Sync open in the background, and it will make sure all of your PGP keys get synced at least once a day.
That's it. Just leave GPG Sync open in the background, and it will make sure all of your GPG keys get synced at least once a day.

### Using PGP Sync with Tor
### Using GPG Sync with Tor

It's simple to configure PGP Sync to download the fingerprints URL and refresh public keys from key servers using the Tor network. First, you need to install a system Tor on your computer.
It's simple to configure GPG Sync to download the fingerprints URL and refresh public keys from key servers using the Tor network. First, you need to install a system Tor on your computer.

* **Mac OS X:** The easiest way to install Tor and have it always run in the background in OS X is by using [Homebrew](http://brew.sh/). Install it if you don't already have it. Then install Tor and configure it to run in the background by typing this into your terminal:

Expand All @@ -126,4 +126,4 @@ It's simple to configure PGP Sync to download the fingerprints URL and refresh p

* **Linux:** Make sure you have a system Tor installed in the background. In Debian or Ubuntu, you can run `sudo apt install tor` to install it.

Now edit your PGP Sync endpoint and check the box next to `Load URL through SOCKS5 proxy (e.g. Tor)`. Leave the host as `127.0.0.1` and the port as `9050`, and save.
Now edit your GPG Sync endpoint and check the box next to `Load URL through SOCKS5 proxy (e.g. Tor)`. Leave the host as `127.0.0.1` and the port as `9050`, and save.
2 changes: 1 addition & 1 deletion pgpsync/__init__.py → gpgsync/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
from .pgpsync import *
from .gpgsync import *
2 changes: 1 addition & 1 deletion pgpsync/buttons.py → gpgsync/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, settings):
self.quit_btn.clicked.connect(self.quit)

# Run automatically
self.run_automatically_checkbox = QtWidgets.QCheckBox("Run PGP Sync automatically on login")
self.run_automatically_checkbox = QtWidgets.QCheckBox("Run GPG Sync automatically on login")
if self.settings.run_automatically:
self.run_automatically_checkbox.setCheckState(QtCore.Qt.Checked)
else:
Expand Down
6 changes: 3 additions & 3 deletions pgpsync/common.py → gpgsync/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def alert(msg, details='', icon=QtWidgets.QMessageBox.Warning):
d = QtWidgets.QMessageBox()
d.setWindowTitle('PGP Sync')
d.setWindowTitle('GPG Sync')
d.setText(msg)

if details:
Expand All @@ -29,7 +29,7 @@ def clean_keyserver(keyserver):

def get_resource_path(filename):
if platform.system() == 'Linux':
prefix = os.path.join(sys.prefix, 'share/pgpsync')
prefix = os.path.join(sys.prefix, 'share/gpgsync')
elif platform.system() == 'Darwin':
# Check if app is "frozen" with pyinstaller
# https://pythonhosted.org/PyInstaller/#run-time-information
Expand All @@ -45,7 +45,7 @@ def get_resource_path(filename):
def get_icon():
global icon
if not icon:
icon = QtGui.QIcon(get_resource_path('pgpsync.png'))
icon = QtGui.QIcon(get_resource_path('gpgsync.png'))
return icon

syncing_icon = None
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pgpsync/gnupg.py → gpgsync/gnupg.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def recv_key(self, keyserver, fp, use_proxy, proxy_host, proxy_port):
if keyserver == default_hkps_server:
# Don't need to add ca_cert_file in OS X, because GPG Tools includes the
# correct .pem for hkps://hkps.pool.sks-keyservers.net, and specifying it
# breaks because of a space in the filename (in "PGP Sync.app")
# breaks because of a space in the filename (in "GPG Sync.app")
if not self.system == 'Darwin':
gpg_conf += 'keyserver-options ca-cert-file={}\n'.format(ca_cert_file)
dirmngr_conf += 'hkp-cacert {}\n'.format(ca_cert_file)
Expand Down
12 changes: 6 additions & 6 deletions pgpsync/pgpsync.py → gpgsync/gpgsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ def __init__(self):
self.setAttribute(QtCore.Qt.AA_X11InitThreads, True)
QtWidgets.QApplication.__init__(self, sys.argv)

class PGPSync(QtWidgets.QMainWindow):
class GPGSync(QtWidgets.QMainWindow):
def __init__(self, app):
super(PGPSync, self).__init__()
super(GPGSync, self).__init__()
self.app = app
self.system = platform.system()
self.setWindowTitle('PGP Sync')
self.setWindowTitle('GPG Sync')
self.setWindowIcon(common.get_icon())
version_file = common.get_resource_path('version')
self.version = parse(open(version_file).read().strip())
Expand Down Expand Up @@ -421,7 +421,7 @@ def check_for_updates(self, force=False):
self.checking_for_updates = True

try:
url = 'https://api.github.com/repos/firstlookmedia/pgpsync/releases/latest'
url = 'https://api.github.com/repos/firstlookmedia/gpgsync/releases/latest'
token = '8890473be7c382a70eadb8fbc58ffe0fea913b77'

r = requests.get(url, headers={
Expand All @@ -440,7 +440,7 @@ def check_for_updates(self, force=False):
if self.saved_update_version < latest_version or force:
self.show_main_window()

common.alert('A new version of PGP Sync is available.<span style="font-weight:normal;"><br><br>Current: {}<br>Latest: &nbsp;&nbsp;{}<br><br>Please download the <a href="{}?access_token={}">latest</a> version.</span>'.format(self.version, latest_version, release['html_url'], token))
common.alert('A new version of GPG Sync is available.<span style="font-weight:normal;"><br><br>Current: {}<br>Latest: &nbsp;&nbsp;{}<br><br>Please download the <a href="{}?access_token={}">latest</a> version.</span>'.format(self.version, latest_version, release['html_url'], token))
self.saved_update_version = latest_version
elif self.version == latest_version and force:
self.show_main_window()
Expand Down Expand Up @@ -469,7 +469,7 @@ def configure_autoupdate(self, state):

def main():
app = Application()
gui = PGPSync(app)
gui = GPGSync(app)

sys.exit(app.exec_())

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions pgpsync/settings.py → gpgsync/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ def __init__(self):
system = platform.system()
if system == 'Windows':
appdata = os.environ['APPDATA']
self.settings_path = '{0}\\pgpsync'.format(appdata)
self.settings_path = '{0}\\gpgsync'.format(appdata)
else:
self.settings_path = os.path.expanduser("~/.pgpsync")
self.settings_path = os.path.expanduser("~/.gpgsync")

self.load()

Expand Down Expand Up @@ -61,10 +61,10 @@ def save(self):

def configure_run_automatically(self):
if platform.system() == 'Darwin':
share_filename = 'org.firstlook.pgpsync.plist'
share_filename = 'org.firstlook.gpgsync.plist'
autorun_dir = os.path.expanduser("~/Library/LaunchAgents")
elif platform.system() == 'Linux':
share_filename = 'pgpsync.desktop'
share_filename = 'gpgsync.desktop'
autorun_dir = os.path.expanduser("~/.config/autostart")

if not os.path.exists(autorun_dir):
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pgpsync/systray.py → gpgsync/systray.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class SysTray(QtWidgets.QSystemTrayIcon):

def __init__(self, version):
super(SysTray, self).__init__(common.get_icon())
self.show_text = 'Show PGP Sync'
self.hide_text = 'Hide PGP Sync'
self.show_text = 'Show GPG Sync'
self.hide_text = 'Hide GPG Sync'

# Menu
self.menu = QtWidgets.QMenu()
Expand Down
4 changes: 2 additions & 2 deletions install/build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ python3 setup.py --command-packages=stdeb.command bdist_deb
echo ""
if [[ $? -eq 0 ]]; then
echo "To install, run:"
echo "sudo dpkg -i deb_dist/pgpsync_*.deb"
echo "sudo dpkg -i deb_dist/gpgsync_*.deb"
else
echo "PGP Sync failed to build!"
echo "GPG Sync failed to build!"
fi
2 changes: 1 addition & 1 deletion install/build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ pyinstaller install/pyinstaller-osx.spec --clean

if [ "$1" = "--release" ]; then
echo "Codesigning is not yet implemented"
productbuild --component "dist/PGP Sync.app" /Applications "dist/PGP Sync.pkg"
productbuild --component "dist/GPG Sync.app" /Applications "dist/GPG Sync.pkg"
fi
4 changes: 2 additions & 2 deletions install/pgpsync → install/gpgsync
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pgpsync
pgpsync.main()
import gpgsync
gpgsync.main()
4 changes: 2 additions & 2 deletions install/pgpsync-osx.py → install/gpgsync-osx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os
import pgpsync
pgpsync.main()
import gpgsync
gpgsync.main()
9 changes: 9 additions & 0 deletions install/gpgsync.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Name=GPG Sync
Comment=Keep up with your organization's GPG public keys
Exec=/usr/bin/gpgsync
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/gpgsync.png
Categories=Network;
File renamed without changes.
9 changes: 0 additions & 9 deletions install/pgpsync.desktop

This file was deleted.

12 changes: 6 additions & 6 deletions install/pyinstaller-osx.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ block_cipher = None
version = open('share/version').read().strip().lstrip('v')

a = Analysis(
['pgpsync-osx.py'],
['gpgsync-osx.py'],
pathex=['.'],
binaries=None,
datas=[('../share/*', 'share')],
Expand All @@ -26,7 +26,7 @@ exe = EXE(
pyz,
a.scripts,
exclude_binaries=True,
name='pgpsync',
name='gpgsync',
debug=False,
strip=False,
upx=True,
Expand All @@ -39,13 +39,13 @@ coll = COLLECT(
a.datas,
strip=False,
upx=True,
name='pgpsync')
name='gpgsync')

app = BUNDLE(
coll,
name='PGP Sync.app',
icon='install/pgpsync.icns',
bundle_identifier='org.firstlook.pgpsync',
name='GPG Sync.app',
icon='install/gpgsync.icns',
bundle_identifier='org.firstlook.gpgsync',
info_plist={
'LSUIElement': 'True',
'NSHighResolutionCapable': 'True',
Expand Down
Loading

0 comments on commit 1a6dbf1

Please sign in to comment.