AES256 in PyCrypto

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sun Jan 7 05:30:54 EST 2007


In <1168134542.337448.261510 at s34g2000cwa.googlegroups.com>, mirandacascade
wrote:

> Would the following Python code perform AES256 encryption on plainText
> from Crypto.Cipher  import AES
> x = AES.new(a, AES.MODE_CBC, iv)
> x.encrypt(plainText)
> 
> assuming:
> a = the key value
> iv = an initialization vector
> ?

`a` must be of length 32 for AES256.  And the length of `plainText` must
be a multiple of 16 because it's a block cypher algorithm.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list