commit 378c55f26a1b29d6a865da423a4303357200246e
parent a74edbc4d1e47ee6307500e2c69ec4660bad9771
Author: Cedric <cedric.zwahlen@students.bfh.ch>
Date: Mon, 15 Jan 2024 19:15:18 +0100
Comments
Diffstat:
8 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/.DS_Store b/.DS_Store
Binary files differ.
diff --git a/README b/README
@@ -1,3 +0,0 @@
-
-
-
diff --git a/README.md b/README.md
@@ -0,0 +1,22 @@
+lib-gpu-verify
+
+# Library
+## lib-gpu-verify
+This library provides facilities to verify RSA signatures on a devices GPU. It is designed to verify many signatures at once. By verifying signatures on the GPU instead of the CPU, the CPU is free to do other things, and verification may even be sped up.
+
+There are kernels for both 32 and 64 bit GPUs, and in case no GPU is available on a system, a CPU mode can be selected.
+# Executables
+## gpuvt-test
+To test your systems performance – whether your GPU can actually verify signatures quicker than your CPU – you can run this program.
+## lib-gpu-generate
+Generate a bunch of signatures and message pairs that the gpuvt-test program will verify.
+# Dependencies
+
+libgcrypt is required for cryptographic operations:
+https://www.gnupg.org/software/libgcrypt/index.html
+
+The gmp library is required for calculations on very large integers:
+apt install libgmp3-dev
+
+OpenCL drivers & headers:
+apt install ocl-icd-opencl-dev
diff --git a/lib-gpu-generate/README b/lib-gpu-generate/README
@@ -0,0 +1,5 @@
+Run make and run lib-gpu-generate to make public keys, signatures and message pairs that can be verified by gpuvt-test.
+
+The executable takes two arguments:
+The first specifies the amount of signatures to generate per public key.
+The second argument specifies the amount of public keys to generate.
+\ No newline at end of file
diff --git a/source/gpuvt-test.c b/source/gpuvt-test.c
@@ -238,7 +238,6 @@ int gpuvt_test(enum GPUV_VARIANT variant) {
pubks += 1;
-
struct gpuv_batch * batch = gpuv_prepare_batch();
int len;
@@ -258,7 +257,6 @@ int gpuvt_test(enum GPUV_VARIANT variant) {
unsigned long range = (pks[i] + 1) - (i == 0 ? 0 : (pks[i - 1] + 1));
- // inc & dec ref
size_t i_t;
struct gpuv_public_key * pub_key;
@@ -274,8 +272,6 @@ int gpuvt_test(enum GPUV_VARIANT variant) {
break;
}
-
-
for (int j = 0; j < range; j++) {
size_t o;
diff --git a/xcode/.DS_Store b/xcode/.DS_Store
Binary files differ.
diff --git a/xcode/lib-gpu-verify.xcodeproj/project.pbxproj b/xcode/lib-gpu-verify.xcodeproj/project.pbxproj
@@ -33,7 +33,7 @@
6ABC2E852B231E0400033B90 /* util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = util.h; path = ../source/util.h; sourceTree = "<group>"; };
6AC553272B2E17C800046AB7 /* gpuvt-test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "gpuvt-test.h"; path = "../source/gpuvt-test.h"; sourceTree = "<group>"; };
6AC553282B2E17C800046AB7 /* gpuvt-test.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "gpuvt-test.c"; path = "../source/gpuvt-test.c"; sourceTree = "<group>"; };
- 6AD715F92B5177AC0044FCB7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = ../README; sourceTree = "<group>"; };
+ 6AD715F92B5177AC0044FCB7 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
C3770EFC0E6F1138009A5A77 /* OpenCL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenCL.framework; path = /System/Library/Frameworks/OpenCL.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
@@ -83,7 +83,7 @@
6A9DF2222B4B418400E368BE /* universal.c */,
6ABC2E832B231DFF00033B90 /* util.c */,
6AC553282B2E17C800046AB7 /* gpuvt-test.c */,
- 6AD715F92B5177AC0044FCB7 /* README */,
+ 6AD715F92B5177AC0044FCB7 /* README.md */,
);
name = Sources;
sourceTree = "<group>";
diff --git a/xcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate b/xcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ.