Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other changes #34

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9eae571
migrate to python3
stokito Oct 1, 2023
72f73f3
migrate to GTK3
stokito Oct 1, 2023
88df004
core.py migrate dialog to GTK3
stokito Oct 1, 2023
52f075c
main.glade rollback control mask
stokito Oct 1, 2023
73a3459
core.py migrate window
stokito Oct 1, 2023
1b25070
core.py disable fonts
stokito Oct 1, 2023
608782a
cfg.py use assets from the current dir
stokito Oct 1, 2023
92ce2fd
shebang
stokito Oct 1, 2023
015f6ad
migrate colors
stokito Oct 1, 2023
2ccf454
fix bytes to str conversion
stokito Oct 1, 2023
4505dc1
Fix Font
stokito Oct 1, 2023
5748987
Fix prefs window
stokito Oct 1, 2023
fea1d3b
glade files: migrate to Gtk3
stokito Oct 1, 2023
2b82eed
README.md update
stokito Oct 1, 2023
38cc108
Automatically reformat
stokito Oct 24, 2023
84ffe87
Fix FILE_CHOOSER_CONFIRMATION_*
stokito Oct 24, 2023
607f90b
GPG now is anyway GPG2
stokito Oct 24, 2023
89e3ed9
core.py optimize
stokito Oct 24, 2023
147172f
core.py migrate GLib.IO_*
stokito Oct 24, 2023
25eef71
core.py remove ----
stokito Oct 28, 2023
4180a28
README.md simplify
stokito Oct 28, 2023
a5c785b
core.py fix PEP warnings
stokito Oct 28, 2023
85314de
crypt_interface.py fix PEP issues
stokito Oct 28, 2023
c9b4891
crypt_interface.py fix get_gpg_default_key()
stokito Oct 28, 2023
f6efab6
GPG_BINARY is always gpg
stokito Oct 28, 2023
cf47292
core.py gpg2
stokito Oct 28, 2023
b3cf5e7
fix_msgtxtview_color
stokito Oct 28, 2023
d6c5298
fix test_file_isbinary and negate to test_file_is_plain_text
stokito Oct 28, 2023
be2ae50
cleanup file headers
stokito Oct 28, 2023
5e9ab4c
Remove fixed bug with Drug and Drop
stokito Oct 28, 2023
dad7b10
README.md put Features first and remove Background
stokito Oct 28, 2023
6c4f142
v2.0.0
stokito Oct 28, 2023
950b52e
core.py simplify
stokito Oct 28, 2023
e367a5b
Remove undo/redo buttons
stokito Oct 28, 2023
e14f7e5
Remove opacity configuration
stokito Oct 28, 2023
c3b4cdf
#23 Recipients autocomplete
karelbilek Oct 28, 2023
2f96f9e
core.py simplify
stokito Oct 28, 2023
776dfd6
Add LICENSE.txt
stokito Oct 29, 2023
6a947ab
Add new icon
stokito Oct 29, 2023
b5d7824
rename modules to pyrite
stokito Oct 29, 2023
9c7713e
Load UI from /usr/share/pyrite/ but not for local
stokito Oct 29, 2023
4a0abda
simplify INSTALL
stokito Oct 29, 2023
23868cd
Add Makefile
stokito Oct 29, 2023
bf3b922
about.glade
stokito Oct 29, 2023
4b23994
pyrite.desktop
stokito Oct 29, 2023
54f56fe
Debianize
stokito Oct 29, 2023
5e6f4b2
README.md
stokito Oct 29, 2023
97e4d24
Debianize
stokito Oct 29, 2023
4618789
uninstall
stokito Oct 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions INSTALL

This file was deleted.

13 changes: 13 additions & 0 deletions INSTALL.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
mkdir -p "$DESTDIR/usr/share/pyrite/"
cp -r --preserve=mode,timestamps ui "$DESTDIR/usr/share/pyrite/"
mkdir -p "$DESTDIR/usr/lib/python3/dist-packages/"
cp -r --preserve=mode,timestamps pyrite "$DESTDIR/usr/lib/python3/dist-packages/"

