This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Cryptographic library with really simple API.

Includes functions for hashes, symmetric and asymmetric crypto, along with helper functions. Acts as a wrapper for PyCrypto and a few standard libraries.

Documentation

Documentation is available at http://simplecrypto.readthedocs.org.

The full source code repository is at https://github.com/boppreh/simplecrypto.

Installation

pip install simplecrypto

This library depends on PyCrypto. On Linux this is installed automatically by pip. If the dependency installation fail on Windows, you may want to use a prebuilt installer. If you wish to compile it I suggest using the Mingw tools as indicated here.

Usage

from simplecrypto import sha1, encrypt, decrypt, RsaKeypair, base64

sha1('The quick brown fox jumps over the lazy dog')
# '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12'

# `encrypt` and `decrypt` use AES-256.
m = encrypt('secret message', 'secret key')
print(m)
# 'uRKa9xX7zW6QT1yJxIQb5E/0DzaxQglVggnFam5K'
decrypt(m, 'secret key')
# b'secret message'

skey = RsaKeypair(2048)
pkey = skey.publickey

m = pkey.encrypt('secret message')
skey.decrypt(m)
# b'secret message'

s = skey.sign('authenticated message')
pkey.verify('authenticated message', s)
# True

base64('message')
# 'bWVzc2FnZQ=='

Last Updates

0.3.3 (2015-8-07)

  • Package tests.

0.3.2 (2014-3-30)

  • Add HMAC support.
  • Use SHA256 as default RSA hash
  • Allow selection of PRNG used for RSA key generation
  • Minor changes for better Python2 support

0.3.1 (2013-12-06)

  • Add project to Travis and Coverall.
  • Increase test coverage to 100%.
  • Add installation instructions.
  • Rename guess_hash to guess_transformation.

0.3.0 (2013-12-05)

  • Add serialize to RSA keys.
  • Allow RSA keys to receive PEM encoded keys in the constructor.
  • Implement __repr__ method in base Key class (you can now print keys).
  • Split package into modules key, formats, hashes, random and exceptions.

0.2.3 (2013-12-05)

  • Update project information (keywords, classifiers, description, etc).

0.2.2 (2013-12-04)

  • Add send and receive functions for secure message building.
  • Raise EncryptionError instead of generic errors.
  • Slightly better test coverage.

0.2.1 (2013-12-03)

  • Add base Key class.
  • Introduce raw versions of encrypt and decrypt.
  • Implemented key printing and comparison.

0.2.0 (2013-12-03)

  • Return str from to_base64 and allow from_base64 to receive str.
  • Create classes for different key types.
  • Change return from to_hex to str for consistency with base64.
  • guess_hash function moved to different module.
  • Automatically use session keys when encrypting large messages.

0.1.0 (2013-11-26)

  • Initial release.
Release History

Release History

0.3.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
simplecrypto-0.3.3.zip (16.4 kB) Copy SHA256 Checksum SHA256 Source Aug 7, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting