Pycrypto aes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Pycrypto aes

im try to write a program that encrypt txt file. i almost understand the concept of aes cryptography. what i know, aes can only encrypt 16 byte of data. i read something about padding. i not understand about that. im only kid.can someone help me? current little project: https://code.sololearn.com/cxdVwF5bVy2F/?ref=app

1st Sep 2017, 10:58 AM
Kevin AS
Kevin AS - avatar
3 Answers
+ 3
You want use ciphers like (AES, DES,3DES). These ciphers works with blocks of data. From that reason the input data (Data for encryption), means its length, has to in blocks which have particular lenght. Due to you have to add characters as an extra redundant data for to make entire block of data.This approach is called padding.
7th Sep 2017, 5:54 AM
Highman
Highman - avatar
+ 3
yes kevin,exactly.The length of data must by devided by 16 without remaining(%16 looks fine;))
19th Sep 2017, 5:14 AM
Highman
Highman - avatar
+ 1
oh my god, now make sense.thanx a lot. the point of padding is: we juzt need to add data so become data % 16 = 0
16th Sep 2017, 11:37 AM
Kevin AS
Kevin AS - avatar