[Cryptech-Commits] [user/jakob/benchmark] 01/01: init

git at cryptech.is git at cryptech.is
Sat Jul 16 07:24:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

jakob at kirei.se pushed a commit to branch master
in repository user/jakob/benchmark.

commit 7b4209d744a7d469741ba43243b44978f1a73205
Author: Jakob Schlyter <jakob at kirei.se>
AuthorDate: Sat Jul 16 09:23:38 2016 +0200

    init
---
 README.md    |  7 +++++++
 benchmark.sh | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b44d38c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+# Cryptech Benchmark
+
+This repository contains benchmark code for Cryptech HSM.
+
+## Dependencies
+
+- https://github.com/opendnssec/p11speed
diff --git a/benchmark.sh b/benchmark.sh
new file mode 100644
index 0000000..682b00c
--- /dev/null
+++ b/benchmark.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+P11SPEED=p11speed
+MODULE=/usr/local/homebrew/lib/libcryptech-pkcs11.dylib
+
+# use pkcs11spy for testing
+export PKCS11SPY=$MODULE
+#export PKCS11SPY_OUTPUT=pkcs11spy.log
+MODULE=/Library/OpenSC/lib/pkcs11/pkcs11-spy.so
+
+SLOT=0
+USER_PIN=1234
+
+THREADS=2
+
+run_p11speed() {
+	$P11SPEED \
+		--sign \
+		--module $MODULE \
+		--slot $SLOT \
+		--threads $THREADS \
+		--pin $USER_PIN \
+		$@
+}
+
+run_p11speed --mechanism RSA_PKCS --keysize 1024 --iterations 40
+exit
+run_p11speed --mechanism RSA_PKCS --keysize 2048 --iterations 20
+run_p11speed --mechanism RSA_PKCS --keysize 4096 --iterations 10
+
+run_p11speed --mechanism DSA --keysize 1024 --iterations 40
+run_p11speed --mechanism DSA --keysize 2048 --iterations 20
+run_p11speed --mechanism DSA --keysize 4096 --iterations 10
+
+run_p11speed --mechanism ECDSA --keysize 256 --iterations 20
+run_p11speed --mechanism ECDSA --keysize 384 --iterations 10



More information about the Commits mailing list