PyCrypto 1.9a4 win32 bugs?

Mark Brady <[email protected]>
Newsgroups gmane.comp.python.cryptography
Organization Lycos Mail (http://www.mail.lycos.com:80)
Message-ID <[email protected]>
Hello. PyCrypto mostly works fine however I have come
across two problems.

System:
 Win2k sp2
 Python 2.2.1
 Mingw32 2.95.3-5
 Borland 5.5

RIPEMD will not compile under borland or Mingw32
(output from mingw32 at the end of this message).
When I comment out RIPEMD in setup.py Mingw32 can build everything else fine (I don't need it anyway). Borland still
fails (error on AES module which I need so I just using
the Mingw32 built version).

No access to VC++ so don't know if it would work.

When using PyCrypto everything else seems to work except
for Crypto.Util.randpool.RandomPool  where I get the
following error:

>>> from Crypto.Util.randpool import RandomPool
>>> rp = RandomPool()
>>> rp.stir()
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "Crypto\Util\randpool.py", line 100, in stir
    self.add_event()
  File "Crypto\Util\randpool.py", line 151, in add_event
    delta = self._noise()
  File "Crypto\Util\randpool.py", line 180, in _noise
    delta = (t - self._lastcounter)/self._ticksize*1e6
TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'

I also get that error when trying to add an event. _ticksize
always seems to be a NoneType and doesn't seem to get set.
This is not a major problem for me but it would be good to
have RandomPool working as I may need it in the future.

Here is the error from RIPEMD mingw32 compile:

E:\download-storage\d3\pyth\pycrypto-1.9a4.tar\pycrypto-1.9a4>python setup.py build --compiler=mingw
32
running build
running build_py
creating build
creating build\lib.win32-2.2
creating build\lib.win32-2.2\Crypto
copying .\test.py -> build\lib.win32-2.2\Crypto
copying .\__init__.py -> build\lib.win32-2.2\Crypto
creating build\lib.win32-2.2\Crypto\Hash
copying .\Hash\HMAC.py -> build\lib.win32-2.2\Crypto\Hash
copying .\Hash\MD5.py -> build\lib.win32-2.2\Crypto\Hash
copying .\Hash\SHA.py -> build\lib.win32-2.2\Crypto\Hash
copying .\Hash\__init__.py -> build\lib.win32-2.2\Crypto\Hash
creating build\lib.win32-2.2\Crypto\Cipher
copying .\Cipher\__init__.py -> build\lib.win32-2.2\Crypto\Cipher
creating build\lib.win32-2.2\Crypto\Util
copying .\Util\number.py -> build\lib.win32-2.2\Crypto\Util
copying .\Util\randpool.py -> build\lib.win32-2.2\Crypto\Util
copying .\Util\RFC1751.py -> build\lib.win32-2.2\Crypto\Util
copying .\Util\test.py -> build\lib.win32-2.2\Crypto\Util
copying .\Util\__init__.py -> build\lib.win32-2.2\Crypto\Util
creating build\lib.win32-2.2\Crypto\Protocol
copying .\Protocol\AllOrNothing.py -> build\lib.win32-2.2\Crypto\Protocol
copying .\Protocol\Chaffing.py -> build\lib.win32-2.2\Crypto\Protocol
copying .\Protocol\__init__.py -> build\lib.win32-2.2\Crypto\Protocol
creating build\lib.win32-2.2\Crypto\PublicKey
copying .\PublicKey\DSA.py -> build\lib.win32-2.2\Crypto\PublicKey
copying .\PublicKey\ElGamal.py -> build\lib.win32-2.2\Crypto\PublicKey
copying .\PublicKey\pubkey.py -> build\lib.win32-2.2\Crypto\PublicKey
copying .\PublicKey\qNEW.py -> build\lib.win32-2.2\Crypto\PublicKey
copying .\PublicKey\RSA.py -> build\lib.win32-2.2\Crypto\PublicKey
copying .\PublicKey\__init__.py -> build\lib.win32-2.2\Crypto\PublicKey
running build_ext
building 'Crypto.Hash.MD2' extension
creating build\temp.win32-2.2
creating build\temp.win32-2.2\Release
d:\mingw32\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -ID:\Python22\include -c src/MD2.c -o build
\temp.win32-2.2\Release\md2.o
writing build\temp.win32-2.2\Release\MD2.def
d:\mingw32\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\md2.o build\temp.wi
n32-2.2\Release\MD2.def -LD:\Python22\libs -lpython22 -o build\lib.win32-2.2\Crypto\Hash\MD2.pyd
building 'Crypto.Hash.MD4' extension
d:\mingw32\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -ID:\Python22\include -c src/MD4.c -o build
\temp.win32-2.2\Release\md4.o
writing build\temp.win32-2.2\Release\MD4.def
d:\mingw32\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\md4.o build\temp.wi
n32-2.2\Release\MD4.def -LD:\Python22\libs -lpython22 -o build\lib.win32-2.2\Crypto\Hash\MD4.pyd
building 'Crypto.Hash.RIPEMD' extension
d:\mingw32\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -ID:\Python22\include -c src/RIPEMD.c -o bu
ild\temp.win32-2.2\Release\ripemd.o
src/RIPEMD.c:102: warning: redefinition of `byte'
d:/mingw32/bin/../lib/gcc-lib/mingw32/2.95.3-5/../../../../include/rpcndr.h:46: warning: `byte' prev
iously declared here
src/RIPEMD.c:108: conflicting types for `LONG'
d:/mingw32/bin/../lib/gcc-lib/mingw32/2.95.3-5/../../../../include/winnt.h:46: previous declaration
of `LONG'
src/RIPEMD.c:110: warning: redefinition of `BYTE'
d:/mingw32/bin/../lib/gcc-lib/mingw32/2.95.3-5/../../../../include/windef.h:129: warning: `BYTE' pre
viously declared here
error: command 'gcc' failed with exit status 1

Regards,
Mark.


____________________________________________________________
Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS
http://www.mail.lycos.com/brandPage.shtml?pageId=plus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.