[pycrypto] Re: jibberish output with blowfish cbc
tannhauser
tannhauser at nerdshack.com
Sat Feb 14 13:59:04 CST 2009
okay,
another case, where i had to write to a list before i see my error.
if i see this right, when i decrypted, decrypt() had no idea what the iv is.
si, changing this solved my problem.
thanks anyway.
On Sat, 14.02, 20:37, tannhauser wrote:
> hello,
> i use the latest release of amk.ca, v2.0.1 and python 2.6.1.
> i have a problem when using blowfish with the cbc-mode.
> some example code:
> [code]
> #!/usr/bin/env python
> from Crypto.Cipher import Blowfish
> key = 'xyz123'
> iv = 'aaaaaaaa'
> obj = Blowfish.new(key, Blowfish.MODE_CBC, iv)
> # use misspelling as padding technique
> plain = 'yet another test sentenc'
> #encrypt
> ciph = obj.encrypt(plain)
> # decrypt
> plain = obj.decrypt(ciph)
> print plain
> [/code]
> obviously, "print plain" should give me "yet another test sentenc"
> well, it does not, instead the first 8 characters are something
> jibberish, the rest is ok: "ڦ¼obf²her test sentenc". i don't have that
> problem with MODE_ECB.
> any ideas?
> th
> _______________________________________________
> pycrypto mailing list
> pycrypto at lists.dlitz.net
> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
---end quoted text---
More information about the pycrypto
mailing list