Use debian cryptodome package

main
Bob Mottram 2020-03-04 09:41:21 +00:00
parent d9d702ce6e
commit f6869f9308
6 changed files with 20 additions and 15 deletions

View File

@ -29,15 +29,13 @@ Or on Debian:
``` bash ``` bash
sudo apt install -y \ sudo apt install -y \
tor python3-pip python3-socks imagemagick \ tor python3-socks imagemagick \
python3-numpy python3-setuptools python3-crypto \ python3-numpy python3-setuptools \
python3-crypto python3-cryptodome \
python3-dateutil python3-pil.imagetk python3-idna \ python3-dateutil python3-pil.imagetk python3-idna \
python3-requests libimage-exiftool-perl certbot nginx 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 ## Installation
In the most common case you'll be using systemd to set up a daemon to run the server. In the most common case you'll be using systemd to set up a daemon to run the server.

View File

@ -9,10 +9,14 @@ __status__ = "Production"
# see https://tools.ietf.org/html/draft-cavage-http-signatures-06 # see https://tools.ietf.org/html/draft-cavage-http-signatures-06
from Crypto.PublicKey import RSA from Cryptodome.PublicKey import RSA
from Crypto.Hash import SHA256 from Cryptodome.Hash import SHA256
#from Crypto.Signature import PKCS1_v1_5 from Cryptodome.Signature import pkcs1_15
from Crypto.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 from requests.auth import AuthBase
import base64 import base64
import json import json

View File

@ -14,7 +14,8 @@ import subprocess
import shutil import shutil
from random import randint from random import randint
from pathlib import Path from pathlib import Path
from Crypto.PublicKey import RSA from Cryptodome.PublicKey import RSA
#from Crypto.PublicKey import RSA
from shutil import copyfile from shutil import copyfile
from webfinger import createWebfingerEndpoint from webfinger import createWebfingerEndpoint
from webfinger import storeWebfingerEndpoint from webfinger import storeWebfingerEndpoint

View File

@ -14,7 +14,8 @@ import json
from time import gmtime, strftime from time import gmtime, strftime
from pprint import pprint from pprint import pprint
from person import createPerson 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 signPostHeaders
from httpsig import verifyPostHeaders from httpsig import verifyPostHeaders
from httpsig import messageContentDigest from httpsig import messageContentDigest

View File

@ -7,8 +7,10 @@ __email__ = "bob@freedombone.net"
__status__ = "Production" __status__ = "Production"
import base64 import base64
from Crypto.PublicKey import RSA from Cryptodome.PublicKey import RSA
from Crypto.Util import number from Cryptodome.Util import number
#from Crypto.PublicKey import RSA
#from Crypto.Util import number
import requests import requests
import json import json
import os import os

View File

@ -1252,8 +1252,7 @@
<p class="intro">You will need python version 3.7 or later.</p> <p class="intro">You will need python version 3.7 or later.</p>
<p class="intro">On a Debian based system:</p> <p class="intro">On a Debian based system:</p>
<div class="shell"> <div class="shell">
<p>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</p> <p>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</p>
<p>sudo pip3 install pycryptodome</p>
</div> </div>
<p class="intro"> <p class="intro">