Skip to content
This repository has been archived by the owner on Aug 10, 2019. It is now read-only.

Incompatibility with python 2.7.12 #7

Closed
raccoon4me opened this issue Dec 8, 2016 · 2 comments
Closed

Incompatibility with python 2.7.12 #7

raccoon4me opened this issue Dec 8, 2016 · 2 comments

Comments

@raccoon4me
Copy link

raccoon4me commented Dec 8, 2016

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

@raccoon4me raccoon4me changed the title Incompatibility between python 2.7.9 and 2.7.12 Incompatibility with python 2.7.12 Dec 8, 2016
@nvie
Copy link
Owner

nvie commented Dec 8, 2016

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/

@nvie nvie closed this as completed Dec 8, 2016
@raccoon4me
Copy link
Author

Thanks for your return, i will check it out :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants