diff options
Diffstat (limited to 'pipermail/pycrypto/2011q1/000408.html')
-rw-r--r-- | pipermail/pycrypto/2011q1/000408.html | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/pipermail/pycrypto/2011q1/000408.html b/pipermail/pycrypto/2011q1/000408.html new file mode 100644 index 0000000..57896f1 --- /dev/null +++ b/pipermail/pycrypto/2011q1/000408.html @@ -0,0 +1,129 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [pycrypto] Initial review of Thorsten's Py3k changes + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Initial%20review%20of%20Thorsten%27s%20Py3k%20changes&In-Reply-To=AANLkTi%3DH6c1Z5g1-pjicz%3D29%2B6Ot69MUxoSOSZfhiW7U%40mail.gmail.com"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000407.html"> + <LINK REL="Next" HREF="000414.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[pycrypto] Initial review of Thorsten's Py3k changes</H1> + <B>Thorsten Behrens</B> + <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Initial%20review%20of%20Thorsten%27s%20Py3k%20changes&In-Reply-To=AANLkTi%3DH6c1Z5g1-pjicz%3D29%2B6Ot69MUxoSOSZfhiW7U%40mail.gmail.com" + TITLE="[pycrypto] Initial review of Thorsten's Py3k changes">sbehrens at gmx.li + </A><BR> + <I>Wed Jan 19 09:27:01 CST 2011</I> + <P><UL> + <LI>Previous message: <A HREF="000407.html">[pycrypto] Initial review of Thorsten's Py3k changes +</A></li> + <LI>Next message: <A HREF="000414.html">[pycrypto] Initial review of Thorsten's Py3k changes +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#408">[ date ]</a> + <a href="thread.html#408">[ thread ]</a> + <a href="subject.html#408">[ subject ]</a> + <a href="author.html#408">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Yes, something like that would work. That's a good idea. + +I'm happy to make that change. Just waiting on Dwayne to come back on +whether he wants me to scrap my repository and redo it (so he has one +big commit), and then whether he'd rather have the b() wrapping done the +way you suggest. + +I also have a small change to the blowfish unit test. I added the CBC +vector. + +Thorsten + +On 1/19/2011 5:26 AM, Legrandin wrote: +><i> I am not sure if I grasp all new stuff in Python 3, but would it possible to +</I>><i> keep the test vectors as they are, and possibly change the encoding at runtime? +</I>><i> +</I>><i> For instance, in test_AES.py, we have: +</I>><i> +</I>><i> test_data = [ +</I>><i> ... +</I>><i> ( '00112233445566778899aabbccddeeff', 'dda97ca4864cdfe06eaf70a0ec0d7191', +</I>><i> '000102030405060708090a0b0c0d0e0f1011121314151617', +</I>><i> 'FIPS 197 C.2 (AES-192)' ), +</I>><i> ... ] +</I>><i> +</I>><i> The proposed change wraps each string but the last one with b(). +</I>><i> +</I>><i> Instead of changing the test vector line, we could have a separate +</I>><i> piece of code that dynamically +</I>><i> adjusts a tuple in the list in case python 3 is detected. +</I>><i> +</I>><i> Something along these lines, but possibly more pythonic: +</I>><i> +</I>><i> if python_version>2: +</I>><i> for t in test_data: +</I>><i> idx = test_data.index(t) +</I>><i> newt = tuple(b(t[0), b(t[1]), b(t[2]), t[3]) +</I>><i> test_data[idx] = newt +</I>><i> +</I>><i> +</I>><i> 2011/1/11 Thorsten Behrens<<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">sbehrens at gmx.li</A>>: +</I>>><i> Dwayne, +</I>>><i> +</I>>><i> upon further thought, how would the following work for you to address +</I>>><i> your concerns: +</I>>><i> +</I>>><i> - b('something') vs 'something': Leave literals encased in b(). To +</I>>><i> assure that no malicious changes have been made, use a 30-day trial +</I>>><i> version of Beyond Compare 3, which will, in it's "Text Compare" +</I>>><i> function, highlight the exact changes on each line. It exists for Linux +</I>>><i> and Windows. vimdiff may work just as well, of course. +</I>>><i> <A HREF="http://www.scootersoftware.com/download.php">http://www.scootersoftware.com/download.php</A> +</I>>><i> +</I>>><i> - Multiple commits, too much "history of work", not enough "this is the +</I>>><i> change": Would you like me to create a py3kmk2 branch, and have a single +</I>>><i> commit in it with all the changes made? +</I>>><i> I don't think I am going to be very successful with rebase. +</I>>><i> +</I>>><i> Yours +</I>>><i> Thorsten +</I>>><i> +</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>><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> +</PRE> + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000407.html">[pycrypto] Initial review of Thorsten's Py3k changes +</A></li> + <LI>Next message: <A HREF="000414.html">[pycrypto] Initial review of Thorsten's Py3k changes +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#408">[ date ]</a> + <a href="thread.html#408">[ thread ]</a> + <a href="subject.html#408">[ subject ]</a> + <a href="author.html#408">[ 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> |