To all who gave me some of their time.<div><br></div><div>I&#39;ve sorted the problem, it was how the IV was being fed into the byte array in AS3.</div><div><br></div><div>Thank you all for your help :)</div><div><br></div>
<div>Regards,</div><div>Joshua<br><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 1:49 PM, Joshua Strauss <span dir="ltr">&lt;<a href="mailto:joshua.a.strauss@gmail.com">joshua.a.strauss@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Legrandin,<div><br></div><div>I think you are on to something here. Removing the initialization vector from both pycrypto and as3crypto produces the same b64encoded output. I&#39;ve been playing around with different IV&#39;s but I can only get the output to match without the presence of an IV.</div>

<div><br></div><div>This does lead me to believe that the IV is the source of my problem but if anyone can think of a reason why this might not be, it would be helpful to know as I don&#39;t want to be on the wrong track.</div>

<div><br></div><div>I haven&#39;t done much coding at the byte level (I&#39;m mainly a web developer, and not seasoned by any means), I&#39;ll keep trucking from here I suppose.</div><div><br></div><div>Regards,</div><div>

Joshua</div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 1:15 PM, Legrandin <span dir="ltr">&lt;<a href="mailto:gooksankoo@hoiptorrow.mailexpire.com" target="_blank">gooksankoo@hoiptorrow.mailexpire.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>&gt;    var t_byAry:ByteArray = Hex.toArray( Hex.fromString( t_toEnc ) );<br>
&gt;    var t_key:ByteArray = Hex.toArray( Hex.fromString( &#39;Thisisthekey&#39; ) );<br>
&gt;    var t_cbc:CBCMode = new CBCMode( new BlowFishKey( t_key ), new NullPad );<br>
</div><div>&gt;    t_cbc.IV = Hex.toArray( &#39;30313233&#39; );<br>
&gt;    t_cbc.encrypt( t_byAry );<br>
&gt;    t_enc = Base64.encodeByteArray( t_byAry );<br>
<br>
</div><div>&gt;    &gt;&gt;&gt; from Crypto.Cipher import Blowfish<br>
&gt;    &gt;&gt;&gt; B = Blowfish.new( &#39;Thisisthekey&#39;, Blowfish.MODE_CBC, &#39;30313233&#39; )<br>
<br>
</div>Could it be that in you AS code your IV is 4 bytes (0x30,0x31,0x32,0x33)<br>
which t_cbc.encrypt() silently pads, whereas in the python code it is 8<br>
different bytes (0x33 for &#39;3&#39;, 0x30 for &#39;0&#39;, etc)?<br>
<font color="#888888"><br>
Legrandin<br>
</font><div><div></div><div><br>
_______________________________________________<br>
pycrypto mailing list<br>
<a href="mailto:pycrypto@lists.dlitz.net" target="_blank">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></div>
</div></div></blockquote></div><br></div>