From 02c683d20863f9ad378cbd24bfbb569ffde28c1e Mon Sep 17 00:00:00 2001 From: s3lph Date: Fri, 17 Feb 2023 02:10:24 +0100 Subject: [PATCH] Reenable pysequoia --- README.md | 2 +- benchmark_sign_encrypt.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3ca10d6..cba8389 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Install the following dependencies: - gpg - PGPy - sequoia (sqop binary) - +- pysequoia Then run: diff --git a/benchmark_sign_encrypt.py b/benchmark_sign_encrypt.py index a1e71ca..8422984 100755 --- a/benchmark_sign_encrypt.py +++ b/benchmark_sign_encrypt.py @@ -6,7 +6,7 @@ import string import gpg import subprocess from pgpy import PGPMessage, PGPKey, constants -#from pysequoia import Cert, Context +from pysequoia import Cert, Context from multiprocessing import Pool from tqdm import tqdm @@ -65,7 +65,6 @@ def pysq_worker(i): skey = None rkey = Cert.from_file(ENCRYPT_TO[1]) enc = ctx.encrypt(skey, rkey, msg) - print(enc) if __name__ == '__main__': @@ -85,12 +84,12 @@ if __name__ == '__main__': with Pool(K) as p: p.map(sqop_worker, range(K)) sqop_end = time.monotonic() - #pysq_start = time.monotonic() - #with Pool(K) as p: - # p.map(pysq_worker, range(K)) - #pysq_end = time.monotonic() + pysq_start = time.monotonic() + with Pool(K) as p: + p.map(pysq_worker, range(K)) + pysq_end = time.monotonic() print(f'GnuPG MH : {gpg_end - gpg_start}s') print(f'GnuPG SH : {gpg_single_end - gpg_single_start}s') print(f'PGPy : {pgpy_end - pgpy_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')