Python Advanced Tutorial 10 - PyCrypto

preview_player
Показать описание
This is a tutorial on PyCrypto, looking at encrypting and decrypting files using AES-256. All Links and Slides will be in the description. Subscribe for more cool stuff!

If you like what you see be sure to subscribe and thumbs up!
Рекомендации по теме
Комментарии
Автор

what are you thinking about my encryption ( i only needed 5 lines) with no additional module. But it basicly gives each char a another number, so i would say it would be quiet easy to decode it. But if you always enter a different key to encode it it changes every time.


stew
Автор

How can you make the program output the AES encryption key once you've encrypted a file so you could send the file to someone and they could decrypt with the key you provide

JoshuaShope
Автор

Pls, Any way or module to find the relation between sets of combined numbers
Like a= 3198 "3^2 = 9 and 9-1 = 8 "
B= 2143 "2^2 = 4 and 4-1 = 3 "
A and b have a relation they was generated by same algorithme how to find whiche on ? Or to generat new numbers that have the same algorith ? Thank you

TOn-fxgr
Автор

is it possible to see other encryption types be done? like DNS? also if we use a mac how can we import the library into python?

mr.nissim
Автор

how do i use encryption in a python chat server / client based app on windows? any ideas the best way or can you make a tut on this please?

Автор

Do you have this python 3.4? trying to change it but get
TypeError: Unicode-objects must be encoded before hasing

lancebermudez
Автор

Encrypting the file is okay, but when I try decrypting the same file. It keeps giving me valueError: input strings must be a multiple of 16 in length..

Am using windows 10

Pls help..

Only the decryption keeps giving me issues.

jerryseyi
Автор

I have a question ? sha 256 produce 32 bytes of hash...but here i saw that sha 256 produce 16 byte of hash...Aes 256 need 256 bits of key so is there any wrong?

rifatalishaon
Автор

Sir, thanks for the amazing tutorial

What libraries i need to install??
Pls reply sir, 👍👍👍👍

I'm a very beginner to Python 😮😮👍👍👍👍👍

tamilnwords
Автор

By using PBC how we generate public key and secret key E and Dcrpty

Alikhan-eebs
Автор

Hello sir, what is the limit of file size for Encryption? Is no-limit?

erikandribudiman
Автор

I have a question. How can we remove automatically to "test.txt" when we finished encrypt ? Because even if we encrypted it we can show and edit test.txt.

ayazpoyraz
Автор

I tried copying and pasting the code, just to see if it would work. Does this not work for windows? I have all the right modules installed. Feedback is appreciated.

bornasimp
Автор

Sir kindly make a video to encrypt and decrypt message using elliptic curve cryptography with pycrpto. Also suggest how to use various curves of for digital signature

deepika
Автор

I encrypted a jpg and mp4 file with code given in the video.Then after decryption, i am not getting the original file. The code worked fine for png file.

vijayamurari
Автор

Good Evening Sir! very nice video. I am a sophomore in computer science, I tried to summarize your exercise but I encounter a problem at execution, here is what is displayed during execution, I hope to have a correction of the problem on your part. Thanks


Would you like to Encrypt(E) or Decrypt(D)?: E
File to encrypt: text.txt
Password: test
Traceback (most recent call last):
File "C:\Users\ninss\OneDrive\Bureau\essaiPratique\encrypt.py", line 74, in <module>
Main()
File "C:\Users\ninss\OneDrive\Bureau\essaiPratique\encrypt.py", line 61, in Main
encrypt(getKey(password), filename)
File "C:\Users\ninss\OneDrive\Bureau\essaiPratique\encrypt.py", line 51, in getKey
hasher = SHA256.new(password)
File "C:\Python\Python38-32\lib\site-packages\Cryptodome\Hash\SHA256.py", line 158, in new
return SHA256Hash().new(data)
File "C:\Python\Python38-32\lib\site-packages\Cryptodome\Hash\SHA256.py", line 145, in new
return SHA256Hash(data)
File "C:\Python\Python38-32\lib\site-packages\Cryptodome\Hash\SHA256.py", line 80, in __init__
self.update(data)
File "C:\Python\Python38-32\lib\site-packages\Cryptodome\Hash\SHA256.py", line 90, in update
c_uint8_ptr(data),
File "C:\Python\Python38-32\lib\site-packages\Cryptodome\Util\_raw_api.py", line 238, in c_uint8_ptr
raise TypeError("Object type %s cannot be passed to C code" % type(data))
TypeError: Object type <class 'str'> cannot be passed to C code

stephanepouho
Автор

Hi Draps, I have 3 questions: first, is it secure having password ( to access the file ) and the key in the actual compiled code to .exe with pyinstaller, I already erased it in the source. Second, is this code using CBC the most efficient, as far as I know IV is used, so it makes it secure, but is it the most secure there is, atleast for CBC method. Third, I'm using CBC method to completly destroy files, not leaving IV or the filesize, and also it causes somekind of I/O error, since I'm reading and encrypting in the same file, so it returns a 0 byte file, is it good for destroying files completly? Thanks Draps.

aleksasltu
Автор

dont know what i did but on the elif it wont let me use the filename and password variable, and option D goes displays No option selected. AND it wont encrypt without me removing the "(encrypted)" from the code...

josephsmith
Автор

I have a problem on line
from Crypto.Cipher
That module name not exist
So what can I do ?

yogeshkadu
Автор

why does it thinks my outputfile name is type string and not a type file keeps giving me str obj has no write method error
??? some please explain

regulus
visit shbcf.ru