I removed Python 2.7.5 and installed Python 2.7.3.  I got exactly the same
error.  I have no 64-bit tools installed, even though I run Win8.  My users
run a variety of systems from WinXP forward, so at this point I do not use
any 64-bit tools.

I get the error if I run cxneditor.py, click the 'Set Crypto Key' button and
type something in the box.  As soon as I hit OK I get the error.  I have not
selected any connection files, or done anything other than try to set the
key.  I'm usually pretty good at troubleshooting, but on this I am in over
my head.

As a test, I removed the Voidspace install of PyCrypto and used easy_install
to install it instead.  I saw some errors during the installation:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Users\Arnie_2>cxneditor
'cxneditor' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Arnie_2>clsd

C:\Users\Arnie_2>cd \skydrive\python\dabo\ide

C:\SkyDrive\python\Dabo\ide>ClassDesigner.py

C:\SkyDrive\python\Dabo\ide>cxneditor.py
Traceback (most recent call last):
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\ui\uiwx\dControlMi
xin.py", line 27, in _onWxHit
    self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\ui\uiwx\dPemMixin.
py", line 1084, in raiseEvent
    super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\lib\eventMixin.py"
, line 81, in raiseEvent
    bindingFunction(event)
  File "C:\SkyDrive\python\Dabo\ide\CxnEditor.py", line 244, in onSetCrypto
    self.Application.CryptoKey = key
  File "C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\dApp.py",
line 1388, in _setCryptoKey
    self._cryptoProvider = SimpleCrypt(key=val)
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\lib\SimpleCrypt.py
", line 48, in __init__
    self._cryptoProvider = DES3.new(self.__key, DES3.MODE_CBC)
  File "C:\Python27\lib\site-packages\Crypto\Cipher\DES3.py", line 114, in
new
    return DES3Cipher(key, *args, **kwargs)
  File "C:\Python27\lib\site-packages\Crypto\Cipher\DES3.py", line 76, in
__init__
    blockalgo.BlockAlgo.__init__(self, _DES3, key, *args, **kwargs)
  File "C:\Python27\lib\site-packages\Crypto\Cipher\blockalgo.py", line 141,
in __init__
    self._cipher = factory.new(key, *args, **kwargs)
ValueError: IV must be 8 bytes long

C:\SkyDrive\python\Dabo\ide>cxneditor.py
Traceback (most recent call last):
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\ui\uiwx\dControlMi
xin.py", line 27, in _onWxHit
    self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\ui\uiwx\dPemMixin.
py", line 1084, in raiseEvent
    super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\lib\eventMixin.py"
, line 81, in raiseEvent
    bindingFunction(event)
  File "C:\SkyDrive\python\Dabo\ide\CxnEditor.py", line 244, in onSetCrypto
    self.Application.CryptoKey = key
  File "C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\dApp.py",
line 1388, in _setCryptoKey
    self._cryptoProvider = SimpleCrypt(key=val)
  File
"C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\lib\SimpleCrypt.py
", line 48, in __init__
    self._cryptoProvider = DES3.new(self.__key, DES3.MODE_CBC)
  File "C:\Python27\lib\site-packages\Crypto\Cipher\DES3.py", line 114, in
new
    return DES3Cipher(key, *args, **kwargs)
  File "C:\Python27\lib\site-packages\Crypto\Cipher\DES3.py", line 76, in
__init__
    blockalgo.BlockAlgo.__init__(self, _DES3, key, *args, **kwargs)
  File "C:\Python27\lib\site-packages\Crypto\Cipher\blockalgo.py", line 141,
in __init__
    self._cipher = factory.new(key, *args, **kwargs)
ValueError: IV must be 8 bytes long
^C
C:\SkyDrive\python\Dabo\ide>cxneditor.py

