Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict when pycryptodome is installed (a requirement of poljar/weechat-matrix)) #139

Open
dngray opened this issue Sep 29, 2019 · 3 comments

Comments

@dngray
Copy link

dngray commented Sep 29, 2019

Hi,

I've noticed a conflict that seems to occur. When I install the requirements.txt for poljar/weechat-matrix I get this error when trying to run mmb/weechat-otr

python: stdout/stderr (otr): Versions: weechat-otr 1.9.2, potr 1.0.0-final, Python 3.7.4, WeeChat 2.6
python: stdout/stderr (otr): Traceback (most recent call last):
python: stdout/stderr (otr):   File "/home/dngray/.weechat/python/autoload/otr.py", line 1202, in message_in_cb
python: stdout/stderr (otr):     to_bytes(context.in_assembler.get()))
python: stdout/stderr (otr):   File "/usr/lib/python3.7/site-packages/potr/context.py", line 210, in receiveMessage
python: stdout/stderr (otr):     self.crypto.handleAKE(message, appdata=appdata)
python: stdout/stderr (otr):   File "/usr/lib/python3.7/site-packages/potr/crypt.py", line 288, in handleAKE
python: stdout/stderr (otr):     outMsg = self.ake.handleRevealSig(inMsg)
python: stdout/stderr (otr):   File "/usr/lib/python3.7/site-packages/potr/crypt.py", line 405, in handleRevealSig
python: stdout/stderr (otr):     gxmpi = AESCTR(self.r).decrypt(self.encgx)
python: stdout/stderr (otr):   File "/usr/lib/python3.7/site-packages/potr/compatcrypto/pycrypto.py", line 51, in AESCTR
python: stdout/stderr (otr):     return Cipher.AES.new(key, Cipher.AES.MODE_CTR, counter=counter)
python: stdout/stderr (otr):   File "/home/dngray/.local/lib/python3.7/site-packages/Crypto/Cipher/AES.py", line 232, in new
python: stdout/stderr (otr):     return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
python: stdout/stderr (otr):   File "/home/dngray/.local/lib/python3.7/site-packages/Crypto/Cipher/__init__.py", line 79, in _create_cipher
python: stdout/stderr (otr):     return modes[mode](factory, **kwargs)
python: stdout/stderr (otr):   File "/home/dngray/.local/lib/python3.7/site-packages/Crypto/Cipher/_mode_ctr.py", line 366, in _create_ctr_cipher
python: stdout/stderr (otr):     _counter = dict(counter)
python: stdout/stderr (otr): TypeError: 'Counter' object is not iterable
python: error in function "message_in_cb"

When removing the offending library, weechat-otr works again. I am using python-potr from AUR. I do also have python-pycrypto installed.

I should also note it's more specifically poljar/matrix-nio matrix-nio (pip) that depends on Legrandin/pycryptodome, pycryptodome (pip).

@dngray
Copy link
Author

dngray commented Sep 29, 2019

Ugh. seems related python-otr/pure-python-otr#68

So the issue is poljar/weechat-matrix uses Legrandin/pycryptodome, and weechat-otr uses python-otr/pure-python-otr which depends on unmaintained dlitz/pycrypto (last commit in June 2014) and they are in conflict. Ie aur/python-pycrypto cannot be installed at the same time as community/python-pycryptodome.

Further dlitz/pycrypto was not written for python3.

@akiva
Copy link

akiva commented Dec 2, 2020

Any updates on this? Currently, pycrypto doesn't work with Python 3.8: module 'time' has no attribute 'clock'. Can we haz update?

@koolfy
Copy link
Collaborator

koolfy commented Jan 1, 2021

Work still being done albeit very slowly in issue python-otr/pure-python-otr#68 which is currently stuck on Legrandin/pycryptodome#414 (comment) which is not getting attention because I failed at communication.

It's not dead but I need help, I am really not efficient working on this alone and gathering the courage to spend an evening on it every 4 months :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants