OpenSSL engine for use with SymCrypt cryptographic library
Перейти к файлу
Mitch Lindgren 72ae60d055 Set SCOSSL methods as default RSA/ECC methods 2022-01-06 09:26:24 -08:00
.vscode Initial commit 2021-05-26 16:08:02 -07:00
SslPlay Use SCOSSL_SUCCESS and SCOSSL_FAILURE in a few more places 2021-12-14 05:42:03 -08:00
SymCryptEngine Set SCOSSL methods as default RSA/ECC methods 2022-01-06 09:26:24 -08:00
cmake-toolchain Remove unnecessary march flags 2021-12-13 13:39:34 -08:00
.gitignore Use CRLF in all files 2021-06-21 06:50:12 -07:00
CMakeLists.txt Undo whitespace changes 2021-12-09 17:47:17 -08:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2021-04-30 16:18:34 -07:00
LICENSE Initial LICENSE commit 2021-04-30 16:18:34 -07:00
NOTICE Use CRLF in all files 2021-06-21 06:50:12 -07:00
README.md Introduce cmake-toolchain files for Linux AMD64 and ARM64 2021-09-22 06:28:07 -07:00
SECURITY.md Use CRLF in all files 2021-06-21 06:50:12 -07:00

README.md

SymCrypt Engine for OpenSSL

The SymCrypt Engine for OpenSSL allows the use of OpenSSL with SymCrypt as the provider for core cryptographic operations. It leverages the OpenSSL engine interface to override the cryptographic implementations in OpenSSL's libcrypto.so with SymCrypt's implementations. The primary motivation for this is to support FIPS certification, as vanilla OpenSSL 1.1.1 does not have a FIPS-certified cryptographic module.

Where possible the SymCrypt engine will direct OpenSSL API calls to the SymCrypt module. In cases where SymCrypt cannot (currently) support an OpenSSL API, the best effort is made to fall-back to the default OpenSSL implementation of the given function. In a few cases the engine will instead fail the call completely, as re-routing to OpenSSL's implementation is not always easy, and as with any project we have to prioritize!

The known cases where the Engine will currently fail rather than fallback to the default OpenSSL implementation are:

  1. Use of an AES-GCM IV which is not 12-bytes (192-bits)
  2. Use of unsupported digests in RSA signatures and TLS PRF
  3. Use of multi-prime (more than 2-prime) RSA

Important note: The code in this repository is currently undergoing validation for use in Microsoft-internal products. At this time, it has not been tested for use in other environments and should not be considered production-ready.

Building Instructions

Compilation Instructions

Prerequisite, need libssl installed to compile

Follow Linux build instructions from SymCrypt repository SymCrypt to build the Linux SymCrypt module.

cp <SymCryptRepo>/bin/module/<arch>/LinuxUserMode/<module_name>/libsymcrypt.so ./
mkdir bin; cd bin
cmake .. -DOPENSSL_ROOT_DIR=<OpensslInstallDirectory> -DCMAKE_TOOLCHAIN_FILE=../cmake-toolchain/LinuxUserMode-<arch>.cmake
cmake --build .

Run Samples

./SslPlay/SslPlay

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.