[pycrypto] [problem]There's difference between pycrypto to crypt a string and cryptoPP to crypt a string with AES by CFB mode.

ten speme myspeme at gmail.com
Mon Dec 28 18:46:20 CST 2009


Thank you, I get the right answer. CryptoPP is default to 128 bit mode. and
I set it to be 8 bit mode and solved.

On Mon, Dec 28, 2009 at 4:32 PM, Dwayne C. Litzenberger <dlitz at dlitz.net>wrote:

> On Mon, Dec 28, 2009 at 02:19:06PM +0800, ten speme wrote:
> >I using cryptoPP to crypt a string with key:"aaaaaaaaaaaaaaa"
> >,iv:"bbbbbbbbbbbbbbbb",data"abcdefghijklmnopqrstuvwxyz", and its encrypted
> >string is [hex]"9FE673D419DD3256B6A206FE7004660F11BAFCE5B2106E2BA39A"
>
> Please be careful when posting troubleshooting requests.  "aaaaaaaaaaaaaaa"
> is 15 bytes long, so it's impossible as an AES key.  Can you post example
> code that builds against cryptoPP (or uses pycryptopp) and produces this
> result?
>
> >by pycrypto , I also using the same key, vi, and data. but get difference
> >result:[hex]"78bf5fc7d6a87dd6533d028725cb206cf54dbca6e5ea9a852885".
> >
> >All these using AES with CFB mode.
>
> Which CFB mode are you talking about?  CFB is a family of modes.  You can
> have e.g. 1-bit CFB, 8-bit CFB, 64-bit CFB, 128-bit CFB, etc.  PyCrypto
> defaults to 8-bit CFB, I believe, but will accept any multiple of 8 bits.
> (It's set by the segment_size keyword argument to AES.new.)
>
> --
> Dwayne C. Litzenberger <dlitz at dlitz.net>
>  Key-signing key   - 19E1 1FE8 B3CF F273 ED17  4A24 928C EC13 39C2 5CF7
>  Annual key (2009) - C805 1746 397B 0202 2758  2821 58E0 894B 81D2 582E
> _______________________________________________
> pycrypto mailing list
> pycrypto at lists.dlitz.net
> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dlitz.net/pipermail/pycrypto/attachments/20091229/17371e60/attachment.htm 


More information about the pycrypto mailing list