C:\SkyDrive\python\Dabo\ide>easy_install pycrypto
Searching for pycrypto
Reading https://pypi.python.org/simple/pycrypto/
Best match: pycrypto 2.6
Downloading
https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.tar.gz#md5=8
8dad0a270d1fe83a39e0467a66a22bb
Processing pycrypto-2.6.tar.gz
Writing
c:\users\arnie_2\appdata\local\temp\easy_install-6ig7ec\pycrypto-2.6\setup.c
fg
Running pycrypto-2.6\setup.py -q bdist_egg --dist-dir
c:\users\arnie_2\appdata\local\temp\easy_install-6ig7ec\pycrypto-2.6\egg-dis
t-tmp-lqlfbg
warning: GMP or MPIR library not found; Not building
Crypto.PublicKey._fastmath.
winrand.c
   Creating library build\temp.win32-2.7\Release\src\winrandom.lib and
object build\temp.win32-2.7\Release\src\winrandom.exp
MD2.c
src/MD2.c(101) : warning C4018: '<' : signed/unsigned mismatch
src/MD2.c(141) : warning C4018: '<' : signed/unsigned mismatch
   Creating library build\temp.win32-2.7\Release\src\_MD2.lib and object
build\temp.win32-2.7\Release\src\_MD2.exp
MD4.c
   Creating library build\temp.win32-2.7\Release\src\_MD4.lib and object
build\temp.win32-2.7\Release\src\_MD4.exp
SHA256.c
   Creating library build\temp.win32-2.7\Release\src\_SHA256.lib and object
build\temp.win32-2.7\Release\src\_SHA256.exp
SHA224.c
   Creating library build\temp.win32-2.7\Release\src\_SHA224.lib and object
build\temp.win32-2.7\Release\src\_SHA224.exp
SHA384.c
c:\users\arnie_2\appdata\local\temp\easy_install-6ig7ec\pycrypto-2.6\src\has
h_SHA2_template.c(107) : warning C4244: '=' : conversion from 'sha2_word_t'
to 'int'
, possible loss of data
   Creating library build\temp.win32-2.7\Release\src\_SHA384.lib and object
build\temp.win32-2.7\Release\src\_SHA384.exp
SHA512.c
c:\users\arnie_2\appdata\local\temp\easy_install-6ig7ec\pycrypto-2.6\src\has
h_SHA2_template.c(107) : warning C4244: '=' : conversion from 'sha2_word_t'
to 'int'
, possible loss of data
   Creating library build\temp.win32-2.7\Release\src\_SHA512.lib and object
build\temp.win32-2.7\Release\src\_SHA512.exp
RIPEMD160.c
   Creating library build\temp.win32-2.7\Release\src\_RIPEMD160.lib and
object build\temp.win32-2.7\Release\src\_RIPEMD160.exp
AES.c
   Creating library build\temp.win32-2.7\Release\src\_AES.lib and object
build\temp.win32-2.7\Release\src\_AES.exp
ARC2.c
   Creating library build\temp.win32-2.7\Release\src\_ARC2.lib and object
build\temp.win32-2.7\Release\src\_ARC2.exp
Blowfish.c
   Creating library build\temp.win32-2.7\Release\src\_Blowfish.lib and
object build\temp.win32-2.7\Release\src\_Blowfish.exp
CAST.c
   Creating library build\temp.win32-2.7\Release\src\_CAST.lib and object
build\temp.win32-2.7\Release\src\_CAST.exp
DES.c
src/libtom/tomcrypt_cfg.h(26) : warning C4273: 'malloc' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(601) : see previous definition of 'malloc'
src/libtom/tomcrypt_cfg.h(27) : warning C4273: 'realloc' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(602) : see previous definition of 'realloc'
src/libtom/tomcrypt_cfg.h(28) : warning C4273: 'calloc' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(599) : see previous definition of 'calloc'
src/libtom/tomcrypt_cfg.h(29) : warning C4273: 'free' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(600) : see previous definition of 'free'
src/libtom/tomcrypt_cfg.h(31) : warning C4273: 'qsort' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(439) : see previous definition of 'qsort'
src/libtom/tomcrypt_cfg.h(35) : warning C4273: 'clock' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\time.h(174) : see previous definition of 'clock'
   Creating library build\temp.win32-2.7\Release\src\_DES.lib and object
