ошибка в модуле Crypto.Cipher.IDEA в python - PullRequest
0 голосов
/ 12 апреля 2019

Привет,

i am writing a code for auto discovery of IP within the network and then 
data transfer using the socket programming in python. I have read the RSA 
and want to implement in the code. i go through to the link where i got 
the code implementation and the whole code for server and client.
Here is the link where the code is:

<https://riptutorial.com/python/example/27170/client-side-implementation>
<https://riptutorial.com/python/example/27169/server-side-implementation>

There are two links and the setup for PyCrypto is.

*PyCrypto (Download Link: https://pypi.python.org/pypi/pycrypto )

*PyCryptoPlus (Download Link: https://github.com/doegox/python-cryptoplus )

Я попробовал это на raspberry pi и установил все необходимые модули, которые я написал выше, и запустил его с помощью командной строки следующим образом: python3 server.py но это дает мне некоторые ошибки, связанные с модулем.

Crypto.Cipher.IDEA isn't available. You're probably using the Debian 
pycrypto version. Install the original pycrypto for IDEA.
Traceback (most recent call last):
File "serverRsa.py", line 10, in <module>
from CryptoPlus.Cipher import IDEA
File "/home/pi/.local/lib/python3.5/site- 
packages/CryptoPlus/Cipher/IDEA.py", line 4, in <module>
import Crypto.Cipher.IDEA
ImportError: No module named 'Crypto.Cipher.IDEA'

Я попробовал это с помощью pip install PyCrypto и используя то же самое с pip3. и затем запустите тот же код, но произошла та же ошибка.

Actually problem statement is to auto discover of all the nearby ip's 
using the python programming , where i run the code on Raspberry Pi and 
make it as a hotspot and other Pi boards act as client. Now when the 
server found the client or discover them then it register them using some 
key or encryption method.

Мне просто нужен код, который передает какое-то сообщение клиенту, используя RSA, но кажется, что в коде есть ошибка. Кто-нибудь, пожалуйста, исправьте эту проблему.

1 Ответ

0 голосов
/ 12 апреля 2019

Crypto.Cipher не имеет атрибута с именем: IDEA .

import Crypto.Cipher.IDEA #won't work -_-

Возможно, вы ищете CryptoPlus:

import CryptoPlus.Cipher.IDEA 
...