summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-08-23 15:51:49 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2020-08-23 15:51:49 +0200
commit57122c30f20da9a02b0fc8303bc5327babe83c69 (patch)
tree81c2a44c1839905737cc6a1edf5efa832c565acb
parentfc062e80eac254ea6866e573a11547039b292e69 (diff)
Add secp256r1, secp384r1 and secp521r1 to benchmark
-rw-r--r--benchmark/benchmark-implementation.lisp14
-rw-r--r--benchmark/benchmark.lisp9
2 files changed, 14 insertions, 9 deletions
diff --git a/benchmark/benchmark-implementation.lisp b/benchmark/benchmark-implementation.lisp
index a724837..9a622c8 100644
--- a/benchmark/benchmark-implementation.lisp
+++ b/benchmark/benchmark-implementation.lisp
@@ -112,9 +112,9 @@
(defun benchmark-diffie-hellman ()
(let ((speeds '()))
- (dolist (dh-name '(:curve25519 :curve448 :elgamal))
+ (dolist (dh-name '(:curve25519 :curve448 :elgamal :secp256r1 :secp384r1 :secp521r1))
(multiple-value-bind (private-key public-key)
- (if (member dh-name '(:curve25519 :curve448))
+ (if (member dh-name '(:curve25519 :curve448 :secp256r1 :secp384r1 :secp521r1))
(ironclad:generate-key-pair dh-name)
(ironclad:generate-key-pair dh-name :num-bits 2048))
(let ((speed (get-speed-ops (loop repeat *iterations*
@@ -135,8 +135,9 @@
(defun benchmark-signatures ()
(let ((speeds '())
(message (ironclad:random-data 20)))
- (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa))
- (let* ((private-key (if (member signature-name '(:ed25519 :ed448))
+ (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa
+ :secp256r1 :secp384r1 :secp521r1))
+ (let* ((private-key (if (member signature-name '(:ed25519 :ed448 :secp256r1 :secp384r1 :secp521r1))
(ironclad:generate-key-pair signature-name)
(ironclad:generate-key-pair signature-name :num-bits 2048)))
(speed (get-speed-ops (loop repeat *iterations*
@@ -147,9 +148,10 @@
(defun benchmark-verifications ()
(let ((speeds '())
(message (ironclad:random-data 20)))
- (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa))
+ (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa
+ :secp256r1 :secp384r1 :secp521r1))
(multiple-value-bind (private-key public-key)
- (if (member signature-name '(:ed25519 :ed448))
+ (if (member signature-name '(:ed25519 :ed448 :secp256r1 :secp384r1 :secp521r1))
(ironclad:generate-key-pair signature-name)
(ironclad:generate-key-pair signature-name :num-bits 2048))
(let* ((signature (ironclad:sign-message private-key message))
diff --git a/benchmark/benchmark.lisp b/benchmark/benchmark.lisp
index 7ffc8b8..a4414d8 100644
--- a/benchmark/benchmark.lisp
+++ b/benchmark/benchmark.lisp
@@ -158,7 +158,8 @@
(format file " ~10a |" lisp)))
(terpri file)
(format file "~a~%" line)
- (dolist (dh-name '(:curve25519 :curve448 :elgamal))
+ (dolist (dh-name '(:curve25519 :curve448 :elgamal
+ :secp256r1 :secp384r1 :secp521r1))
(format file "| ~14a |" dh-name)
(dolist (implementation *lisp-implementations*)
(let* ((lisp (car implementation))
@@ -205,7 +206,8 @@
(format file " ~10a |" lisp)))
(terpri file)
(format file "~a~%" line)
- (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa))
+ (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa
+ :secp256r1 :secp384r1 :secp521r1))
(format file "| ~14a |" signature-name)
(dolist (implementation *lisp-implementations*)
(let* ((lisp (car implementation))
@@ -229,7 +231,8 @@
(format file " ~10a |" lisp)))
(terpri file)
(format file "~a~%" line)
- (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa))
+ (dolist (signature-name '(:dsa :ed25519 :ed448 :elgamal :rsa
+ :secp256r1 :secp384r1 :secp521r1))
(format file "| ~14a |" signature-name)
(dolist (implementation *lisp-implementations*)
(let* ((lisp (car implementation))