aes

Why my encrypt method doesn't work, encoding without string argument?

Why my encrypt method doesn't work, encoding without string argument? Question: I made a bin file without extension, and that file contain a text that is encrypted, the problem is that when I want to retrieve the text I get this error message Exception in Tkinter callback Traceback (most recent call last): File "C:Usersconitc11AppDataLocalProgramsPythonPython39libtkinter__init__.py", line …

Total answers: 1

Cant encrypt strings with special characters with pycrypto AES

Cant encrypt strings with special characters with pycrypto AES Question: Description I want to store people’s names in MySQL database. Because the data is sensitive information i want to encrypt it with AES. I am using PyCrypto AES module. The code that I am using is: class AESCipher(object): def __init__(self, key): self.bs = 64 self.key …

Total answers: 2

AES get different results by using the same key and iv to encrypt the same plaintext repeatedly

AES get different results by using the same key and iv to encrypt the same plaintext repeatedly Question: Here is my code: from Crypto.Cipher import AES import binascii def encrypt(secret_key, sign, raw): key = md5(secret_key).hexdigest()[::-2] iv = md5(sign).hexdigest()[::-2] raw += (16 – len(raw) % 16) * ” generator = AES.new(key, AES.MODE_CBC, IV=iv) #*********************************************** #Problems occur …

Total answers: 1

AES Java to Python

AES Java to Python Question: This is an AES encryption code I’ve gotten from a Java source. This bugs me, as the Cipher itself doesn’t use any initial vector in it’s initialization – thus I can’t seem to to the same thing in Python. Can anyone with a Java background help me understand what this …

Total answers: 3

How to decrypt OpenSSL AES-encrypted files in Python?

How to decrypt OpenSSL AES-encrypted files in Python? Question: OpenSSL provides a popular (but insecure – see below!) command line interface for AES encryption: openssl aes-256-cbc -salt -in filename -out filename.enc Python has support for AES in the shape of the PyCrypto package, but it only provides the tools. How to use Python/PyCrypto to decrypt …

Total answers: 7

Python unzip AES-128 encrypted file

Python unzip AES-128 encrypted file Question: Is there a way to decompress an AES-128 encrypte file directly with python, since ZipFile throws a Bad Password error. If i use 7zip it works, so the password is correct, but then again 7zip needs to be installed as a dependency. What i tried: from ZipFile import ZipFile …

Total answers: 3

Encrypting and Decrypting with python and nodejs

Encrypting and Decrypting with python and nodejs Question: I’m trying to encrypt some content in Python and decrypt it in a nodejs application. I’m struggling to get the two AES implementations to work together though. Here is where I am at. In node: var crypto = require(‘crypto’); var password = ‘aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa’; var input = ‘hello …

Total answers: 4

What (pure) Python library to use for AES 256 encryption?

What (pure) Python library to use for AES 256 encryption? Question: I am looking for a (preferably pure) python library to do AES 256 encryption and decryption. This library should support the CBC cipher mode and use PKCS7 padding according to the answer to an earlier question of mine. The library should at least work …

Total answers: 5