google / keyczar

Easy-to-use crypto toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support pycryptodome (pycrypto fork/continuation)

mgorny opened this issue · comments

Since pycrypto is long dead, it has been forked into pycryptodome and some projects have started to adapt it. The fork uses the same namespace (by default) and is partially compatible with pycrypto. However, it seems that keyczar is using some 'deprecated' APIs that are not supported by pycryptodome.

Running the tests with pycryptodome installed in place of pycrypto gives a number of errors for using the Crypto.PublicKey.RSA module, alike:

======================================================================
ERROR: testRsaDecrypt (crypter_test.PyCryptoCrypterTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/keyczar-0.715/work/python-keyczar-0.715/tests/keyczar_tests/crypter_test.py", line 301, in testRsaDecrypt
    self.__testDecrypt("rsa")
  File "/tmp/portage/dev-python/keyczar-0.715/work/python-keyczar-0.715/tests/keyczar_tests/crypter_test.py", line 100, in __testDecrypt
    active_decrypted = crypter.Decrypt(active_ciphertext)
  File "/tmp/portage/dev-python/keyczar-0.715/work/python-keyczar-0.715-python2_7/lib/keyczar/keyczar.py", line 537, in Decrypt
    return key.Decrypt(data_bytes)
  File "/tmp/portage/dev-python/keyczar-0.715/work/python-keyczar-0.715-python2_7/lib/keyczar/keys.py", line 838, in Decrypt
    decrypted = self.key.decrypt(ciph_bytes)
  File "/usr/lib64/python2.7/site-packages/Crypto/PublicKey/RSA.py", line 393, in decrypt
    raise NotImplementedError("Use module Crypto.Cipher.PKCS1_OAEP instead")
NotImplementedError: Use module Crypto.Cipher.PKCS1_OAEP instead

As of now, I'm having all sorts of trouble trying to install pycrypto is this a dead project?

pycrypto is dead since ~2013.