1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [pycrypto] [problem]There's difference between pycrypto to crypt a string and cryptoPP to crypt a string with AES by CFB mode.
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20%5Bproblem%5DThere%27s%20difference%20between%20pycrypto%20to%0A%09crypt%20a%20string%20and%20cryptoPP%20to%20crypt%20a%20string%20with%20AES%20by%20CFB%20mode.&In-Reply-To=20091228083223.GA347%40rivest.dlitz.net">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000173.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[pycrypto] [problem]There's difference between pycrypto to crypt a string and cryptoPP to crypt a string with AES by CFB mode.</H1>
<B>ten speme</B>
<A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20%5Bproblem%5DThere%27s%20difference%20between%20pycrypto%20to%0A%09crypt%20a%20string%20and%20cryptoPP%20to%20crypt%20a%20string%20with%20AES%20by%20CFB%20mode.&In-Reply-To=20091228083223.GA347%40rivest.dlitz.net"
TITLE="[pycrypto] [problem]There's difference between pycrypto to crypt a string and cryptoPP to crypt a string with AES by CFB mode.">myspeme at gmail.com
</A><BR>
<I>Mon Dec 28 18:46:20 CST 2009</I>
<P><UL>
<LI>Previous message: <A HREF="000173.html">[pycrypto] [problem]There's difference between pycrypto to crypt a string and cryptoPP to crypt a string with AES by CFB mode.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#177">[ date ]</a>
<a href="thread.html#177">[ thread ]</a>
<a href="subject.html#177">[ subject ]</a>
<a href="author.html#177">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">dlitz at dlitz.net</A>>wrote:
><i> On Mon, Dec 28, 2009 at 02:19:06PM +0800, ten speme wrote:
</I>><i> >I using cryptoPP to crypt a string with key:"aaaaaaaaaaaaaaa"
</I>><i> >,iv:"bbbbbbbbbbbbbbbb",data"abcdefghijklmnopqrstuvwxyz", and its encrypted
</I>><i> >string is [hex]"9FE673D419DD3256B6A206FE7004660F11BAFCE5B2106E2BA39A"
</I>><i>
</I>><i> Please be careful when posting troubleshooting requests. "aaaaaaaaaaaaaaa"
</I>><i> is 15 bytes long, so it's impossible as an AES key. Can you post example
</I>><i> code that builds against cryptoPP (or uses pycryptopp) and produces this
</I>><i> result?
</I>><i>
</I>><i> >by pycrypto , I also using the same key, vi, and data. but get difference
</I>><i> >result:[hex]"78bf5fc7d6a87dd6533d028725cb206cf54dbca6e5ea9a852885".
</I>><i> >
</I>><i> >All these using AES with CFB mode.
</I>><i>
</I>><i> Which CFB mode are you talking about? CFB is a family of modes. You can
</I>><i> have e.g. 1-bit CFB, 8-bit CFB, 64-bit CFB, 128-bit CFB, etc. PyCrypto
</I>><i> defaults to 8-bit CFB, I believe, but will accept any multiple of 8 bits.
</I>><i> (It's set by the segment_size keyword argument to AES.new.)
</I>><i>
</I>><i> --
</I>><i> Dwayne C. Litzenberger <<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">dlitz at dlitz.net</A>>
</I>><i> Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
</I>><i> Annual key (2009) - C805 1746 397B 0202 2758 2821 58E0 894B 81D2 582E
</I>><i> _______________________________________________
</I>><i> pycrypto mailing list
</I>><i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>><i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>><i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20091229/17371e60/attachment.htm">http://lists.dlitz.net/pipermail/pycrypto/attachments/20091229/17371e60/attachment.htm</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000173.html">[pycrypto] [problem]There's difference between pycrypto to crypt a string and cryptoPP to crypt a string with AES by CFB mode.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#177">[ date ]</a>
<a href="thread.html#177">[ thread ]</a>
<a href="subject.html#177">[ subject ]</a>
<a href="author.html#177">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto
mailing list</a><br>
</body></html>
|