How can I add some new functionalities to the OpenSSL API in order to use the GPU for some cryptographic algorithms (AES, RSA, etc) written by me? I'd want, for example, to use the command openssl -engine cuda_engine genrsa -out rsa.key 1024
and the OpenSSL to use my genrsa
CUDA code instead of the original code. I have to mention that I want to do this on Windows 7 SP1, 64-bit. Even a dummy solution would be helpful because I need to understand the mechanism.
Asked
Active
Viewed 1,112 times
3

Dani Grosu
- 544
- 1
- 4
- 22
1 Answers
1
Heres a couple of in-depth posts written by an OpenSSL dev about building an engine.
Lesson 1: A Minimum Useless Engine
Lesson 2: An Example MD5 Engine
I would also recommend looking through the engines that are in the OpenSSL source tree.
You only need to recompile openssl if you dont have dynamic engine support enabled. Additonial info OpenSSL Wiki
For openssl app/library add to openssl.cnf.
openssl_conf = openssl_def
[openssl_def]
engines = engines_section
[engines_section]
silly = silly_section
[silly_section]
engine_id = silly
dynamic_path = /home/workingdir/silly_engine.dll
init = 0

x64architecture
- 399
- 1
- 7
-
Ok then. How can I add this engine to the configuration file and do I need to recompile the OpenSSL? Thanks – Dani Grosu Jan 15 '16 at 10:41
-
Second problem: I cannot create the dll file in visual studion 2012: `Error 1 error C2373: 'bind' : redefinition; different type modifiers` – Dani Grosu Jan 15 '16 at 21:01
-
1Use a different name for the bind function e.g. engbind. – x64architecture Jan 16 '16 at 00:38