OpenSSL engine for use with SymCrypt cryptographic library
Перейти к файлу
Samuel Lee 55826d6ac9
When verifying RSA-PSS signature with auto-saltlen always fallback (#34)
+ Previously would only fallback for RSA keys, not specifically RSA-PSS
  keys
+ Add test cases for DigestSign/Verify with RSA-PSS
2022-01-19 14:41:13 +00:00
.vscode Initial commit 2021-05-26 16:08:02 -07:00
SslPlay When verifying RSA-PSS signature with auto-saltlen always fallback (#34) 2022-01-19 14:41:13 +00:00
SymCryptEngine When verifying RSA-PSS signature with auto-saltlen always fallback (#34) 2022-01-19 14:41:13 +00: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 Add list of supported algorithms to README 2021-12-15 11:21:15 -08:00
SECURITY.md Use CRLF in all files 2021-06-21 06:50:12 -07:00

README.md

SCOSSL - The SymCrypt engine for OpenSSL

The SymCrypt engine for OpenSSL (SCOSSL) 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 SCOSSL will direct OpenSSL API calls to the SymCrypt FIPS 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!

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.

Algorithms that will be routed to a FIPS certifiable SymCrypt module with this version

The following list is not necessarily exhaustive, and will be updated as more functionality is added to SCOSSL. Note that just because an algorithm is FIPS certifiable, does not mean it is recommended for use.

  • Key derivation
    • HKDF (SHA1, SHA2-256, SHA2-384, SHA2-512)
    • TLS 1.2 KDF (SHA1, SHA2-256, SHA2-384, SHA2-512)
  • Key Agreement
    • ECDH (P256, P384, P521)
    • Finite Field DH (ffdhe2048, ffdhe3072, ffdhe4096, modp2048, modp3072, modp4096)
  • Hashing
    • SHA-1
    • SHA2-256
    • SHA2-384
    • SHA2-512
  • Symmetric
    • AES (128, 192, 256)
      • CBC, CCM, ECB, GCM
  • Asymmetric
    • RSA (2048, 3072, 4096)
      • PKCS1, OAEP, PSS
    • ECDSA (P256, P384, P521)

Known cases where SCOSSL will fail rather than fallback to default OpenSSL

  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

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.