build\temp.win32-2.7\Release\src\_DES.exp
DES3.c
src/libtom/tomcrypt_cfg.h(26) : warning C4273: 'malloc' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(601) : see previous definition of 'malloc'
src/libtom/tomcrypt_cfg.h(27) : warning C4273: 'realloc' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(602) : see previous definition of 'realloc'
src/libtom/tomcrypt_cfg.h(28) : warning C4273: 'calloc' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(599) : see previous definition of 'calloc'
src/libtom/tomcrypt_cfg.h(29) : warning C4273: 'free' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(600) : see previous definition of 'free'
src/libtom/tomcrypt_cfg.h(31) : warning C4273: 'qsort' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdlib.h(439) : see previous definition of 'qsort'
src/libtom/tomcrypt_cfg.h(35) : warning C4273: 'clock' : inconsistent dll
linkage
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\time.h(174) : see previous definition of 'clock'
   Creating library build\temp.win32-2.7\Release\src\_DES3.lib and object
build\temp.win32-2.7\Release\src\_DES3.exp
ARC4.c
   Creating library build\temp.win32-2.7\Release\src\_ARC4.lib and object
build\temp.win32-2.7\Release\src\_ARC4.exp
XOR.c
   Creating library build\temp.win32-2.7\Release\src\_XOR.lib and object
build\temp.win32-2.7\Release\src\_XOR.exp
strxor.c
   Creating library build\temp.win32-2.7\Release\src\strxor.lib and object
build\temp.win32-2.7\Release\src\strxor.exp
_counter.c
   Creating library build\temp.win32-2.7\Release\src\_counter.lib and object
build\temp.win32-2.7\Release\src\_counter.exp
zip_safe flag not set; analyzing archive contents...
Adding pycrypto 2.6 to easy-install.pth file

Installed c:\python27\lib\site-packages\pycrypto-2.6-py2.7-win32.egg
Processing dependencies for pycrypto
Finished processing dependencies for pycrypto

C:\SkyDrive\python\Dabo\ide>

Without PyCrypto, cxneditor.py does not show the Set Crypto Key button.
With it installed, using that button causes the crash.  Could the errors on
the install/compile of PyCrypto be related to this?

I switched back to the Voidspace install, no change.  Switched back to
Python 2.7.5, no change, all the error messages are identical.  What can I
do to help track this down?

Arnie


-----Original Message-----
From: Dabo-users [mailto:dabo-users-boun...@leafe.com] On Behalf Of Paul
McNett
Sent: Wednesday, August 14, 2013 7:55 AM
To: Dabo Users list
Subject: Re: [dabo-users] Using 'Set Crypto Key' in CxnEditor causes
ValueError: IV must be 8 bytes long

On 8/11/13 7:46 PM, Arnie Elkins wrote:
> Platform: Win
> Python Version: 2.7.5 on win32
> Dabo Version: 0.9.13
> UI Version: 2.8.12.1 on wxMSW
> 
> Running on Windows 8, using 32 bit tools.  PyCrypto 2.6 is installed 
> from the Windows installer on
http://www.voidspace.org.uk/python/modules.shtml .
> Run CxnEditor.py, click 'Set Crypto Key'.  No matter what I put in for 
> a key, I get the following:
> 
> C:\SkyDrive\python\Dabo\ide>cxneditor.py
> 
> Traceback (most recent call last):

[snip]

>   File "C:\Python27\lib\site-packages\Crypto\Cipher\blockalgo.py", 
> line 141, in __init__
> 
>     self._cipher = factory.new(key, *args, **kwargs)
> 
> ValueError: IV must be 8 bytes long
> 
> I first saw the error when trying to set 'app.CryptoKey' in a new app, 
> but I found that cxneditor.py gave the same problem, so I am pretty 
> certain it is not my code.  I don't know enough to pin down the problem.
Any ideas?
> Thanks!

This is certainly our problem, not yours. I haven't had the chance to move
beyond Python 2.7.3 yet - would you be able to try 2.7.3 instead of 2.7.5
just to see if the newer Python caused the problem?

The other thing that's on my mind is 32-bit versus 64-bit. It shouldn't
error out like you are seeing with either 32-bit or 64-bit, but keys
generated with 32-bit won't work on 64-bit, and vice-versa.

Paul

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/520b7e06.2010...@ulmcnett.com

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/012501ce9977$1e9c97e0$5bd5c7a0$@gmail.com

Reply via email to