diff --git a/README.md b/README.md index e6f21479..4839065a 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,13 @@ Or on Debian: ``` bash sudo apt install -y \ - tor python3-pip python3-socks imagemagick \ - python3-numpy python3-setuptools python3-crypto \ + tor python3-socks imagemagick \ + python3-numpy python3-setuptools \ + python3-crypto python3-cryptodome \ python3-dateutil python3-pil.imagetk python3-idna \ python3-requests libimage-exiftool-perl certbot nginx -sudo pip3 install pycryptodome ``` -*Note*: A recent version of pycryptodome is needed because the packaged version does not include *pkcs1_15* within *Crypto.Signature* - ## Installation In the most common case you'll be using systemd to set up a daemon to run the server. diff --git a/httpsig.py b/httpsig.py index 47489799..f9bfb5af 100644 --- a/httpsig.py +++ b/httpsig.py @@ -9,10 +9,14 @@ __status__ = "Production" # see https://tools.ietf.org/html/draft-cavage-http-signatures-06 -from Crypto.PublicKey import RSA -from Crypto.Hash import SHA256 -#from Crypto.Signature import PKCS1_v1_5 -from Crypto.Signature import pkcs1_15 +from Cryptodome.PublicKey import RSA +from Cryptodome.Hash import SHA256 +from Cryptodome.Signature import pkcs1_15 + +#from Crypto.PublicKey import RSA +#from Crypto.Hash import SHA256 +##from Crypto.Signature import PKCS1_v1_5 +#from Crypto.Signature import pkcs1_15 from requests.auth import AuthBase import base64 import json diff --git a/person.py b/person.py index 40dc7cd9..197523b0 100644 --- a/person.py +++ b/person.py @@ -14,7 +14,8 @@ import subprocess import shutil from random import randint from pathlib import Path -from Crypto.PublicKey import RSA +from Cryptodome.PublicKey import RSA +#from Crypto.PublicKey import RSA from shutil import copyfile from webfinger import createWebfingerEndpoint from webfinger import storeWebfingerEndpoint diff --git a/tests.py b/tests.py index ef5cc85e..1b876e54 100644 --- a/tests.py +++ b/tests.py @@ -14,7 +14,8 @@ import json from time import gmtime, strftime from pprint import pprint from person import createPerson -from Crypto.Hash import SHA256 +from Cryptodome.Hash import SHA256 +#from Crypto.Hash import SHA256 from httpsig import signPostHeaders from httpsig import verifyPostHeaders from httpsig import messageContentDigest diff --git a/webfinger.py b/webfinger.py index 68871514..64037586 100644 --- a/webfinger.py +++ b/webfinger.py @@ -7,8 +7,10 @@ __email__ = "bob@freedombone.net" __status__ = "Production" import base64 -from Crypto.PublicKey import RSA -from Crypto.Util import number +from Cryptodome.PublicKey import RSA +from Cryptodome.Util import number +#from Crypto.PublicKey import RSA +#from Crypto.Util import number import requests import json import os diff --git a/website/index.html b/website/index.html index 16168baf..5d960530 100644 --- a/website/index.html +++ b/website/index.html @@ -1252,8 +1252,7 @@

You will need python version 3.7 or later.

On a Debian based system:

-

sudo apt install -y tor python3-pip python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-dateutil python3-pil.imagetk python3-idna python3-requests libimage-exiftool-perl certbot nginx

-

sudo pip3 install pycryptodome

+

sudo apt install -y tor python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-cryptodome python3-dateutil python3-pil.imagetk python3-idna python3-requests libimage-exiftool-perl certbot nginx