AES/Python, an implementation of AES in Python with examples of counter mode operations and encryption (with authentication) with PCBC (block-chaining)

The implementation of AES in this software follows the pseudo-code in FIPS-197 very closely and neglects all feasible optimization tricks so as to maximize the readability and hence ease of verification which is obviously very essential for gaining users' trust nowadays in any IT-security software in general.

The softwaare also includes a function to generate pseudo-random byte sequences with AES in counter mode and a function to encrypt an arbitrarily long 16-byte block sequence according to PCBC (block-chaining), paired with a function to decrypt.

PCBC works analogously to CBC with the difference that, instead of employing the ciphertext of the immediately previous block to xor with the plaintext of the current block, one employs a certain suitable (nonlinear) accumulated value of all previous plaintext and ciphertext blocks. Since at the end of processing the last chaining value can be used as a superior integrity check, PCBC is a one-pass encryption processing with integrity check.

The software is available at:

formatting link

M. K. Shen

Reply to
Mok-Kong Shen
Loading thread data ...

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.