[openssl-dev] Add a new algorithm in "crypto" dir, how to add the source code into the build system

Richard Levitte levitte at openssl.org
Thu Dec 22 21:20:53 UTC 2016


In message <936BE946F26E274A8595DBF91A05BD767C4FAA87 at SHSMSX101.ccr.corp.intel.com> on Thu, 22 Dec 2016 13:12:36 +0000, "Wei, Changzheng" <changzheng.wei at intel.com> said:

changzheng.wei> Hi,
changzheng.wei> 
changzheng.wei> I want to implement some new algorithm. To make my future work
changzheng.wei> smoothly, I want to add a new algorithm method like “RSA_METHOD” in
changzheng.wei> OpenSSL framework so as to I can use an “engine” to support such
changzheng.wei> algorithm.
changzheng.wei> 
changzheng.wei> So I add a new subdir in “crypto” and implement the code and
changzheng.wei> build.info refer to “crypto/rsa”.
changzheng.wei> 
changzheng.wei> My question is how to add my new source code into the build system?

A note here: if you're implementing a new algo, OpenSSL doesn't need
to know anything at all, everything can be added dynamically from the
engine and be reachable through the EVP API.

The only exception for now is the code in libssl.

May I suggest you have a look at the GOST engine?  It does implement
the algorithm entirely in the engine.  The only things added in the
OpenSSL code are the OIDs (not strictly necessary) and the TLS
ciphersuites (I don't think that can be done dynamically at all, at
least yet).

https://github.com/gost-engine/engine

Cheers,
Richard

-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-dev mailing list