summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2009q4/000132.html
diff options
context:
space:
mode:
Diffstat (limited to 'pipermail/pycrypto/2009q4/000132.html')
-rw-r--r--pipermail/pycrypto/2009q4/000132.html113
1 files changed, 113 insertions, 0 deletions
diff --git a/pipermail/pycrypto/2009q4/000132.html b/pipermail/pycrypto/2009q4/000132.html
new file mode 100644
index 0000000..96dfca5
--- /dev/null
+++ b/pipermail/pycrypto/2009q4/000132.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [pycrypto] AES decrypting issues
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20AES%20decrypting%20issues&In-Reply-To=4ACCBC96.2000607%40co.marshall.ia.us">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="000131.html">
+ <LINK REL="Next" HREF="000133.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[pycrypto] AES decrypting issues</H1>
+ <B>Luke Teyssier</B>
+ <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20AES%20decrypting%20issues&In-Reply-To=4ACCBC96.2000607%40co.marshall.ia.us"
+ TITLE="[pycrypto] AES decrypting issues">luke at cryptography.com
+ </A><BR>
+ <I>Wed Oct 7 11:09:12 CST 2009</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000131.html">[pycrypto] AES decrypting issues
+</A></li>
+ <LI>Next message: <A HREF="000133.html">[pycrypto] AES decrypting issues
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#132">[ date ]</a>
+ <a href="thread.html#132">[ thread ]</a>
+ <a href="subject.html#132">[ subject ]</a>
+ <a href="author.html#132">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Does it decrypt with the PHP example?
+
+You might try encrypting/decrypting an example with Python, then
+decrypting the encrypted example with PHP to make sure you have the
+right configuration settings.
+
+It's also possible that the data was corrupted. Is there any kind of
+integrity check for the file?
+
+Luke
+
+Mike Driscoll wrote:
+&gt;<i> Hi,
+</I>&gt;<i>
+</I>&gt;<i> I am working on a project where I need to decrypt some data that has
+</I>&gt;<i> been encrypted with AES. Our webmaster gave me a PHP example that he
+</I>&gt;<i> uses, but I'm supposed to use Python. Here's the PHP code:
+</I>&gt;<i>
+</I>&gt;<i> $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
+</I>&gt;<i> $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
+</I>&gt;<i> return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key,
+</I>&gt;<i> $data,MCRYPT_MODE_ECB, $iv),&quot;\0&quot;);
+</I>&gt;<i>
+</I>&gt;<i> I've been told on c.l.py that the iv in this case should be 16 bytes.
+</I>&gt;<i>
+</I>&gt;<i> I tried following the example on this blog by modifying it as needed:
+</I>&gt;<i>
+</I>&gt;<i> <A HREF="http://www.codekoala.com/blog/2009/aes-encryption-python-using-pycrypto/">http://www.codekoala.com/blog/2009/aes-encryption-python-using-pycrypto/</A>
+</I>&gt;<i>
+</I>&gt;<i> But no matter which base64 decode method I use, I get some kind of
+</I>&gt;<i> error: b32decode, b64decode and decodestring all return a padding error
+</I>&gt;<i> whereas b16decode claims that I don't have only 16-bit characters in my
+</I>&gt;<i> data string.
+</I>&gt;<i>
+</I>&gt;<i> I've never done this before, so I'm not sure where I'm going wrong. Any
+</I>&gt;<i> advice would be appreciated. I'm on Windows XP with Python 2.5.
+</I>&gt;<i>
+</I>&gt;<i> Thanks,
+</I>&gt;<i>
+</I>&gt;<i> Mike
+</I>&gt;<i>
+</I>&gt;<i> _______________________________________________
+</I>&gt;<i> pycrypto mailing list
+</I>&gt;<i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
+</I>&gt;<i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
+</I>&gt;<i>
+</I>&gt;<i>
+</I>
+--
+Luke Teyssier
+Senior Staff Engineer
+Cryptography Research, Inc.
+575 Market St., 11th Floor
+San Francisco, CA 94105
+(415) 397-0123 x330 Direct
+<A HREF="http://www.cryptography.com">http://www.cryptography.com</A>
+
+</PRE>
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000131.html">[pycrypto] AES decrypting issues
+</A></li>
+ <LI>Next message: <A HREF="000133.html">[pycrypto] AES decrypting issues
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#132">[ date ]</a>
+ <a href="thread.html#132">[ thread ]</a>
+ <a href="subject.html#132">[ subject ]</a>
+ <a href="author.html#132">[ 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>