Reenable pysequoia

This commit is contained in:
s3lph 2023-02-17 02:10:24 +01:00
parent e07b327434
commit 02c683d208
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5
2 changed files with 7 additions and 8 deletions

View file

@ -12,7 +12,7 @@ Install the following dependencies:
- gpg - gpg
- PGPy - PGPy
- sequoia (sqop binary) - sequoia (sqop binary)
<!-- - pysequoia --> - pysequoia
Then run: Then run:

View file

@ -6,7 +6,7 @@ import string
import gpg import gpg
import subprocess import subprocess
from pgpy import PGPMessage, PGPKey, constants from pgpy import PGPMessage, PGPKey, constants
#from pysequoia import Cert, Context from pysequoia import Cert, Context
from multiprocessing import Pool from multiprocessing import Pool
from tqdm import tqdm from tqdm import tqdm
@ -65,7 +65,6 @@ def pysq_worker(i):
skey = None skey = None
rkey = Cert.from_file(ENCRYPT_TO[1]) rkey = Cert.from_file(ENCRYPT_TO[1])
enc = ctx.encrypt(skey, rkey, msg) enc = ctx.encrypt(skey, rkey, msg)
print(enc)
if __name__ == '__main__': if __name__ == '__main__':
@ -85,12 +84,12 @@ if __name__ == '__main__':
with Pool(K) as p: with Pool(K) as p:
p.map(sqop_worker, range(K)) p.map(sqop_worker, range(K))
sqop_end = time.monotonic() sqop_end = time.monotonic()
#pysq_start = time.monotonic() pysq_start = time.monotonic()
#with Pool(K) as p: with Pool(K) as p:
# p.map(pysq_worker, range(K)) p.map(pysq_worker, range(K))
#pysq_end = time.monotonic() pysq_end = time.monotonic()
print(f'GnuPG MH : {gpg_end - gpg_start}s') print(f'GnuPG MH : {gpg_end - gpg_start}s')
print(f'GnuPG SH : {gpg_single_end - gpg_single_start}s') print(f'GnuPG SH : {gpg_single_end - gpg_single_start}s')
print(f'PGPy : {pgpy_end - pgpy_start}s') print(f'PGPy : {pgpy_end - pgpy_start}s')
print(f'sqop : {sqop_end - sqop_start}s') print(f'sqop : {sqop_end - sqop_start}s')
#print(f'pysequoia: {pysq_end - pysq_start}s') print(f'pysequoia: {pysq_end - pysq_start}s')