# Copy desktop shortcut
mkdir -p "$DESTDIR/usr/share/applications"
cp --preserve=mode,timestamps pyrite.desktop "$DESTDIR/usr/share/applications"
mkdir -p "$DESTDIR/usr/share/icons/hicolor/scalable/apps/"
cp --preserve=mode,timestamps pyrite.svg "$DESTDIR/usr/share/icons/hicolor/scalable/apps/"
mkdir -p "$DESTDIR/usr/bin/"
install -m u=rwx,g=rx,o=rx ./pyrite.py "$DESTDIR/usr/bin/pyrite"
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
install:
DESTDIR=$(DESTDIR) ./INSTALL.sh
uninsall:
rm -rf "$(DESTDIR)/usr/share/pyrite/ui"
rm -rf "$(DESTDIR)/usr/lib/python3/dist-packages/pyrite"
rm -f "$(DESTDIR)/usr/share/applications/pyrite.desktop"
rm -f "$(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyrite.svg"
rm -f "$(DESTDIR)/usr/bin/pyrite"
117 changes: 49 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,68 @@ Pyrite - Python/GTK+ encryption/signing frontend for GnuPG and OpenSSL

![](http://b19.org/linux/pyrite/1enc_txt.png)

## FEATURES

FEDORA/RHEL7 INSTALLATION
-------------------------
There's an RPM (and yum repository) @ [people.redhat.com/rsawhill/rpms](http://people.redhat.com/rsawhill/rpms/). To configure it and install Pyrite, simply run the following as root:
Pyrite acts as a frontend for GnuPG, doing symmetric or asymmetric encrypting/decrypting, as well as signing and verifying.
Additionally, it can use OpenSSL for simple symmetric encryption/decryption.

Pyrite can operate on text input or can take input and output filenames (text or binary) to pass directly to the backend program (i.e., gpg or openssl).

As you can see from the screenshots, Pyrite can utilize virtually all the encrypting features of GnuPG -- you can mix and match passphrase & public-key encryption & signing with one file, just like gpg, which will require interacting with your gpg-agent.
Or you can keep it simple and just use a passphrase as a shared key, in which case gpg-agent is bypassed and you only have to type the passphrase once.

Also shown in the screenshots is a Sign/Verify mode, where you can choose between the three types of signing: normal (Pyrite calls it "embedded"), where a signed copy of the message is created; clearsign, where the message is wrapped with a plaintext ASCII sig; or detached-sign, where a separate sig file is created.

If you're operating directly on files (in sign or encrypt mode) instead of ASCII text in the Pyrite window, you can choose what kind of output you want -- ASCII-armored (base64-encoded) text or normal binary output.

Not shown in the screenshots is drag & drop. You can drag text files onto the Message area and they are loaded up and you can drag text or binary files onto the *Input File For Direct Operation* button to set that.

If you end up working on very large input, you'll get a chance to *really* see the progress bar + pause/cancel buttons.
At the moment the progress bar doesn't report actual progress (that's coming), but the buttons do what they advertise, pausing or canceling the backend processing.

To top it all off, everything is configurable.
There's a preferences dialog that lets you play with all the settings, from tweaking gpg verbosity to setting the default operating mode to choosing your favorite cipher to configuring font size/color and window opacity.

If you find yourself wondering about a particular feature, just hover your mouse over its widget -- there are detailed tooltips for everything.


## FEDORA/RHEL7 INSTALLATION
There's an RPM (and yum repository) @ [people.redhat.com/rsawhill/rpms](https://people.redhat.com/rsawhill/rpms/). To configure it and install Pyrite, simply run the following as root:

```
yum install http://people.redhat.com/rsawhill/rpms/latest-rsawaroha-release.rpm
yum install https://people.redhat.com/rsawhill/rpms/latest-rsawaroha-release.rpm
yum install pyrite
```

Requirements and package names:

- gtk2 >= v2.24: `gtk2`
- python2 >= v2.7: `python`
- pygtk: `pygtk2`
- gpg/openssl: `gnupg2` or `gnupg` or `openssl`

