There are a number of Python modules using which we can perform AES encryption and decryption. But, in this article, we would try to implement the AES algorithm in a very simple and easy-to-understand way. AES is a block cipher. The input plaintext is divided into equal-sized blocks and the last block is padded. After that, each block is encrypted. In AES-128, the block size is 128-bit or 16 bytes. In this article, we would discuss how to implement AES-128 in Python.
In our previous article, we discussed AES Encryption and Decryption using the PyCryptodome module in Python. We also discussed how to implement PKCS#7 padding and unpadding in Python. In this article, we would first learn how to encrypt or decrypt a single block of plaintext or ciphertext using AES. And then, it will be easy to implement block cipher mode of operation in Python.
0 Comments