Giter VIP home page Giter VIP logo

simpleaes's Introduction

DEPRECATED

Please use cryptography instead!

This project is pretty old and won't be maintained further. For much better (!) symmetric encryption, I advise to take a look at the cryptography package: it's super friendly!

Here's an API that offers the same simple API: https://cryptography.io/en/latest/fernet/

simpleaes's People

Contributors

nvie avatar whs avatar

Stargazers

 avatar Gray avatar Mutalisk avatar Alon Mazor avatar Periklis Gkolias avatar Mihai Idu avatar Rikiya Yamamoto avatar Slavko avatar Corentin Leruth avatar Esteban avatar Jop Roskam avatar Whats_in_name avatar Ramin Farajpour Cami avatar Helica avatar Zahead Rashidi avatar mohammad avatar Austin Riley avatar Toshiya Kawasaki avatar Mohanad Elsafty avatar Angus H. avatar Paul DeLong avatar Nathan Krantz-Fire avatar Kurt Keller avatar openinx avatar Trond Jakob Sjøvang avatar lambda avatar Ciro Cattuto avatar Marco Rabelo avatar 黎明 avatar Sven Freiberg avatar Hanning Kong avatar  avatar Lincoln Clarete avatar oliver avatar Robert Kristian Alm avatar Charlie Denton avatar Richard Zak avatar  avatar  avatar Joseph McWilliams avatar Jason Daniel Augustine Gilliland avatar Ben Roeder avatar Cal Leeming avatar Evan Hazlett avatar Karl Martino avatar Honza Pokorný avatar Mark Lavin avatar Kenneth Reitz avatar Aurélien Bombo avatar Alexander Knorr avatar  avatar Mark Steve Samson avatar C. Bess avatar Itay Neeman avatar

Watchers

 avatar Ciro Cattuto avatar James Cloos avatar Richard Zak avatar Everton Cardoso avatar  avatar Kurt Keller avatar Nathan Krantz-Fire avatar Mihai Idu avatar  avatar

simpleaes's Issues

THANK YOU!

Thank you for writing this very simple but highly effective module.. As much as I love Python and always will do, it's the lack of simple helpers like this that really annoy me. Good work! 👍

Use of OpenSSL command looks slow

We have been using SimpleAES and I noticed it was using a process to run OpenSSL to do the encryption. We noticed the encryption seeming slow so I created a quick benchmark to see how the speed of this compares to using pycrypto.

The results of the benchmark against the latest version of SimpleAES does not look good:

name rank runs mean sd timesBaseline
pycrypto aes 1 10 0.02799 0.004236 1.0
pycrypto blowfish 2 10 0.1362 0.01185 4.86693156086
simpleaes 3 10 6.488 0.228 231.818900462

Each of the above 30 runs were run in random, non-consecutive order by
benchmark v0.1.5 (http://jspi.es/benchmark) with Python 2.7.2
Darwin-12.3.0-x86_64 on 2013-05-29 09:47:26.

Running the same benchmark against SimpleAES==0.1 looks much better:

name rank runs mean sd timesBaseline
pycrypto aes 1 10 0.02647 0.0002615 1.0
simpleaes 2 10 0.08313 0.001742 3.14058289017
pycrypto blowfish 3 10 0.1234 0.001254 4.66106763515

Each of the above 30 runs were run in random, non-consecutive order by
benchmark v0.1.5 (http://jspi.es/benchmark) with Python 2.7.2
Darwin-12.3.0-x86_64 on 2013-05-29 09:45:26.

My suspicion is that it is not OpenSSL that is slow but the overhead of starting a new sub process to run OpenSSL is slower

Incompatibility with python 2.7.12

Hi, picture worth thousand word, so i'll try to be quick:

PYTHON 2.7.9

Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from SimpleAES import SimpleAES
aes = SimpleAES("isdefinitelynot4u2no")
aes.decrypt("U2FsdGVkX1+eUdcEgzX6WUVO0xmuShSzlHWHlZVoVC8=")
'codewie\n'

PYTHON 2.7.12

+Python 2.7.12 (default, Jun 29 2016, 08:57:23)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from SimpleAES import SimpleAES
aes = SimpleAES("isdefinitelynot4u2no")
aes.decrypt("U2FsdGVkX1+eUdcEgzX6WUVO0xmuShSzlHWHlZVoVC8=")
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/SimpleAES/init.py", line 71, in decrypt
raise DecryptionError('Could not decrypt.')
SimpleAES.exceptions.DecryptionError: Could not decrypt.

Adding the fact that we can't encrypt either

Python 2.7.12 (default, Jun 29 2016, 08:57:23)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from SimpleAES import SimpleAES
key = 'Some arbitrary bytestring.'
aes = SimpleAES(key)
aes.encrypt('My secret plaintext data')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/SimpleAES/init.py", line 54, in encrypt
raise EncryptionError('Could not encrypt.')
SimpleAES.exceptions.EncryptionError: Could not encrypt.

Could you have a look at it, you rely on pycrypto, so could it be this library that is failing?

Thanks and Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.