*As per above, Pyrite is not compatible with RHEL6.*
- GTK3: `gtk3`
- Python3: `python3`
- `python3-gi`, `python3-gi-cairo`
- PGP `gnupg` or OpenSSL `openssl`


DEBIAN/UBUNTU/OTHER LINUX INSTALLATION
--------------------------------------
There is a simple interactive shell installer. Before using it, ensure you have the following on your Linux system (Ubuntu package names):
## DEBIAN/UBUNTU/OTHER LINUX INSTALLATION

- gtk2 >= v2.24: `libgtk2.0-bin`
- python2 >= v2.7: `python`
- pygtk: `python-gtk2`
- gpg/openssl: `gnupg2` or (`gnupg` and `gnupg-agent`) or `openssl`
There is a simple interactive shell installer.

If requirements are met, clone the Pyrite repo with `git clone git://github.com/ryran/pyrite.git` **OR** [download a zip of the source](https://github.com/ryran/pyrite/archive/master.zip).
If requirements are met, clone the Pyrite repo with `git clone https://github.com/ryran/pyrite.git` **OR** [download a zip of the source](https://github.com/ryran/pyrite/archive/master.zip).

From the root source folder execute the interactive `INSTALL` script.


MORE SCREENSHOTS (v1.0.1):
-------------------------------
## MORE SCREENSHOTS (v1.0.1):

![](http://b19.org/linux/pyrite/2clearsign_txt.png)
![](http://b19.org/linux/pyrite/3enc_prog.png)
![](http://b19.org/linux/pyrite/4dec_txt.png)
![](http://b19.org/linux/pyrite/5openssl_txt.png)
![](http://b19.org/linux/pyrite/6prefs.png)

**`pyrite` command-line options:**

## `pyrite` command-line options
Type `pyrite --help`:
```
[rsaw:~]$ pyrite --help
usage: pyrite [-h] [-d | -t] [-e | -s] [-c] [-r RECIP] [-k KEYUID]
[-b {gpg,openssl}]
[INPUT]
Expand All @@ -75,48 +91,16 @@ optional arguments:
```


FEATURES
----------
Pyrite acts as a frontend for GnuPG, doing symmetric or asymmetric encrypting/decrypting, as well as signing and verifying. Additionally, it can use OpenSSL for simple symmetric encryption/decryption.

Pyrite can operate on text input or can take input and output filenames (text or binary) to pass directly to the backend program (i.e., gpg/gpg2 or openssl).

As you can see from the screenshots, Pyrite can utilize virtually all of the encrypting features of GnuPG -- you can mix and match passphrase & public-key encryption & signing with one file, just like gpg, which will require interacting with your gpg-agent. Or you can keep it simple and just use a passphrase as a shared key, in which case gpg-agent is bypassed and you only have to type the passphrase once.

Also shown in the screenshots is a Sign/Verify mode, where you can choose between the three types of signing: normal (Pyrite calls it "embedded"), where a signed copy of the message is created; clearsign, where the message is wrapped with a plaintext ASCII sig; or detached-sign, where a separate sig file is created.

If you're operating directly on files (in sign or encrypt mode) instead of ASCII text in the Pyrite window, you can choose what kind of output you want -- ASCII-armored (base64-encoded) text or normal binary output.

Not shown in the screenshots is drag & drop. You can drag text files onto the Message area and they are loaded up and you can drag text or binary files onto the *Input File For Direct Operation* button to set that.

If you end up working on very large input, you'll get a chance to *really* see the progress bar + pause/cancel buttons. At the moment the progress bar doesn't report actual progress (that's coming), but the buttons do what they advertise, pausing or canceling the backend processing.

To top it all off, everything is configurable. There's a preferences dialog that lets you play with all the settings, from tweaking gpg verbosity to setting the default operating mode to choosing your favorite cipher to configuring font size/color and window opacity.

If you find yourself wondering about a particular feature, just hover your mouse over its widget -- there are detailed tooltips for everything.

## BUGS and TODO

BUGS
----------
1) After launching Pyrite, the **first** drag/drop of a file onto the *Input File For Direct Operation* GtkFileChooserButton fails. After that the button works properly. I've been seeking out expertise on this weird bug but I haven't gotten anywhere. If you have any hints, hit me up, or check out [my post about it on stackoverflow](http://stackoverflow.com/questions/9047844/pygtk-troubles-with-drag-and-drop-file-to-gtkfilechooserbutton).

2) No undo. It wasn't a top priority at the beginning, but I think it's pretty essential for an application that basically contains a text editor to have an undo/redo stack. I'll do it eventually.


BACKGROUND
----------

The original goal of this project was to make symmetric {en,de}cryption more accessible and easy to use. While GPG rocks if you're comfortable on the commandline (for both symmetric & public-key), and there are GUI encryption options for public-key encryption (seahorse-plugins for nautilus being the best, in my opinion), there's not much out there for people who need to do the simplest kind of encryption -- with a shared passphrase.

After creating a few simple apps with BASH scripting, I decided it was time to learn Python. After the first few days I was in love.

Long story short, after a couple weeks of learning, I released my first version of this project in January 2012, quickly added public-key encryption, signing, & verifying, and have been improving it ever since. This being my first learning experience with GTK+, I have lots more to learn, but I'm damn proud of Pyrite.
- No undo. It wasn't a top priority at the beginning, but I think it's pretty essential for an application that basically contains a text editor to have an undo/redo stack. I'll do it eventually.
- Icons for encrypt, decrypt, sign, verify buttons, application
- Update notifications

PLEASE contact me (or [post a new issue on the tracker](/ryran/pyrite/issues)) with any suggestions, feedback, bug reports, or questions!


AUTHORS
-------
## AUTHORS

As far as direct contributions go, so far it's just me, [ryran](/ryran), aka rsaw, aka [Ryan Sawhill Aroha](http://b19.org).

Expand All @@ -125,8 +109,7 @@ The project could really use a little assistance from an artist -- it doesn't ha



LICENSE
-------
## LICENSE

Copyright (C) 2012, 2013 [Ryan Sawhill Aroha](http://b19.org)

Expand All @@ -138,19 +121,17 @@ the Free Software Foundation, either version 3 of the License, or
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License @[gnu.org/licenses/gpl.html](http://gnu.org/licenses/gpl.html>) for more details.


General Public License @[gnu.org/licenses/gpl.html](https://gnu.org/licenses/gpl.html>) for more details.


--------


Hmmmm. You're still here?

Oh. You must be wondering why the name [*Pyrite*](http://en.wikipedia.org/wiki/Pyrite), eh?
Oh. You must be wondering why the name [*Pyrite*](https://en.wikipedia.org/wiki/Pyrite), eh?

Well, I'll let my friend River--who came up with the name--explain it to you:
Well, I'll let my friend River who came up with the name explain it to you:

*"It should be 'Pyrite', because people think they are getting your data, but really it's just gibberish to them. Fool's gold."*
> It should be 'Pyrite', because people think they are getting your data, but really it's just gibberish to them.
> Fool's gold.

5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pyrite-crypt (2.0.0-1) stable; urgency=medium

* update to GTK3 and Python3

-- Sergey Ponomarev <stokito@gmail.com> Sun, 29 Oct 2020 00:00:00 +0000
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11
13 changes: 13 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Source: pyrite-crypt
Section: utils
Priority: optional
Maintainer: Sergey Ponomarev <stokito@gmail.com>
Build-Depends: debhelper (>=10)
Standards-Version: 4.1.4
Homepage: https://github.com/stokito/pyrite

Package: pyrite-crypt
Architecture: all
Depends: python3, python3-gi, python3-gi-cairo, gnupg, openssl
Description: Encryption/signing application
GUI frontend for GnuPG (gpg) encrypting, decrypting, signing, and verifying.
8 changes: 8 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pyrite-crypt
Source: https://github.com/stokito/pyrite

Files: *
Copyright: 2012 Ryan Sawhill Aroha
2023 Sergey Ponomarev
License: GPLv3
5 changes: 5 additions & 0 deletions debian/dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
usr/bin
usr/share/pyrite/
usr/lib/python3/dist-packages/
usr/share/applications
usr/share/icons/hicolor/scalable/apps/
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
DESTDIR=$(CURDIR) dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
Loading