Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65557 > unrolled thread

ANN: A new version (0.3.6) of python-gnupg has been released.

Started byVinay Sajip <vinay_sajip@yahoo.co.uk>
First post2014-02-06 20:53 +0000
Last post2014-02-07 00:40 +0100
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  ANN: A new version (0.3.6) of python-gnupg has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2014-02-06 20:53 +0000
    Re: ANN: A new version (0.3.6) of python-gnupg has been released. Asaf Las <roegltd@gmail.com> - 2014-02-06 13:39 -0800
    Re: ANN: A new version (0.3.6) of python-gnupg has been released. Piet van Oostrum <piet@vanoostrum.org> - 2014-02-07 00:40 +0100

#65557 — ANN: A new version (0.3.6) of python-gnupg has been released.

FromVinay Sajip <vinay_sajip@yahoo.co.uk>
Date2014-02-06 20:53 +0000
SubjectANN: A new version (0.3.6) of python-gnupg has been released.
Message-ID<mailman.6459.1391720047.18130.python-list@python.org>
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=============
This is an enhancement and bug-fix release, but the bug-fixes
include some security improvements, so all users are encouraged
to upgrade. See the project website ( http://code.google.com/p/python-gnupg/ )
for more information. Summary:

Enabled fast random tests on gpg as well as gpg2.
Avoided deleting temporary file to preserve its permissions.
Avoided writing passphrase to log.
Added export-minimal and armor options when exporting keys.
Added verify_data() method to allow verification of signatures in memory.
Regularised end-of-line characters in ths source code.
Rectified problems with earlier fix for shell injection.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests.

What Does It Do?
================
The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) <gary.gr...@gamma.com>']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) <danny.da...@delta.com>']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-----END PGP MESSAGE-----\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.

[toc] | [next] | [standalone]


#65559

FromAsaf Las <roegltd@gmail.com>
Date2014-02-06 13:39 -0800
Message-ID<f5784744-e251-4cdf-abe8-a6e1fac2d7dc@googlegroups.com>
In reply to#65557
On Thursday, February 6, 2014 10:53:59 PM UTC+2, Vinay Sajip wrote:
> A new version of the Python module which wraps GnuPG has been
> released.
> Cheers
> 
> Vinay Sajip
> 
> Red Dove Consultants Ltd.

Hi

Good job!
 
One question - is this package runs executable when particular function 
must be invoked in GnuPG? library calls?

Regards

Asaf

[toc] | [prev] | [next] | [standalone]


#65564

FromPiet van Oostrum <piet@vanoostrum.org>
Date2014-02-07 00:40 +0100
Message-ID<m2y51ndd47.fsf@cochabamba.vanoostrum.org>
In reply to#65557
Vinay Sajip <vinay_sajip@yahoo.co.uk> writes:

> A new version of the Python module which wraps GnuPG has been
> released.
>
There seem to be 2 gnupg modules for Python. The other one has version number 1.2.5. Very confusing!
-- 
Piet van Oostrum <piet@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web