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.<br><br><div class="gmail_quote">On Mon, Dec 28, 2009 at 4:32 PM, Dwayne C. Litzenberger <span dir="ltr"><<a href="mailto:dlitz@dlitz.net">dlitz@dlitz.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Mon, Dec 28, 2009 at 02:19:06PM +0800, ten speme wrote:<br>
>I using cryptoPP to crypt a string with key:"aaaaaaaaaaaaaaa"<br>
>,iv:"bbbbbbbbbbbbbbbb",data"abcdefghijklmnopqrstuvwxyz", and its encrypted<br>
>string is [hex]"9FE673D419DD3256B6A206FE7004660F11BAFCE5B2106E2BA39A"<br>
<br>
</div>Please be careful when posting troubleshooting requests. "aaaaaaaaaaaaaaa"<br>
is 15 bytes long, so it's impossible as an AES key. Can you post example<br>
code that builds against cryptoPP (or uses pycryptopp) and produces this<br>
result?<br>
<div class="im"><br>
>by pycrypto , I also using the same key, vi, and data. but get difference<br>
>result:[hex]"78bf5fc7d6a87dd6533d028725cb206cf54dbca6e5ea9a852885".<br>
><br>
>All these using AES with CFB mode.<br>
<br>
</div>Which CFB mode are you talking about? CFB is a family of modes. You can<br>
have e.g. 1-bit CFB, 8-bit CFB, 64-bit CFB, 128-bit CFB, etc. PyCrypto<br>
defaults to 8-bit CFB, I believe, but will accept any multiple of 8 bits.<br>
(It's set by the segment_size keyword argument to AES.new.)<br>
<div class="im"><br>
--<br>
Dwayne C. Litzenberger <<a href="mailto:dlitz@dlitz.net">dlitz@dlitz.net</a>><br>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7<br>
Annual key (2009) - C805 1746 397B 0202 2758 2821 58E0 894B 81D2 582E<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">pycrypto mailing list<br>
<a href="mailto:pycrypto@lists.dlitz.net">pycrypto@lists.dlitz.net</a><br>
<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto" target="_blank">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</a><br>
</div></div></blockquote></div><br>