Encrypt files and strings with AES and Pycrypto

preview_player
Показать описание
💻Don't Forget to Subscribe to my Channel! 🖥
------
Pycrypto is a collection of cryptographic modules for Python. It has secure hash functions and symmetric encryption algorithms. It has not been in development for quite some time and it’s kinda getting phased out. However, I think the interest stems from the ability to encrypt files with strong AES encryption using a password.

So that’s exactly what I’ll show you how to do in this video.

If you’re not sure what symmetric encryption is, or where it fits into the whole encryption framework, you can look at my original video on symmetric encryption, which gives a super quick and simple overview

First, we need to install the pycrypto library. This can be a bit tricky to install at times so best to run a pip3 list first to ensure that you do now have other conflicting encryption libraries installed. There are some know issues with Pycrypto and Pycryptodome for instance so that’s one you may need to remove if present.

The install is straightforward. I am using Python 3.8 here. I have it running on 3.6 and 3.7 as well.
Рекомендации по теме
Комментарии
Автор

hello sir i am getting this error
Object type <class 'str'> cannot be passed to C code

SaiRam-ydpx
Автор

When trying to add the file, I get an error message "[Errno 13] Permission denied:" Any ideas on why this is/ how to fix it?

cameronmann
Автор

What's the name of the program u start the video in?

noaprevilon
Автор

The iv value should be same for both encryption and decryption??

saravananaryan
Автор

How do I decrypt this in node js?. With a text it works but with a file it doesn't.

sebastianestrada
Автор

thank you for the video, but i tried the code and i got an error (ValueError: Data must be padded to 16 byte boundary in CBC mode)

nora
Автор

hello, i cannot install pycrypto for python 3.8

ВсеволодОвчинииков
Автор

I could not install pycrypto. can you help ?

oubaidas
Автор

This code is not running in Python 3.7 and upper. must be modified with unit64

MyDavidsen
Автор

hey why password is there? what purpose does it serve

bhawanasharma
Автор

I think that padding with spaces or any other predefined character is insecure.

pniavis
Автор

bro i had a problem with instaling pycrypto

ardiannewstar
Автор

Thanks so much. This was really helpful

judeleon
Автор

from Crypto.Cipher import AES
File "C:\Users\Lol\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\Crypto\__init__.py", line 35, in <module>
from StringIO import StringIO
ModuleNotFoundError: No module named 'StringIO'

...ok now i can burn my pc

maxxhiaro