Siamo nuovi nell'usare GPG e abbiamo un problema molto strano con la velocità di decrittazione quando utilizziamo i keypair RSA, che vengono generati utilizzando diversi strumenti (GPG per Windows, DidiSoft OpenPGP Library per .NET e SecureBlackbox).
Quindi abbiamo 3 coppie di chiavi pubbliche / private RSA che hanno le stesse proprietà (hash / compressione algo, cifrari) e la dimensione della chiave di 2048 bit e abbiamo ottenuto i seguenti risultati:
100 operazioni di decrittografia per ogni chiave privata / pubblica:
-
Tasti RSA generati da GPG per Windows:
DidiSoft: 90 ms / 1 decrittografia
SecureBlackbox: ~ 420 ms / 1 decrittazione -
Tasti RSA generati da DidiSoft lib:
DidiSoft: 38 ms / 1 decrittografia
SecureBlackbox: 40 ms / 1 decryption -
Chiavi RSA generate da SecureBlackbox lib:
DidiSoft: 39 ms / 1 decrittografia
SecureBlackbox: 39 ms / 1 decryption
Tutti i test utilizzano lo stesso codice C # con il solo nome file modificato per passare le chiavi pubbliche / private. Perché c'è una così grande differenza nel tempo di esecuzione e quale potrebbe essere la causa?
Passphrase: qwerty
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQENBFYP1skBCAC3CoaV+MiROdkvH6Ilcq/eXXV8ckteyp+urhKqCyyPRuKVcdb9
nIuC79b7xqrfx+SNWFiD2WVPtoD2NelPHe15mQjImKyYhBN9z79PiijtXHHB6hH6
Z6wkXyWUzLXAsySUKdFQc2lr+7vcVD/Oc4rUUuIYqpyTlZxiLlT3h73ta9S1wwJn
Q+6iPPd88Mc7cEUysghGmFDLmAIXSjwTxPSG234QDKyNFK4X8fP7BQ2Yp9v3yG81
zWeKFG0fOQgVa4ReWjq/OwC+WoirDFuwY610nrxjEO5HwSaniHEjSRcTbSGN8AmS
dOv9mjakQ1a0U/wFIUBOT9/DRQVgI8T56UW5ABEBAAG0KWdwZ3dpbmRvd3N0ZXN0
IDxncGd3aW5kb3dzdGVzdEBlbWFpbC5jb20+iQE5BBMBAgAjBQJWD9bJAhsDBwsJ
CAcDAgEGFQgCC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