<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mspncp</id>
	<title>OpenSSLWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mspncp"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php/Special:Contributions/Mspncp"/>
	<updated>2026-05-12T18:03:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=FIPS_module_2.0&amp;diff=3220</id>
		<title>FIPS module 2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_module_2.0&amp;diff=3220"/>
		<updated>2022-10-20T10:25:00Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: Fix broken CMVP links (fixup)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''OpenSSL FIPS Object Module 2.0'' was first validated with FIPS 140-2 certificate [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/1747 #1747] in mid-2012.  This 2.0 FIPS module is compatible with OpenSSL releases 1.0.1 and 1.0.2, and not with any other releases.&lt;br /&gt;
&lt;br /&gt;
There are two &amp;quot;clone&amp;quot; validations (known as &amp;quot;Alternative Scenario 1A&amp;quot; validations, also referred to as &amp;quot;re-brand&amp;quot; validations by some test labs) were obtained for the same module. The &amp;quot;RE&amp;quot; validation, [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2473 #2473], was intended to be identical to [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/1747 #1747] while allowing the addition of new platforms.  The &amp;quot;SE&amp;quot; validation, [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2398 #2398], was intended for the addition of platforms requiring source code mods and thus new revisions to the module tarball. The [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/1747 #1747] and [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2473 #2473] validations will forever remain at revision 2.0.10, while new revisions will be added to [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2398 #2398] (which is at 2.0.13 as of September 2016).&lt;br /&gt;
&lt;br /&gt;
Note that although the paperwork for the two clone validations #2398 and #2473 was submitted at the same time, and the two sets of paperwork were precisely identical other than the respective references to &amp;quot;RE&amp;quot; versus &amp;quot;SE&amp;quot; in the module names, they were approved at different times (July and November) with different editorial modifications required by the CMVP for the Security Policy documents. Such inconsistencies are common with FIPS 140-2 validations; the outcome from one validation effort is not necessarily predictive of what will happen for subsequent similar (or even identical) attempts.&lt;br /&gt;
&lt;br /&gt;
In addition to the three validations of the ''OpenSSL FIPS Object Module 2.0'' obtained directly by OpenSSL, some third party vendors have obtained additional &amp;quot;re-brand&amp;quot; validations of the same cryptographic module:&lt;br /&gt;
&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2676 #2676], Cohesity OpenSSL FIPS Object Module&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2631 #2631], Intel OpenSSL FIPS Object Module&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2575 #2575], Cellcrypt Secure Core 3 FIPS 140-2 Module&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2454 #2454], LogRhythm FIPS Object Module Version 6.3.4&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2422 #2422], Nimble Storage OpenSSL FIPS Object Module&lt;br /&gt;
&lt;br /&gt;
Note that while these clone validations have re-branded proprietary module names, they reference the original ''OpenSSL FIPS Object Module 2.0'' tarballs which are available under the open source OpenSSL license, and hence these validations can be used and cited by anyone.&lt;br /&gt;
&lt;br /&gt;
A list of formally tested platforms (&amp;quot;Operational Environments&amp;quot;) is associated with each validation. Collectively there are over two hundred unique platforms listed across all the ''OpenSSL FIPS Object Module 2.0'' validations:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Unique platforms across all ''OpenSSL FIPS Object Module 2.0'' validations as of 2016-09&lt;br /&gt;
|-&lt;br /&gt;
|AcanOS 1.0 running on Feroceon 88FR131 (ARMv5) (gcc Compiler Version 4.5.3)&lt;br /&gt;
|-&lt;br /&gt;
|AcanOS 1.0 running on Intel Core i7-3612QE (x86) with AES-NI (gcc Compiler Version 4.6.2)&lt;br /&gt;
|-&lt;br /&gt;
|AcanOS 1.0 running on Intel Core i7-3612QE (x86) without AES-NI (gcc Compiler Version 4.6.2)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 32-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 32-bit running on IBM POWER 7 (PPC) with optimizations (IBM XL C/C++ for AIX Compiler Version V10.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 64-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 64-bit running on IBM POWER 7 (PPC) with optimizations (IBM XL C/C++ for AIX Compiler Version V10.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 7.1 32-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 7.1 64-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 running on OMAP 3530 (ARMv7) with NEON (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 running on Qualcomm QSD8250 (ARMv7) with NEON (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 running on Qualcomm QSD8250 (ARMv7) without NEON (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 3.0 (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 3.0 running on NVIDIA Tegra 250 T20 (ARMv7) (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 (gcc Compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 running on NVIDIA Tegra 250 T20 (ARMv7) (gcc Compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 running on Qualcomm Snapdragon APQ8060 (ARMv7) with NEON (gcc compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 running on TI OMAP 3 (ARMv7) with NEON (gcc Compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.1 running on TI DM3730 (ARMv7) (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.1 running on TI DM3730 (ARMv7) with NEON (gcc Complier Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.1 running on TI DM3730 (ARMv7) without NEON (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) with Neon (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) with NEON (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) without NEON (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 32-bit running on Qualcomm APQ8084 (ARMv7) with NEON (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 32-bit running on Qualcomm APQ8084 (ARMv7) without NEON (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 64-bit running on SAMSUNG Exynos7420 (ARMv8) with NEON and Crypto Extensions (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 64-bit running on SAMSUNG Exynos7420 (ARMv8) without NEON and Crypto Extensions (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 5.0 running on ARM Cortex A8 (ARMv7) with NEON (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 5.1 (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 5.1 running on ARMv7 (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 6.1 running on Apple A6X SoC (ARMv7s) (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 7.1 64-bit running on Apple A7 (ARMv8) with NEON (clang Compiler Version 5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 7.1 64- bit running on Apple A7 (ARMv8) without NEON (clang Compiler Version 5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple OS X 10.7 running on Intel Core i7-3615QM (Apple LLVM version 4.2)&lt;br /&gt;
|-&lt;br /&gt;
|ArbOS 5.3 running on Xeon E5645 (x86) with AES-NI (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|ArbOS 5.3 running on Xeon E5645 (x86) without AES-NI (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (32 bit) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (32 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (64 bit) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (64 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CentOS 5.6 64-bit running on Intel Xeon E5-2620v3 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|CentOS 5.6 64-bit running on Intel Xeon E5-2690v3 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|DataGravity Discovery Series OS V2.0 running on Intel Xeon E5-2420 (x86) with AES-NI (gcc Compiler Version 4.7.2)&lt;br /&gt;
|-&lt;br /&gt;
|DataGravity Discovery Series OS V2.0 running on Intel Xeon E5-2420 (x86) without AES-NI (gcc Compiler Version 4.7.2)&lt;br /&gt;
|-&lt;br /&gt;
|DSP Media Framework 1.4 running on TI C64x+ (TMS320C6x C/C++ Compiler v6.0.13)&lt;br /&gt;
|-&lt;br /&gt;
|DSP Media Framework 1.4 (TMS320C6x C/C++ Compiler v6.0.13)&lt;br /&gt;
|-&lt;br /&gt;
|eCos 3 running on Freescale i.MX27 926ejs (ARMv5TEJ) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 14 running on Intel Core i5 with AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.0 running on Xeon E5- 2430L (x86) with AES-NI (clang Compiler Version 3.3)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.0 running on Xeon E5-2430L (x86) with AES-NI (clang Compiler Version 3.3)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.0 running on Xeon E5-2430L (x86) without AES-NI (clang Compiler Version 3.3)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.2 running on Intel Xeon E5-2430L (x86) with AES-NI (clang Compiler Version 3.4.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.2 running on Intel Xeon E5-2430L (x86) without AES-NI (clang Compiler Version 3.4.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 8.4 running on Intel Xeon E5440 (x86) 32-bit (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 8.4 running on Intel Xeon E5440 (x86) without AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 8.4 running on Intel Xeon E5440 (x86) without AESNI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.1 running on Xeon E5-2430L (x86) with AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.1 running on Xeon E5-2430L (x86) without AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.1 running on Xeon E5-2430L (x86) without AESNI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.2 running on Xeon E5-2430L (x86) with AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.2 running on Xeon E5-2430L (x86) without AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (32 bit) (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (32 bit) running on Intel Itanium 2 (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (64 bit) (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (64 bit) running on Intel Itanium 2 (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 6.0 running on Apple A5 / ARM Cortex-A9 (ARMv7) with NEON (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 6.0 running on Apple A5 / ARM Cortex-A9 (ARMv7) without NEON (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32­bit running on Apple A7 (ARMv8) with NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32-bit running on Apple A7 (ARMv8) with NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32­bit running on Apple A7 (ARMv8) without NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32-bit running on Apple A7 (ARMv8) without NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64­bit running on Apple A7 (ARMv8) with NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64-bit running on Apple A7 (ARMv8) with NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64­bit running on Apple A7 (ARMv8) without NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64-bit running on Apple A7 (ARMv8) without NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64-bit running on Apple A7 (ARMv8) without NEON and Crypto Extensions (clang Compilerv Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.27 (gcc Compiler Version 4.2.4)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.27 running on PowerPC e300c3 (gcc Compiler Version 4.2.4)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.32 (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.32 running on TI AM3703CBP (ARMv7) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.33 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.33 running on PowerPC32 e300 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on a Nimble Storage CS300 with AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on a Nimble Storage CS500 with AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on a Nimble Storage CS700 with AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on Broadcom BCM11107 (ARMv6) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on Freescale e500v2 (PPC) (gcc Compiler Version 4.4.1)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on Freescale PowerPCe500 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on TI TMS320DM6446 (ARMv4) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 32-bit running on Intel Atom E3845 (x86) with AES-NI (gcc Compiler Version 4.8.1)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 32-bit running on Intel Atom E3845 (x86) without AES-NI (gcc Compiler Version 4.8.1)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 on VMware ESXi 6.00 running on Intel Xeon with AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 on Vmware ESXi 6.00 running on Intel Xeon without AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 running on Intel Xeon with AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 running on Intel Xeon without AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 64-bit under Citrix XenServer running on Intel Xeon E5-2430L (x86) without AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Citrix XenServer 6.2 running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Citrix XenServer 6.2 running on Intel Xeon E5-2430L without AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Microsoft Windows 2012 Hyper-V running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Microsoft Windows 2012 Hyper-V running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)2&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Microsoft Windows 2012 Hyper-V running on Intel Xeon E5-2430L without AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Vmware ESXi 5.1 running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Vmware ESXi 5.1 running on Intel Xeon E5-2430L without AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.8 running on ARM926 (ARMv5TEJ) (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux ORACLESP 2.6 running on ASPEED AST-Series (ARMv5) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|Linux ORACLESP 2.6 running on Emulex PILOT3 (ARMv5) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (32 bit) (Microsoft 32 bit C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (32 bit) running on Intel Celeron (Microsoft 32 bit C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (64 bit) (Microsoft C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (64 bit) running on Intel Pentium 4 (Microsoft C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 running on Intel Core i5- 2430M (64-bit) with AES-NI (Microsoft ® C/C++ Optimizing Compiler Version 16.00 for x64)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 running on Intel Core i5-2430M (64-bit) with AES-NI (Microsoft « C/C++ Optimizing Compiler Version 16.00 for x64)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 5.0 (Microsoft C/C++ Optimizing Compiler Version 13.10 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 5.0 running on ARMv7 (Microsoft C/C++ Optimizing Compiler Version 13.10 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 6.0 (Microsoft C/C++ Optimizing Compiler Version 15.00 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 6.0 running on ARMv5TEJ (Microsoft C/C++ Optimizing Compiler Version 15.00 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows Server 2008 R2 running on an Intel Xeon E5-2420 (x64) (Microsoft 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86)&lt;br /&gt;
|-&lt;br /&gt;
|NetBSD 5.1 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|NetBSD 5.1 running on Intel Xeon 5500 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|NetBSD 5.1 running on PowerPCe500 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|OpenWRT 2.6 running on MIPS 24Kc (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 5 (64 bit) (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 5 (64 bit) running on Intel Xeon 5675 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 5 running on Intel Xeon 5675 with AES-NI (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 6 (gcc Compiler Version 4.4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 6 running on Intel Xeon 5675 with AES-NI (gcc Compiler Version 4.4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 6 running on Intel Xeon 5675 without AES-NI (gcc Compiler Version 4.4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (32 bit) (gcc Compiler Version 3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (32 bit) running on SPARC-T3 (SPARCv9) (gcc Compiler Version3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (64 bit) (gcc Compiler Version 3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (64 bit) running on SPARC-T3 (SPARCv9) (gcc Compiler Version 3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11(32 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (32 bit) running on Intel Xeon 5675 (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (32 bit) running on SPARC-T3 (SPARCv9) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (32 bit) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) running on Intel Xeon 5675 (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) running on SPARC-T3 (SPARCv9) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AES-NI (32 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AESNI (32 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AES-NI (64 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AESNI (64 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|PexOS 1.0 under vSphere ESXi 5.1 running on Intel Xeon E52430L with AES-NI (gcc Compiler Version 4.6.3)3&lt;br /&gt;
|-&lt;br /&gt;
|PexOS 1.0 under vSphere ESXi 5.1 running on Intel Xeon E52430L without AES-NI (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|QNX 6.4 running on Freescale i.MX25 (ARMv4) (gcc Compiler Version 4.3.3)&lt;br /&gt;
|-&lt;br /&gt;
|QNX 6.5 running on Freescale i.MX25 (ARMv4) (gcc Compiler Version 4.3.3)&lt;br /&gt;
|-&lt;br /&gt;
|TS-Linux 2.4 running on Arm920Tid (ARMv4) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|TS-Linux 2.4 running on Arm920Tid (ARMv4) (gcc Compiler Version 4.3.2)4&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (32 bit) (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (32 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (64 bit) (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (64 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 running on Intel Core i5 with AES-NI (32 bit) (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 running on Intel Pentium T4200 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 12.04 running on Intel Xeon E5-2430L (x86) with AES-NI (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 12.04 running on Intel Xeon E5-2430L (x86) without AES-NI (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 13.04 running on AM335x Cortex-A8 (ARMv7) (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 13.04 running on AM335x Cortex-A8 (ARMv7) with NEON (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 13.04 running on AM335x Cortex-A8 (ARMv7) without NEON (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|uCLinux 0.9.29 (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|uCLinux 0.9.29 running on ARM 922T (ARMv4) (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 1.5 under Vmware ESXi 5.0 running on Intel Xeon E3-1220 (x86) with AES-NI (gcc Compiler Version 4.5.1)1&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 1.5 under Vmware ESXi 5.0 running on Intel Xeon E3-1220 (x86) without AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 2.1 under vSphere ESXi 5.5 running on Intel Xeon E3-1220 (x86) with AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 2.1 under vSphere ESXi 5.5 running on Intel Xeon E3-1220 (x86) with AESNI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 2.1 under vSphere ESXi 5.5 running on Intel Xeon E3-1220 (x86) without AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.7 running on Intel Core 2 Duo (x86) (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.8 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.8 running on TI TNETV1050 (MIPS) (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.9 running on Freescale P2020 (PPC) (gcc Compiler Version 4.3.3)&lt;br /&gt;
|-&lt;br /&gt;
|Windows Embedded Compact 7 running on Freescale i.MX53xA (ARMv7) with NEON (Microsoft C/C++ Optimizing Compiler Version 15.00.20720)&lt;br /&gt;
|-&lt;br /&gt;
|Windows Embedded Compact 7 running on Freescale i.MX53xD (ARMv7) with NEON (Microsoft C/C++ Optimizing Compiler Version 15.00.20720)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=FIPS_module_2.0&amp;diff=3219</id>
		<title>FIPS module 2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_module_2.0&amp;diff=3219"/>
		<updated>2022-10-20T10:23:15Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: Fix broken CMVP links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''OpenSSL FIPS Object Module 2.0'' was first validated with FIPS 140-2 certificate [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/1747 #1747] in mid-2012.  This 2.0 FIPS module is compatible with OpenSSL releases 1.0.1 and 1.0.2, and not with any other releases.&lt;br /&gt;
&lt;br /&gt;
There are two &amp;quot;clone&amp;quot; validations (known as &amp;quot;Alternative Scenario 1A&amp;quot; validations, also referred to as &amp;quot;re-brand&amp;quot; validations by some test labs) were obtained for the same module. The &amp;quot;RE&amp;quot; validation, [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2473 #2473], was intended to be identical to [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/1747 #1747] while allowing the addition of new platforms.  The &amp;quot;SE&amp;quot; validation, [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2398 #2398], was intended for the addition of platforms requiring source code mods and thus new revisions to the module tarball. The [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/1747 #1747] and [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2473 #2473] validations will forever remain at revision 2.0.10, while new revisions will be added to [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2398 #2398] (which is at 2.0.13 as of September 2016).&lt;br /&gt;
&lt;br /&gt;
Note that although the paperwork for the two clone validations #2398 and #2473 was submitted at the same time, and the two sets of paperwork were precisely identical other than the respective references to &amp;quot;RE&amp;quot; versus &amp;quot;SE&amp;quot; in the module names, they were approved at different times (July and November) with different editorial modifications required by the CMVP for the Security Policy documents. Such inconsistencies are common with FIPS 140-2 validations; the outcome from one validation effort is not necessarily predictive of what will happen for subsequent similar (or even identical) attempts.&lt;br /&gt;
&lt;br /&gt;
In addition to the three validations of the ''OpenSSL FIPS Object Module 2.0'' obtained directly by OpenSSL, some third party vendors have obtained additional &amp;quot;re-brand&amp;quot; validations of the same cryptographic module:&lt;br /&gt;
&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2676 #2676], Cohesity OpenSSL FIPS Object Module&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2631 #2631], Intel OpenSSL FIPS Object Module&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2575 #2575], Cellcrypt Secure Core 3 FIPS 140-2 Module&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2454 #2454], LogRhythm FIPS Object Module Version 6.3.4&lt;br /&gt;
:: [https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2454 #2422], Nimble Storage OpenSSL FIPS Object Module&lt;br /&gt;
&lt;br /&gt;
Note that while these clone validations have re-branded proprietary module names, they reference the original ''OpenSSL FIPS Object Module 2.0'' tarballs which are available under the open source OpenSSL license, and hence these validations can be used and cited by anyone.&lt;br /&gt;
&lt;br /&gt;
A list of formally tested platforms (&amp;quot;Operational Environments&amp;quot;) is associated with each validation. Collectively there are over two hundred unique platforms listed across all the ''OpenSSL FIPS Object Module 2.0'' validations:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Unique platforms across all ''OpenSSL FIPS Object Module 2.0'' validations as of 2016-09&lt;br /&gt;
|-&lt;br /&gt;
|AcanOS 1.0 running on Feroceon 88FR131 (ARMv5) (gcc Compiler Version 4.5.3)&lt;br /&gt;
|-&lt;br /&gt;
|AcanOS 1.0 running on Intel Core i7-3612QE (x86) with AES-NI (gcc Compiler Version 4.6.2)&lt;br /&gt;
|-&lt;br /&gt;
|AcanOS 1.0 running on Intel Core i7-3612QE (x86) without AES-NI (gcc Compiler Version 4.6.2)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 32-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 32-bit running on IBM POWER 7 (PPC) with optimizations (IBM XL C/C++ for AIX Compiler Version V10.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 64-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 6.1 64-bit running on IBM POWER 7 (PPC) with optimizations (IBM XL C/C++ for AIX Compiler Version V10.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 7.1 32-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|AIX 7.1 64-bit running on IBM POWER 7 (PPC) (IBM XL C/C++ for AIX Compiler Version V13.1)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 running on OMAP 3530 (ARMv7) with NEON (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 running on Qualcomm QSD8250 (ARMv7) with NEON (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 2.2 running on Qualcomm QSD8250 (ARMv7) without NEON (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 3.0 (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 3.0 running on NVIDIA Tegra 250 T20 (ARMv7) (gcc Compiler Version 4.4.0)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 (gcc Compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 running on NVIDIA Tegra 250 T20 (ARMv7) (gcc Compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 running on Qualcomm Snapdragon APQ8060 (ARMv7) with NEON (gcc compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.0 running on TI OMAP 3 (ARMv7) with NEON (gcc Compiler Version 4.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.1 running on TI DM3730 (ARMv7) (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.1 running on TI DM3730 (ARMv7) with NEON (gcc Complier Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.1 running on TI DM3730 (ARMv7) without NEON (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) with Neon (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) with NEON (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 4.2 running on Nvidia Tegra 3 (ARMv7) without NEON (gcc Compiler Version 4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 32-bit running on Qualcomm APQ8084 (ARMv7) with NEON (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 32-bit running on Qualcomm APQ8084 (ARMv7) without NEON (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 64-bit running on SAMSUNG Exynos7420 (ARMv8) with NEON and Crypto Extensions (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Android 5.0 64-bit running on SAMSUNG Exynos7420 (ARMv8) without NEON and Crypto Extensions (gcc Compiler Version 4.9)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 5.0 running on ARM Cortex A8 (ARMv7) with NEON (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 5.1 (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 5.1 running on ARMv7 (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 6.1 running on Apple A6X SoC (ARMv7s) (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 7.1 64-bit running on Apple A7 (ARMv8) with NEON (clang Compiler Version 5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple iOS 7.1 64- bit running on Apple A7 (ARMv8) without NEON (clang Compiler Version 5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Apple OS X 10.7 running on Intel Core i7-3615QM (Apple LLVM version 4.2)&lt;br /&gt;
|-&lt;br /&gt;
|ArbOS 5.3 running on Xeon E5645 (x86) with AES-NI (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|ArbOS 5.3 running on Xeon E5645 (x86) without AES-NI (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (32 bit) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (32 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (64 bit) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CascadeOS 6.1 (64 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|CentOS 5.6 64-bit running on Intel Xeon E5-2620v3 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|CentOS 5.6 64-bit running on Intel Xeon E5-2690v3 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|DataGravity Discovery Series OS V2.0 running on Intel Xeon E5-2420 (x86) with AES-NI (gcc Compiler Version 4.7.2)&lt;br /&gt;
|-&lt;br /&gt;
|DataGravity Discovery Series OS V2.0 running on Intel Xeon E5-2420 (x86) without AES-NI (gcc Compiler Version 4.7.2)&lt;br /&gt;
|-&lt;br /&gt;
|DSP Media Framework 1.4 running on TI C64x+ (TMS320C6x C/C++ Compiler v6.0.13)&lt;br /&gt;
|-&lt;br /&gt;
|DSP Media Framework 1.4 (TMS320C6x C/C++ Compiler v6.0.13)&lt;br /&gt;
|-&lt;br /&gt;
|eCos 3 running on Freescale i.MX27 926ejs (ARMv5TEJ) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 14 running on Intel Core i5 with AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.0 running on Xeon E5- 2430L (x86) with AES-NI (clang Compiler Version 3.3)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.0 running on Xeon E5-2430L (x86) with AES-NI (clang Compiler Version 3.3)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.0 running on Xeon E5-2430L (x86) without AES-NI (clang Compiler Version 3.3)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.2 running on Intel Xeon E5-2430L (x86) with AES-NI (clang Compiler Version 3.4.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 10.2 running on Intel Xeon E5-2430L (x86) without AES-NI (clang Compiler Version 3.4.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 8.4 running on Intel Xeon E5440 (x86) 32-bit (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 8.4 running on Intel Xeon E5440 (x86) without AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 8.4 running on Intel Xeon E5440 (x86) without AESNI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.1 running on Xeon E5-2430L (x86) with AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.1 running on Xeon E5-2430L (x86) without AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.1 running on Xeon E5-2430L (x86) without AESNI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.2 running on Xeon E5-2430L (x86) with AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|FreeBSD 9.2 running on Xeon E5-2430L (x86) without AES-NI (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (32 bit) (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (32 bit) running on Intel Itanium 2 (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (64 bit) (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|HP-UX 11i (64 bit) running on Intel Itanium 2 (HP C/aC++ B3910B)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 6.0 running on Apple A5 / ARM Cortex-A9 (ARMv7) with NEON (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 6.0 running on Apple A5 / ARM Cortex-A9 (ARMv7) without NEON (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32­bit running on Apple A7 (ARMv8) with NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32-bit running on Apple A7 (ARMv8) with NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32­bit running on Apple A7 (ARMv8) without NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 32-bit running on Apple A7 (ARMv8) without NEON (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64­bit running on Apple A7 (ARMv8) with NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64-bit running on Apple A7 (ARMv8) with NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64­bit running on Apple A7 (ARMv8) without NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64-bit running on Apple A7 (ARMv8) without NEON and Crypto Extensions (clang Compiler Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|iOS 8.1 64-bit running on Apple A7 (ARMv8) without NEON and Crypto Extensions (clang Compilerv Version 600.0.56)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.27 (gcc Compiler Version 4.2.4)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.27 running on PowerPC e300c3 (gcc Compiler Version 4.2.4)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.32 (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.32 running on TI AM3703CBP (ARMv7) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.33 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6.33 running on PowerPC32 e300 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on a Nimble Storage CS300 with AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on a Nimble Storage CS500 with AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on a Nimble Storage CS700 with AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on Broadcom BCM11107 (ARMv6) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on Freescale e500v2 (PPC) (gcc Compiler Version 4.4.1)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on Freescale PowerPCe500 (gcc Compiler Version 4.1.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 2.6 running on TI TMS320DM6446 (ARMv4) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 32-bit running on Intel Atom E3845 (x86) with AES-NI (gcc Compiler Version 4.8.1)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 32-bit running on Intel Atom E3845 (x86) without AES-NI (gcc Compiler Version 4.8.1)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 on VMware ESXi 6.00 running on Intel Xeon with AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 on Vmware ESXi 6.00 running on Intel Xeon without AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 running on Intel Xeon with AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.10 running on Intel Xeon without AES-NI (gcc Compiler Version 4.8.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 64-bit under Citrix XenServer running on Intel Xeon E5-2430L (x86) without AES-NI&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Citrix XenServer 6.2 running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Citrix XenServer 6.2 running on Intel Xeon E5-2430L without AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Microsoft Windows 2012 Hyper-V running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Microsoft Windows 2012 Hyper-V running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)2&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Microsoft Windows 2012 Hyper-V running on Intel Xeon E5-2430L without AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Vmware ESXi 5.1 running on Intel Xeon E5-2430L with AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.4 under Vmware ESXi 5.1 running on Intel Xeon E5-2430L without AES-NI (gcc Compiler Version 4.8.0)&lt;br /&gt;
|-&lt;br /&gt;
|Linux 3.8 running on ARM926 (ARMv5TEJ) (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|Linux ORACLESP 2.6 running on ASPEED AST-Series (ARMv5) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|Linux ORACLESP 2.6 running on Emulex PILOT3 (ARMv5) (gcc Compiler Version 4.4.5)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (32 bit) (Microsoft 32 bit C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (32 bit) running on Intel Celeron (Microsoft 32 bit C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (64 bit) (Microsoft C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 (64 bit) running on Intel Pentium 4 (Microsoft C/C++ Optimizing Compiler Version 16.00)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 running on Intel Core i5- 2430M (64-bit) with AES-NI (Microsoft ® C/C++ Optimizing Compiler Version 16.00 for x64)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows 7 running on Intel Core i5-2430M (64-bit) with AES-NI (Microsoft « C/C++ Optimizing Compiler Version 16.00 for x64)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 5.0 (Microsoft C/C++ Optimizing Compiler Version 13.10 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 5.0 running on ARMv7 (Microsoft C/C++ Optimizing Compiler Version 13.10 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 6.0 (Microsoft C/C++ Optimizing Compiler Version 15.00 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows CE 6.0 running on ARMv5TEJ (Microsoft C/C++ Optimizing Compiler Version 15.00 for ARM)&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft Windows Server 2008 R2 running on an Intel Xeon E5-2420 (x64) (Microsoft 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86)&lt;br /&gt;
|-&lt;br /&gt;
|NetBSD 5.1 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|NetBSD 5.1 running on Intel Xeon 5500 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|NetBSD 5.1 running on PowerPCe500 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|OpenWRT 2.6 running on MIPS 24Kc (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 5 (64 bit) (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 5 (64 bit) running on Intel Xeon 5675 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 5 running on Intel Xeon 5675 with AES-NI (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 6 (gcc Compiler Version 4.4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 6 running on Intel Xeon 5675 with AES-NI (gcc Compiler Version 4.4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Linux 6 running on Intel Xeon 5675 without AES-NI (gcc Compiler Version 4.4.6)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (32 bit) (gcc Compiler Version 3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (32 bit) running on SPARC-T3 (SPARCv9) (gcc Compiler Version3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (64 bit) (gcc Compiler Version 3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 10 (64 bit) running on SPARC-T3 (SPARCv9) (gcc Compiler Version 3.4.3)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11(32 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (32 bit) running on Intel Xeon 5675 (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (32 bit) running on SPARC-T3 (SPARCv9) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (32 bit) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) running on Intel Xeon 5675 (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) running on SPARC-T3 (SPARCv9) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 (64 bit) (Sun C Version 5.12)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AES-NI (32 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AESNI (32 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AES-NI (64 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|Oracle Solaris 11 running on Intel Xeon 5675 with AESNI (64 bit) (gcc Compiler Version 4.5.2)&lt;br /&gt;
|-&lt;br /&gt;
|PexOS 1.0 under vSphere ESXi 5.1 running on Intel Xeon E52430L with AES-NI (gcc Compiler Version 4.6.3)3&lt;br /&gt;
|-&lt;br /&gt;
|PexOS 1.0 under vSphere ESXi 5.1 running on Intel Xeon E52430L without AES-NI (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|QNX 6.4 running on Freescale i.MX25 (ARMv4) (gcc Compiler Version 4.3.3)&lt;br /&gt;
|-&lt;br /&gt;
|QNX 6.5 running on Freescale i.MX25 (ARMv4) (gcc Compiler Version 4.3.3)&lt;br /&gt;
|-&lt;br /&gt;
|TS-Linux 2.4 running on Arm920Tid (ARMv4) (gcc Compiler Version 4.3.2)&lt;br /&gt;
|-&lt;br /&gt;
|TS-Linux 2.4 running on Arm920Tid (ARMv4) (gcc Compiler Version 4.3.2)4&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (32 bit) (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (32 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (64 bit) (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 (64 bit) running on Intel Pentium T4200 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 running on Intel Core i5 with AES-NI (32 bit) (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 10.04 running on Intel Pentium T4200 (gcc Compiler Version 4.1.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 12.04 running on Intel Xeon E5-2430L (x86) with AES-NI (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 12.04 running on Intel Xeon E5-2430L (x86) without AES-NI (gcc Compiler Version 4.6.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 13.04 running on AM335x Cortex-A8 (ARMv7) (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 13.04 running on AM335x Cortex-A8 (ARMv7) with NEON (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 13.04 running on AM335x Cortex-A8 (ARMv7) without NEON (gcc Compiler Version 4.7.3)&lt;br /&gt;
|-&lt;br /&gt;
|uCLinux 0.9.29 (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|uCLinux 0.9.29 running on ARM 922T (ARMv4) (gcc Compiler Version 4.2.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 1.5 under Vmware ESXi 5.0 running on Intel Xeon E3-1220 (x86) with AES-NI (gcc Compiler Version 4.5.1)1&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 1.5 under Vmware ESXi 5.0 running on Intel Xeon E3-1220 (x86) without AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 2.1 under vSphere ESXi 5.5 running on Intel Xeon E3-1220 (x86) with AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 2.1 under vSphere ESXi 5.5 running on Intel Xeon E3-1220 (x86) with AESNI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|Vmware Horizon Workspace 2.1 under vSphere ESXi 5.5 running on Intel Xeon E3-1220 (x86) without AES-NI (gcc Compiler Version 4.5.1)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.7 running on Intel Core 2 Duo (x86) (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.8 (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.8 running on TI TNETV1050 (MIPS) (gcc Compiler Version 4.1.2)&lt;br /&gt;
|-&lt;br /&gt;
|VxWorks 6.9 running on Freescale P2020 (PPC) (gcc Compiler Version 4.3.3)&lt;br /&gt;
|-&lt;br /&gt;
|Windows Embedded Compact 7 running on Freescale i.MX53xA (ARMv7) with NEON (Microsoft C/C++ Optimizing Compiler Version 15.00.20720)&lt;br /&gt;
|-&lt;br /&gt;
|Windows Embedded Compact 7 running on Freescale i.MX53xD (ARMv7) with NEON (Microsoft C/C++ Optimizing Compiler Version 15.00.20720)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3175</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3175"/>
		<updated>2021-05-02T13:05:03Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Completing the installation of the FIPS Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
'''READ ME FIRST:'''&lt;br /&gt;
&lt;br /&gt;
The project is planning on having a FIPS 140-2 (not 140-3) validated module which means that the schedule is driven by the NIST deadline for 140-2 which is near the end of September, 2021.&lt;br /&gt;
&lt;br /&gt;
The team is focused on development, and this page is somewhat out of date, in terms of content and schedule. It is expected that much of the content here will be in the FIPS, or other, documentation in the 3.0 release. This is being started in [https://github.com/openssl/openssl/pull/14710 PR 14710].&lt;br /&gt;
&lt;br /&gt;
The current list of items being worked on, can be found at their [https://app.zenhub.com/workspaces/300-beta-1-573bc8d2d31e1e9a73fff29f/board?repos=7634677 OpenSSL Project Kanban Board on ZenHub].&lt;br /&gt;
&lt;br /&gt;
You can also search GitHub issues for the list of [https://github.com/openssl/openssl/issues?q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+milestone%3A%223.0.0+beta1%22 items that must be done for 3.0 (&amp;quot;blockers&amp;quot;)] and the list of [https://github.com/openssl/openssl/issues?page=1&amp;amp;q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+no%3Amilestone Items that are &amp;quot;nice to have&amp;quot; but not committed].&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== License Change ===&lt;br /&gt;
&lt;br /&gt;
In previous versions, OpenSSL was licensed under the dual [https://www.openssl.org/source/license-openssl-ssleay.txt OpenSSL and SSLeay licenses] (both licenses apply). From OpenSSL 3.0 this is replaced by the [https://www.openssl.org/source/apache-license-2.0.txt Apache License v2].&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 5 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;high&amp;quot; level APIs (for example those functions prefixed with &amp;quot;EVP&amp;quot;). They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
One of the standard providers available is the FIPS provider. This makes available FIPS validated cryptographic algorithms.&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;high level&amp;quot; APIs (such as the &amp;quot;EVP&amp;quot; APIs) and the &amp;quot;low level&amp;quot; APIs. The high level APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
* The RAND_DRBG subsystem has been removed.  The new EVP_RAND is a partial replacement: the DRBG callback framework is absent.&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' have been removed from OpenSSL 3.0. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Starting with OpenSSL 3.0.0 alpha16, no separate installation step for the FIPS module (a.k.a FIPS provider) is necessary anymore. It will be built and installed automatically if FIPS support has been configured. The current documentation can be found in the [https://github.com/openssl/openssl/blob/master/README-FIPS.md README-FIPS] file on the master branch.&lt;br /&gt;
&lt;br /&gt;
''The documentation in the remaining section applies to alpha versions up to OpenSSL 3.0.0 alpha15.''&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module (if you wish to use it). The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OSSL_LIB_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OSSL_LIB_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''In alpha releases of OpenSSL 3.0.0 up until alpha6, the OSSL_LIB_CTX was called OPENSSL_CTX. It was renamed for OpenSSL 3.0.0 alpha7. If you are still using an alpha6 release or earlier, take a look at this [https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;amp;oldid=3119 older version of the wiki page].''&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OSSL_LIB_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OSSL_LIB_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OSSL_LIB_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OSSL_LIB_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the high level APIs a provider is selected. It is that provider implementation that actually does the required work. There are five providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The base provider. This contains a small sub-set of non-cryptographic algorithms available in the default provider. For example algorithms to encode and decode keys to files. If you do not load the default provider then you should always load this one instead (including if you are using the FIPS provider).&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are no longer present so you must remove them from your application if you use them.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any&lt;br /&gt;
legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the high level APIs, such as EVP, instead)&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
All of the above APIs are deprecated in OpenSSL 3.0 - so a simple rule is to&lt;br /&gt;
avoid using all deprecated functions.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they can automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
 base = base_sect&lt;br /&gt;
 &lt;br /&gt;
 [base_sect]&lt;br /&gt;
 activate = 1&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour. Note that this configuration also activates the &amp;quot;base&amp;quot; provider. The base provider does not include any cryptographic algorithms (and therefore does not impact the validation status of any cryptographic operations), but does include other supporting algorithms that may be required. It is designed to be used in conjunction with the FIPS module.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain deprecated APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsmodule.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot; (note that setting this value to 0 is not sufficient). This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
        OSSL_PROVIDER *base;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        base = OSSL_PROVIDER_load(NULL, &amp;quot;base&amp;quot;);&lt;br /&gt;
        if (base == NULL) {&lt;br /&gt;
            OSSL_PROVIDER_unload(fips);&lt;br /&gt;
            printf(&amp;quot;Failed to load base provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(base);&lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Also note that in this example we have additionally loaded the &amp;quot;base&amp;quot; provider. This loads a sub-set of algorithms that are also available in the default provider - specifically non cryptographic ones which may be used in conjunction with the FIPS provider. For example this contains algorithms for encoding and decoding keys. If you decide not to load the default provider then you will usually want to load the base provider instead.&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conforms to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. The local property query overrides the default properties if the same property name is specified in both.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default and base providers that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the encoder and decoder algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The encoder and decoder algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;. Note that this config file does not load the &amp;quot;base&amp;quot; provider. All supporting algorithms that are in &amp;quot;base&amp;quot; are also in &amp;quot;default&amp;quot;, so it is unnecessary in this case:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default_sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS and base providers. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OSSL_LIB_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    nonfipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS and base providers so we&lt;br /&gt;
     * don't need to explicitly load them here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OSSL_LIB_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OSSL_LIB_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OSSL_LIB_CTX_free(fipslibctx);&lt;br /&gt;
    OSSL_LIB_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Encoders and Decoders with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Encoders and decoders are used to read and write keys or parameters from or to some external format (for example a PEM file). If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a encoder to do this. Similarly you need a decoder to read previously saved keys and parameters. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate encoder/decoder will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL encoder and decoder are implemented in both the default and base providers and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these encoder/decoder have the &amp;quot;fips=yes&amp;quot; property against them. You should ensure that either the default or base provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties and the default library context to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_ex(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use the same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX objects using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as encoders from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
=== Confirming that an algorithm is being provided by the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
A chain of links needs to be followed to go from an algorithm instance to the provider that implements it.  The process is similar for all algorithms. Here the example of a digest is used.&lt;br /&gt;
&lt;br /&gt;
# To go from an ''EVP_MD_CTX'' to an ''EVP_MD'', use the '''EVP_MD_CTX_md()''' call.&lt;br /&gt;
# To go from the ''EVP_MD'' to its ''OSSL_PROVIDER'', use the '''EVP_MD_provider()''' call.&lt;br /&gt;
# To extract the name from the ''OSSL_PROVIDER'', use the '''OSSL_PROVIDER_name()''' call.&lt;br /&gt;
# Finally, use strcmp(3) or printf(3) on the name.&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - aarch64                    ||  Yes   ||  Yes      || Tested on 13.0-CURRENT&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - amd64                      ||  Yes   ||  Yes      || Tested on 12.1-STABLE and 11.3-STABLE&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - i386                       ||  Yes   ||  Yes      || Had to run &amp;lt;code&amp;gt;./config no-pic&amp;lt;/code&amp;gt; due to lack of CAST PIC support&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_ENCODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_DECODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented encoder / decoder ====&lt;br /&gt;
&lt;br /&gt;
===== Encoders =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Encoder                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Decoders =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Decoder                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on decoders&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider encoders for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3173</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3173"/>
		<updated>2021-04-27T16:06:42Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
'''READ ME FIRST:'''&lt;br /&gt;
&lt;br /&gt;
The project is planning on having a FIPS 140-2 (not 140-3) validated module which means that the schedule is driven by the NIST deadline for 140-2 which is near the end of September, 2021.&lt;br /&gt;
&lt;br /&gt;
The team is focused on development, and this page is somewhat out of date, in terms of content and schedule. It is expected that much of the content here will be in the FIPS, or other, documentation in the 3.0 release.&lt;br /&gt;
&lt;br /&gt;
The current list of items being worked on, can be found at their [https://app.zenhub.com/workspaces/300-beta-1-573bc8d2d31e1e9a73fff29f/board?repos=7634677 OpenSSL Project Kanban Board on ZenHub].&lt;br /&gt;
&lt;br /&gt;
You can also search GitHub issues for the list of [https://github.com/openssl/openssl/issues?q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+milestone%3A%223.0.0+beta1%22 items that must be done for 3.0 (&amp;quot;blockers&amp;quot;)] and the list of [https://github.com/openssl/openssl/issues?page=1&amp;amp;q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+no%3Amilestone Items that are &amp;quot;nice to have&amp;quot; but not committed].&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== License Change ===&lt;br /&gt;
&lt;br /&gt;
In previous versions, OpenSSL was licensed under the dual [https://www.openssl.org/source/license-openssl-ssleay.txt OpenSSL and SSLeay licenses] (both licenses apply). From OpenSSL 3.0 this is replaced by the [https://www.openssl.org/source/apache-license-2.0.txt Apache License v2].&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 5 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;high&amp;quot; level APIs (for example those functions prefixed with &amp;quot;EVP&amp;quot;). They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
One of the standard providers available is the FIPS provider. This makes available FIPS validated cryptographic algorithms.&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;high level&amp;quot; APIs (such as the &amp;quot;EVP&amp;quot; APIs) and the &amp;quot;low level&amp;quot; APIs. The high level APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
* The RAND_DRBG subsystem has been removed.  The new EVP_RAND is a partial replacement: the DRBG callback framework is absent.&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' have been removed from OpenSSL 3.0. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Update:''' Starting with OpenSSL 3.0.0 alpha16, no separate installation step for the FIPS module (a.k.a FIPS provider) is necessary anymore. It will be built and installed automatically if FIPS support has been configured. The new documentation can be previewed in the [https://github.com/openssl/openssl/blob/92010acff9e9e32b8c183079a70d164759eeb62a/README-FIPS.md README-FIPS] file of pull request [https://github.com/openssl/openssl/pull/13684 #13684]. The documentation in the remaining section applies to alpha versions up to OpenSSL 3.0.0 alpha15.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module (if you wish to use it). The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OSSL_LIB_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OSSL_LIB_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''In alpha releases of OpenSSL 3.0.0 up until alpha6, the OSSL_LIB_CTX was called OPENSSL_CTX. It was renamed for OpenSSL 3.0.0 alpha7. If you are still using an alpha6 release or earlier, take a look at this [https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;amp;oldid=3119 older version of the wiki page].''&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OSSL_LIB_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OSSL_LIB_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OSSL_LIB_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OSSL_LIB_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the high level APIs a provider is selected. It is that provider implementation that actually does the required work. There are five providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The base provider. This contains a small sub-set of non-cryptographic algorithms available in the default provider. For example algorithms to encode and decode keys to files. If you do not load the default provider then you should always load this one instead (including if you are using the FIPS provider).&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are no longer present so you must remove them from your application if you use them.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any&lt;br /&gt;
legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the high level APIs, such as EVP, instead)&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
All of the above APIs are deprecated in OpenSSL 3.0 - so a simple rule is to&lt;br /&gt;
avoid using all deprecated functions.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they can automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
 base = base_sect&lt;br /&gt;
 &lt;br /&gt;
 [base_sect]&lt;br /&gt;
 activate = 1&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour. Note that this configuration also activates the &amp;quot;base&amp;quot; provider. The base provider does not include any cryptographic algorithms (and therefore does not impact the validation status of any cryptographic operations), but does include other supporting algorithms that may be required. It is designed to be used in conjunction with the FIPS module.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain deprecated APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsmodule.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot; (note that setting this value to 0 is not sufficient). This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
        OSSL_PROVIDER *base;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        base = OSSL_PROVIDER_load(NULL, &amp;quot;base&amp;quot;);&lt;br /&gt;
        if (base == NULL) {&lt;br /&gt;
            OSSL_PROVIDER_unload(fips);&lt;br /&gt;
            printf(&amp;quot;Failed to load base provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(base);&lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Also note that in this example we have additionally loaded the &amp;quot;base&amp;quot; provider. This loads a sub-set of algorithms that are also available in the default provider - specifically non cryptographic ones which may be used in conjunction with the FIPS provider. For example this contains algorithms for encoding and decoding keys. If you decide not to load the default provider then you will usually want to load the base provider instead.&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conforms to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. The local property query overrides the default properties if the same property name is specified in both.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default and base providers that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the encoder and decoder algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The encoder and decoder algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;. Note that this config file does not load the &amp;quot;base&amp;quot; provider. All supporting algorithms that are in &amp;quot;base&amp;quot; are also in &amp;quot;default&amp;quot;, so it is unnecessary in this case:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default_sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS and base providers. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OSSL_LIB_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    nonfipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS and base providers so we&lt;br /&gt;
     * don't need to explicitly load them here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OSSL_LIB_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OSSL_LIB_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OSSL_LIB_CTX_free(fipslibctx);&lt;br /&gt;
    OSSL_LIB_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Encoders and Decoders with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Encoders and decoders are used to read and write keys or parameters from or to some external format (for example a PEM file). If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a encoder to do this. Similarly you need a decoder to read previously saved keys and parameters. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate encoder/decoder will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL encoder and decoder are implemented in both the default and base providers and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these encoder/decoder have the &amp;quot;fips=yes&amp;quot; property against them. You should ensure that either the default or base provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties and the default library context to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_ex(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use the same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX objects using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as encoders from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
=== Confirming that an algorithm is being provided by the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
A chain of links needs to be followed to go from an algorithm instance to the provider that implements it.  The process is similar for all algorithms. Here the example of a digest is used.&lt;br /&gt;
&lt;br /&gt;
# To go from an ''EVP_MD_CTX'' to an ''EVP_MD'', use the '''EVP_MD_CTX_md()''' call.&lt;br /&gt;
# To go from the ''EVP_MD'' to its ''OSSL_PROVIDER'', use the '''EVP_MD_provider()''' call.&lt;br /&gt;
# To extract the name from the ''OSSL_PROVIDER'', use the '''OSSL_PROVIDER_name()''' call.&lt;br /&gt;
# Finally, use strcmp(3) or printf(3) on the name.&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - aarch64                    ||  Yes   ||  Yes      || Tested on 13.0-CURRENT&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - amd64                      ||  Yes   ||  Yes      || Tested on 12.1-STABLE and 11.3-STABLE&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - i386                       ||  Yes   ||  Yes      || Had to run &amp;lt;code&amp;gt;./config no-pic&amp;lt;/code&amp;gt; due to lack of CAST PIC support&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_ENCODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_DECODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented encoder / decoder ====&lt;br /&gt;
&lt;br /&gt;
===== Encoders =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Encoder                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Decoders =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Decoder                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on decoders&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider encoders for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3172</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3172"/>
		<updated>2021-04-27T16:03:53Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: Pimp the 'READ ME FIRST'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
'''READ ME FIRST:'''&lt;br /&gt;
&lt;br /&gt;
The project is planning on having a FIPS 140-2 (not 140-3) validated module which means that the schedule is driven by the NIST deadline for 140-2 which is near the end of September, 2021.&lt;br /&gt;
&lt;br /&gt;
The team is focused on development, and this page is somewhat out of date, in terms of content and schedule. It is expected that much of the content here will be in the FIPS, or other, documentation in the 3.0 release.&lt;br /&gt;
&lt;br /&gt;
The current list of items being worked on, can be found at their [https://app.zenhub.com/workspaces/300-beta-1-573bc8d2d31e1e9a73fff29f/board?repos=7634677 OpenSSL Project Kanban Board on ZenHub]. You can also search GitHub issues for the list of [https://github.com/openssl/openssl/issues?q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+milestone%3A%223.0.0+beta1%22 items that must be done for 3.0 (&amp;quot;blockers&amp;quot;)] and the list of [https://github.com/openssl/openssl/issues?page=1&amp;amp;q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+no%3Amilestone Items that are &amp;quot;nice to have&amp;quot; but not committed].&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== License Change ===&lt;br /&gt;
&lt;br /&gt;
In previous versions, OpenSSL was licensed under the dual [https://www.openssl.org/source/license-openssl-ssleay.txt OpenSSL and SSLeay licenses] (both licenses apply). From OpenSSL 3.0 this is replaced by the [https://www.openssl.org/source/apache-license-2.0.txt Apache License v2].&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 5 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;high&amp;quot; level APIs (for example those functions prefixed with &amp;quot;EVP&amp;quot;). They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
One of the standard providers available is the FIPS provider. This makes available FIPS validated cryptographic algorithms.&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;high level&amp;quot; APIs (such as the &amp;quot;EVP&amp;quot; APIs) and the &amp;quot;low level&amp;quot; APIs. The high level APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
* The RAND_DRBG subsystem has been removed.  The new EVP_RAND is a partial replacement: the DRBG callback framework is absent.&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' have been removed from OpenSSL 3.0. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Update:''' Starting with OpenSSL 3.0.0 alpha16, no separate installation step for the FIPS module (a.k.a FIPS provider) is necessary anymore. It will be built and installed automatically if FIPS support has been configured. The new documentation can be previewed in the [https://github.com/openssl/openssl/blob/92010acff9e9e32b8c183079a70d164759eeb62a/README-FIPS.md README-FIPS] file of pull request [https://github.com/openssl/openssl/pull/13684 #13684]. The documentation in the remaining section applies to alpha versions up to OpenSSL 3.0.0 alpha15.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module (if you wish to use it). The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OSSL_LIB_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OSSL_LIB_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''In alpha releases of OpenSSL 3.0.0 up until alpha6, the OSSL_LIB_CTX was called OPENSSL_CTX. It was renamed for OpenSSL 3.0.0 alpha7. If you are still using an alpha6 release or earlier, take a look at this [https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;amp;oldid=3119 older version of the wiki page].''&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OSSL_LIB_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OSSL_LIB_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OSSL_LIB_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OSSL_LIB_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the high level APIs a provider is selected. It is that provider implementation that actually does the required work. There are five providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The base provider. This contains a small sub-set of non-cryptographic algorithms available in the default provider. For example algorithms to encode and decode keys to files. If you do not load the default provider then you should always load this one instead (including if you are using the FIPS provider).&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are no longer present so you must remove them from your application if you use them.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any&lt;br /&gt;
legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the high level APIs, such as EVP, instead)&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
All of the above APIs are deprecated in OpenSSL 3.0 - so a simple rule is to&lt;br /&gt;
avoid using all deprecated functions.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they can automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
 base = base_sect&lt;br /&gt;
 &lt;br /&gt;
 [base_sect]&lt;br /&gt;
 activate = 1&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour. Note that this configuration also activates the &amp;quot;base&amp;quot; provider. The base provider does not include any cryptographic algorithms (and therefore does not impact the validation status of any cryptographic operations), but does include other supporting algorithms that may be required. It is designed to be used in conjunction with the FIPS module.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain deprecated APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsmodule.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot; (note that setting this value to 0 is not sufficient). This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
        OSSL_PROVIDER *base;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        base = OSSL_PROVIDER_load(NULL, &amp;quot;base&amp;quot;);&lt;br /&gt;
        if (base == NULL) {&lt;br /&gt;
            OSSL_PROVIDER_unload(fips);&lt;br /&gt;
            printf(&amp;quot;Failed to load base provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(base);&lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Also note that in this example we have additionally loaded the &amp;quot;base&amp;quot; provider. This loads a sub-set of algorithms that are also available in the default provider - specifically non cryptographic ones which may be used in conjunction with the FIPS provider. For example this contains algorithms for encoding and decoding keys. If you decide not to load the default provider then you will usually want to load the base provider instead.&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conforms to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. The local property query overrides the default properties if the same property name is specified in both.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default and base providers that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the encoder and decoder algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The encoder and decoder algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;. Note that this config file does not load the &amp;quot;base&amp;quot; provider. All supporting algorithms that are in &amp;quot;base&amp;quot; are also in &amp;quot;default&amp;quot;, so it is unnecessary in this case:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default_sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS and base providers. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OSSL_LIB_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    nonfipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS and base providers so we&lt;br /&gt;
     * don't need to explicitly load them here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OSSL_LIB_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OSSL_LIB_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OSSL_LIB_CTX_free(fipslibctx);&lt;br /&gt;
    OSSL_LIB_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Encoders and Decoders with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Encoders and decoders are used to read and write keys or parameters from or to some external format (for example a PEM file). If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a encoder to do this. Similarly you need a decoder to read previously saved keys and parameters. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate encoder/decoder will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL encoder and decoder are implemented in both the default and base providers and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these encoder/decoder have the &amp;quot;fips=yes&amp;quot; property against them. You should ensure that either the default or base provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties and the default library context to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_ex(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use the same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX objects using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as encoders from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
=== Confirming that an algorithm is being provided by the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
A chain of links needs to be followed to go from an algorithm instance to the provider that implements it.  The process is similar for all algorithms. Here the example of a digest is used.&lt;br /&gt;
&lt;br /&gt;
# To go from an ''EVP_MD_CTX'' to an ''EVP_MD'', use the '''EVP_MD_CTX_md()''' call.&lt;br /&gt;
# To go from the ''EVP_MD'' to its ''OSSL_PROVIDER'', use the '''EVP_MD_provider()''' call.&lt;br /&gt;
# To extract the name from the ''OSSL_PROVIDER'', use the '''OSSL_PROVIDER_name()''' call.&lt;br /&gt;
# Finally, use strcmp(3) or printf(3) on the name.&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - aarch64                    ||  Yes   ||  Yes      || Tested on 13.0-CURRENT&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - amd64                      ||  Yes   ||  Yes      || Tested on 12.1-STABLE and 11.3-STABLE&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - i386                       ||  Yes   ||  Yes      || Had to run &amp;lt;code&amp;gt;./config no-pic&amp;lt;/code&amp;gt; due to lack of CAST PIC support&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_ENCODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_DECODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented encoder / decoder ====&lt;br /&gt;
&lt;br /&gt;
===== Encoders =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Encoder                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Decoders =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Decoder                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on decoders&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider encoders for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3171</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3171"/>
		<updated>2021-04-27T15:51:02Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Completing the installation of the FIPS Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
'''READ ME FIRST:'''&lt;br /&gt;
&lt;br /&gt;
The project is planning on having a FIPS 140-2 (not 140-3) validated module which means that the schedule is driven by the NIST deadline for 140-2 which is near the end of September, 2021.&lt;br /&gt;
&lt;br /&gt;
The team is focused on development, and this page is somewhat out of date, in terms of content and schedule. It is expected that much of the content here will be in the FIPS, or other, documentation in the 3.0 release.&lt;br /&gt;
&lt;br /&gt;
The current list of items being worked on, can be found at their Kanban board, [https://app.zenhub.com/workspaces/300-beta-1-573bc8d2d31e1e9a73fff29f/board?repos=7634677]. The list of items that must be done for 3.0 (&amp;quot;blockers&amp;quot;) can be found at [https://github.com/openssl/openssl/issues?q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+milestone%3A%223.0.0+beta1%22]. The list of items that are &amp;quot;nice to have&amp;quot; but not committed can be found at [https://github.com/openssl/openssl/issues?page=1&amp;amp;q=is%3Aopen+label%3A%22triaged%3A+OTC+evaluated%22+no%3Amilestone]&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== License Change ===&lt;br /&gt;
&lt;br /&gt;
In previous versions, OpenSSL was licensed under the dual [https://www.openssl.org/source/license-openssl-ssleay.txt OpenSSL and SSLeay licenses] (both licenses apply). From OpenSSL 3.0 this is replaced by the [https://www.openssl.org/source/apache-license-2.0.txt Apache License v2].&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 5 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;high&amp;quot; level APIs (for example those functions prefixed with &amp;quot;EVP&amp;quot;). They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
One of the standard providers available is the FIPS provider. This makes available FIPS validated cryptographic algorithms.&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;high level&amp;quot; APIs (such as the &amp;quot;EVP&amp;quot; APIs) and the &amp;quot;low level&amp;quot; APIs. The high level APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
* The RAND_DRBG subsystem has been removed.  The new EVP_RAND is a partial replacement: the DRBG callback framework is absent.&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' have been removed from OpenSSL 3.0. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Update:''' Starting with OpenSSL 3.0.0 alpha16, no separate installation step for the FIPS module (a.k.a FIPS provider) is necessary anymore. It will be built and installed automatically if FIPS support has been configured. The new documentation can be previewed in the [https://github.com/openssl/openssl/blob/92010acff9e9e32b8c183079a70d164759eeb62a/README-FIPS.md README-FIPS] file of pull request [https://github.com/openssl/openssl/pull/13684 #13684]. The documentation in the remaining section applies to alpha versions up to OpenSSL 3.0.0 alpha15.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module (if you wish to use it). The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OSSL_LIB_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OSSL_LIB_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''In alpha releases of OpenSSL 3.0.0 up until alpha6, the OSSL_LIB_CTX was called OPENSSL_CTX. It was renamed for OpenSSL 3.0.0 alpha7. If you are still using an alpha6 release or earlier, take a look at this [https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;amp;oldid=3119 older version of the wiki page].''&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OSSL_LIB_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OSSL_LIB_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OSSL_LIB_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OSSL_LIB_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the high level APIs a provider is selected. It is that provider implementation that actually does the required work. There are five providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The base provider. This contains a small sub-set of non-cryptographic algorithms available in the default provider. For example algorithms to encode and decode keys to files. If you do not load the default provider then you should always load this one instead (including if you are using the FIPS provider).&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are no longer present so you must remove them from your application if you use them.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any&lt;br /&gt;
legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the high level APIs, such as EVP, instead)&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
All of the above APIs are deprecated in OpenSSL 3.0 - so a simple rule is to&lt;br /&gt;
avoid using all deprecated functions.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they can automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
 base = base_sect&lt;br /&gt;
 &lt;br /&gt;
 [base_sect]&lt;br /&gt;
 activate = 1&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour. Note that this configuration also activates the &amp;quot;base&amp;quot; provider. The base provider does not include any cryptographic algorithms (and therefore does not impact the validation status of any cryptographic operations), but does include other supporting algorithms that may be required. It is designed to be used in conjunction with the FIPS module.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain deprecated APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsmodule.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot; (note that setting this value to 0 is not sufficient). This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
        OSSL_PROVIDER *base;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        base = OSSL_PROVIDER_load(NULL, &amp;quot;base&amp;quot;);&lt;br /&gt;
        if (base == NULL) {&lt;br /&gt;
            OSSL_PROVIDER_unload(fips);&lt;br /&gt;
            printf(&amp;quot;Failed to load base provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(base);&lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Also note that in this example we have additionally loaded the &amp;quot;base&amp;quot; provider. This loads a sub-set of algorithms that are also available in the default provider - specifically non cryptographic ones which may be used in conjunction with the FIPS provider. For example this contains algorithms for encoding and decoding keys. If you decide not to load the default provider then you will usually want to load the base provider instead.&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conforms to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. The local property query overrides the default properties if the same property name is specified in both.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default and base providers that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the encoder and decoder algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The encoder and decoder algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;. Note that this config file does not load the &amp;quot;base&amp;quot; provider. All supporting algorithms that are in &amp;quot;base&amp;quot; are also in &amp;quot;default&amp;quot;, so it is unnecessary in this case:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default_sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS and base providers. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OSSL_LIB_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    nonfipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS and base providers so we&lt;br /&gt;
     * don't need to explicitly load them here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OSSL_LIB_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OSSL_LIB_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OSSL_LIB_CTX_free(fipslibctx);&lt;br /&gt;
    OSSL_LIB_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Encoders and Decoders with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Encoders and decoders are used to read and write keys or parameters from or to some external format (for example a PEM file). If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a encoder to do this. Similarly you need a decoder to read previously saved keys and parameters. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate encoder/decoder will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL encoder and decoder are implemented in both the default and base providers and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these encoder/decoder have the &amp;quot;fips=yes&amp;quot; property against them. You should ensure that either the default or base provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties and the default library context to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_ex(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use the same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX objects using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as encoders from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_ex(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
=== Confirming that an algorithm is being provided by the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
A chain of links needs to be followed to go from an algorithm instance to the provider that implements it.  The process is similar for all algorithms. Here the example of a digest is used.&lt;br /&gt;
&lt;br /&gt;
# To go from an ''EVP_MD_CTX'' to an ''EVP_MD'', use the '''EVP_MD_CTX_md()''' call.&lt;br /&gt;
# To go from the ''EVP_MD'' to its ''OSSL_PROVIDER'', use the '''EVP_MD_provider()''' call.&lt;br /&gt;
# To extract the name from the ''OSSL_PROVIDER'', use the '''OSSL_PROVIDER_name()''' call.&lt;br /&gt;
# Finally, use strcmp(3) or printf(3) on the name.&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - aarch64                    ||  Yes   ||  Yes      || Tested on 13.0-CURRENT&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - amd64                      ||  Yes   ||  Yes      || Tested on 12.1-STABLE and 11.3-STABLE&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - i386                       ||  Yes   ||  Yes      || Had to run &amp;lt;code&amp;gt;./config no-pic&amp;lt;/code&amp;gt; due to lack of CAST PIC support&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_ENCODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_DECODER                         || 100%               || 100%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented encoder / decoder ====&lt;br /&gt;
&lt;br /&gt;
===== Encoders =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Encoder                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Decoders =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Decoder                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on decoders&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider encoders for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3122</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3122"/>
		<updated>2020-09-15T22:54:15Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: Renamed OPENSSL_CTX to OSSL_LIB_CTX, anticipating the OpenSSL 3.0.0 alpha1 release. (Added a comment about the renaming and a link to the older revision.)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== License Change ===&lt;br /&gt;
&lt;br /&gt;
In previous versions, OpenSSL was licensed under the dual [https://www.openssl.org/source/license-openssl-ssleay.txt OpenSSL and SSLeay licenses] (both licenses apply). From OpenSSL 3.0 this is replaced by the [https://www.openssl.org/source/apache-license-2.0.txt Apache License v2].&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 5 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;high&amp;quot; level APIs (for example those functions prefixed with &amp;quot;EVP&amp;quot;). They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
One of the standard providers available is the FIPS provider. This makes available FIPS validated cryptographic algorithms.&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;high level&amp;quot; APIs (such as the &amp;quot;EVP&amp;quot; APIs) and the &amp;quot;low level&amp;quot; APIs. The high level APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the high level APIs instead.&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' have been removed from OpenSSL 3.0. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module (if you wish to use it). The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OSSL_LIB_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OSSL_LIB_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''In alpha releases of OpenSSL 3.0.0, the OSSL_LIB_CTX was called OPENSSL_CTX. It was renamed for OpenSSL 3.0.0 beta1. If you are still using an alpha release, take a look at this [https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;amp;oldid=3119 older version of the wiki page].''&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OSSL_LIB_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OSSL_LIB_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OSSL_LIB_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OSSL_LIB_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the high level APIs a provider is selected. It is that provider implementation that actually does the required work. There are five providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The base provider. This contains a small sub-set of non-cryptographic algorithms available in the default provider. For example algorithms to serialize and deserialize keys to files. If you do not load the default provider then you should always load this one instead (including if you are using the FIPS provider).&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are no longer present so you must remove them from your application if you use them.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they will automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsmodule.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot;. This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
        OSSL_PROVIDER *base;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        base = OSSL_PROVIDER_load(NULL, &amp;quot;base&amp;quot;);&lt;br /&gt;
        if (base == NULL) {&lt;br /&gt;
            OSSL_PROVIDER_unload(fips);&lt;br /&gt;
            printf(&amp;quot;Failed to load base provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(base);&lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Also note that in this example we have additionally loaded the &amp;quot;base&amp;quot; provider. This loads a sub-set of algorithms that are also available in the default provider - specifically non cryptographic ones which may be used in conjunction with the FIPS provider. For example this contains algorithms for serializing and de-serializing keys. If you decide not to load the default provider then you will usually want to load the base provider instead.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the high level APIs, such as EVP, instead)&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
All of the above APIs are deprecated in OpenSSL 3.0 - so a simple rule is to avoid using all deprecated functions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conforms to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. It is also possible for a locally specified property query to override the default properties.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default and base providers that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the serializer algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The serializer algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default_sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS and base providers. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OSSL_LIB_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    nonfipslibctx = OSSL_LIB_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS and base providers so we&lt;br /&gt;
     * don't need to explicitly load them here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OSSL_LIB_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OSSL_LIB_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OSSL_LIB_CTX_free(fipslibctx);&lt;br /&gt;
    OSSL_LIB_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers and Deserializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Serializers and deserializers are used to read and write keys or parameters from or to some external format (for example a PEM file). If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a serializer to do this. Similarly you need a deserializer to read previously saved keys and parameters. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate serializer/deserializer will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL serializers and deserializers are implemented in both the default and base providers and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these serializers/deserializers have the &amp;quot;fips=yes&amp;quot; property against them. You should ensure that either the default or base provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_with_libctx(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use this same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX objects using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as serializers from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
Note that in the OpenSSL alpha 1 and alpha 2 releases OpenSSL does not automatically detect what signature algorithms are available within the currently loaded providers. If signature algorithms in the default set are not available, then an OpenSSL endpoint will offer them anyway. This could result in a handshake failure if the peer decides to use that signature algorithm. As a workaround until this is implemented applications can set the supported signature algorithms manually using a function such as SSL_CTX_set1_sigalgs_list() or similar. See the man page [[https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs.html here]]&lt;br /&gt;
&lt;br /&gt;
=== Confirming that an algorithm is being provided by the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
A chain of links needs to be followed to go from an algorithm instance to the provider that implements it.  The process is similar for all algorithm, here the example of a digest is used.&lt;br /&gt;
&lt;br /&gt;
# To go from an ''EVP_MD_CTX'' to an ''EVP_MD'', use the '''EVP_MD_CTX_md()''' call.&lt;br /&gt;
# To go from the ''EVP_MD'' to its ''OSSL_PROVIDER'', use the '''EVP_MD_provider()''' call.&lt;br /&gt;
# To extract the name from the ''OSSL_PROVIDER'', use the '''OSSL_PROVIDER_name()''' call.&lt;br /&gt;
# Finally, use strcmp(3) or printf(3) on the name.&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - aarch64                    ||  Yes   ||  Yes      || Tested on 13.0-CURRENT&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - amd64                      ||  Yes   ||  Yes      || Tested on 12.1-STABLE and 11.3-STABLE&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - i386                       ||  Yes   ||  Yes      || Had to run &amp;lt;code&amp;gt;./config no-pic&amp;lt;/code&amp;gt; due to lack of CAST PIC support&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_SERIALIZER                      || 50%                || 50%                        || Serializer implemented, deserializer not implemented&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Serializer                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Deserializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Deserializer                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on deserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider serializers for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3100</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3100"/>
		<updated>2020-06-20T21:58:20Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Loading the FIPS module at the same time as other providers */ Fix typo in openssl.cnf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== License Change ===&lt;br /&gt;
&lt;br /&gt;
In previous versions, OpenSSL was licensed under the dual [https://www.openssl.org/source/license-openssl-ssleay.txt OpenSSL and SSLeay licenses] (both licenses apply). From OpenSSL 3.0 this is replaced by the [https://www.openssl.org/source/apache-license-2.0.txt Apache License v2].&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 4 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;EVP&amp;quot; set of APIs. They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;EVP&amp;quot; APIs and the &amp;quot;low level&amp;quot; APIs. The EVP APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
NOTE: The OpenSSL 3.0 alpha 1 release contains an error introduced during the release process which results in a failed compilation. There are two workarounds to choose between:&lt;br /&gt;
&lt;br /&gt;
* apply [https://github.com/openssl/openssl/pull/11624/files the patch from github PR #11624].&lt;br /&gt;
* edit the VERSION file in the top of the distribution to remove the quotes around the date on the RELEASE_DATE line, i.e. make that line look like this:&lt;br /&gt;
&lt;br /&gt;
    RELEASE_DATE=23 Apr 2020&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' have been removed from OpenSSL 3.0. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module (if you wish to use it). The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so -provider_name fips -mac_name HMAC -macopt digest:SHA256 -macopt hexkey:00 -section_name fips_sect&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OPENSSL_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OPENSSL_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OPENSSL_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OPENSSL_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OPENSSL_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OPENSSL_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the EVP APIs a provider is selected. It is that provider implementation that actually does the required work. There are four providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
Note that default properties are not currently functional in the OpenSSL 3.0 alpha 1 or alpha 2 releases.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are no longer present so you must remove them from your application if you use them.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they will automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsmodule.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot;. This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the EVP APIs instead). All such APIs are deprecated in OpenSSL 3.0 - so a simple rule is to avoid using all deprecated functions.&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conforms to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
NOTE: Default properties are currently not functional in the OpenSSL 3.0 alpha 1 and alpha 2 releases - see the known issues below&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. It is also possible for a locally specified property query to override the default properties.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default provider that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the serializer algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The serializer algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsmodule.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default_sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS provider. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OPENSSL_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    nonfipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS provider so we don't&lt;br /&gt;
     * need to explicitly load it here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OPENSSL_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OPENSSL_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OPENSSL_CTX_free(fipslibctx);&lt;br /&gt;
    OPENSSL_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Serializers are used to read and write keys or parameters from or to some external format (for example a PEM file). In the OpenSSL 3.0 alpha 1 and alpha 2 releases only the &amp;quot;write&amp;quot; serializers have been implemented. Reading will come in a later alpha release. If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a serializer to do this. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate serializer will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL serializers are implemented in the default provider and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these serializers have the &amp;quot;fips=yes&amp;quot; property against them. You must ensure that the default provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_with_libctx(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use this same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX objects using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as serializers from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
Note that in the OpenSSL alpha 1 and alpha 2 releases OpenSSL does not automatically detect what signature algorithms are available within the currently loaded providers. If signature algorithms in the default set are not available, then an OpenSSL endpoint will offer them anyway. This could result in a handshake failure if the peer decides to use that signature algorithm. As a workaround until this is implemented applications can set the supported signature algorithms manually using a function such as SSL_CTX_set1_sigalgs_list() or similar. See the man page [[https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs.html here]]&lt;br /&gt;
&lt;br /&gt;
=== Confirming that an algorithm is being provided by the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
A chain of links needs to be followed to go from an algorithm instance to the provider that implements it.  The process is similar for all algorithm, here the example of a digest is used.&lt;br /&gt;
&lt;br /&gt;
# To go from an ''EVP_MD_CTX'' to an ''EVP_MD'', use the '''EVP_MD_CTX_md()''' call.&lt;br /&gt;
# To go from the ''EVP_MD'' to its ''OSSL_PROVIDER'', use the '''EVP_MD_provider()''' call.&lt;br /&gt;
# To extract the name from the ''OSSL_PROVIDER'', use the '''OSSL_PROVIDER_name()''' call.&lt;br /&gt;
# Finally, use strcmp(3) or printf(3) on the name.&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - aarch64                    ||  Yes   ||  Yes      || Tested on 13.0-CURRENT&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - amd64                      ||  Yes   ||  Yes      || Tested on 12.1-STABLE and 11.3-STABLE&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD - i386                       ||  Yes   ||  Yes      || Had to run &amp;lt;code&amp;gt;./config no-pic&amp;lt;/code&amp;gt; due to lack of CAST PIC support&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_SERIALIZER                      || 50%                || 50%                        || Serializer implemented, deserializer not implemented&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Serializer                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Deserializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Deserializer                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on deserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider serializers for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3072</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3072"/>
		<updated>2020-05-09T21:30:35Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Providers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 4 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;EVP&amp;quot; set of APIs. They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;EVP&amp;quot; APIs and the &amp;quot;low level&amp;quot; APIs. The EVP APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
NOTE: The OpenSSL 3.0 alpha 1 release contains an error introduced during the release process which results in a failed compilation. There are two workarounds to choose between:&lt;br /&gt;
&lt;br /&gt;
* apply [https://github.com/openssl/openssl/pull/11624/files the patch from github PR #11624].&lt;br /&gt;
* edit the VERSION file in the top of the distribution to remove the quotes around the date on the RELEASE_DATE line, i.e. make that line look like this:&lt;br /&gt;
&lt;br /&gt;
    RELEASE_DATE=23 Apr 2020&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' are present in OpenSSL 3.0 but always fail. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module. The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsinstall.cnf -module /usr/local/lib/ossl-modules/fips.so -provider_name fips -mac_name HMAC -macopt digest:SHA256 -macopt hexkey:00 -section_name fips_sect&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OPENSSL_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OPENSSL_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OPENSSL_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OPENSSL_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OPENSSL_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OPENSSL_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the EVP APIs a provider is selected. It is that provider implementation that actually does the required work. There are four providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
Note that default properties are not currently functional in the OpenSSL 3.0 alpha 1 release.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are present, but always fail in OpenSSL 3.0 so you should not use them.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they will automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsinstall.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot;. This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the EVP APIs instead). All such APIs are deprecated in OpenSSL 3.0 - so a simple rule is to avoid using all deprecated functions.&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conform to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
NOTE: Default properties are currently not functional in the OpenSSL 3.0 alpha 1 release - see the known issues below&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. It is also possible for a locally specified property query to override the default properties.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default provider that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the serializer algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The serializer algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS provider. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OPENSSL_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    nonfipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS provider so we don't&lt;br /&gt;
     * need to explicitly load it here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OPENSSL_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OPENSSL_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OPENSSL_CTX_free(fipslibctx);&lt;br /&gt;
    OPENSSL_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Serializers are used to read and write keys or parameters from or to some external format (for example a PEM file). In the OpenSSL 3.0 alpha 1 release only the &amp;quot;write&amp;quot; serializers have been implemented. Reading will come in a later alpha release. If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a serializer to do this. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate serializer will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL serializers are implemented in the default provider and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these serializers have the &amp;quot;fips=yes&amp;quot; property against them. You must ensure that the default provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_with_libctx(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use this same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX object using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as serializers from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
Note that in the OpenSSL alpha1 release OpenSSL does not automatically detect what signature algorithms are available within the currently loaded providers. If signature algorithms in the default set are not available, then an OpenSSL endpoint will offer them anyway. This could result in a handshake failure if the peer decides to use that signature algorithm. As a workaround until this is implemented applications can set the supported signature algorithms manually using a function such as SSL_CTX_set1_sigalgs_list() or similar. See the man page [[https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs.html here]]&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_SERIALIZER                      || 50%                || 50%                        || Serializer implemented, deserializer not implemented&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 0%                 || ??                          || Scheduled for alpha 2&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default        || 80%                || ??                          || RSASSA-PSS support untested&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Serializer                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Deserializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Deserializer                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on deserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider serializers for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3071</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3071"/>
		<updated>2020-05-09T20:37:00Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Completing the installation of the FIPS Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 4 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;EVP&amp;quot; set of APIs. They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;EVP&amp;quot; APIs and the &amp;quot;low level&amp;quot; APIs. The EVP APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
=== Other notable deprecations and changes ===&lt;br /&gt;
&lt;br /&gt;
* The function code part of an OpenSSL error code is no longer relevant and is always set to zero. Related functions are deprecated.&lt;br /&gt;
&lt;br /&gt;
* The STACK and HASH macro's have been cleaned up, so that the type-safe wrappers are declared everywhere and implemented once.  See the manpage at https://www.openssl.org/docs/manmaster/man3/DEFINE_STACK_OF.html for stack, and hopefully soon once the PR is merged, https://www.openssl.org/docs/manmaster/man3/DECLARE_LHASH_OF.html (but not yet as of this writing).&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
NOTE: The OpenSSL 3.0 alpha 1 release contains an error introduced during the release process which results in a failed compilation. There are two workarounds to choose between:&lt;br /&gt;
&lt;br /&gt;
* apply [https://github.com/openssl/openssl/pull/11624/files the patch from github PR #11624].&lt;br /&gt;
* edit the VERSION file in the top of the distribution to remove the quotes around the date on the RELEASE_DATE line, i.e. make that line look like this:&lt;br /&gt;
&lt;br /&gt;
    RELEASE_DATE=23 Apr 2020&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' are present in OpenSSL 3.0 but always fail. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module. The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the FIPS module to its default location:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsinstall.cnf -module /usr/local/lib/ossl-modules/fips.so -provider_name fips -mac_name HMAC -macopt digest:SHA256 -macopt hexkey:00 -section_name fips_sect&lt;br /&gt;
&lt;br /&gt;
If you installed OpenSSL to a different location, you need to adjust the output and module path accordingly.&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OPENSSL_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OPENSSL_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OPENSSL_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OPENSSL_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OPENSSL_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OPENSSL_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the EVP APIs a provider is selected. It is that provider implementation that actually does the required work. There are four providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them.&lt;br /&gt;
This is a minimal config file example to load and activate both the legacy and the default provider in the default library context.&lt;br /&gt;
&lt;br /&gt;
    openssl_conf = openssl_init&lt;br /&gt;
    &lt;br /&gt;
    [openssl_init]&lt;br /&gt;
    providers = provider_sect&lt;br /&gt;
    &lt;br /&gt;
    [provider_sect]&lt;br /&gt;
    default = default_sect&lt;br /&gt;
    legacy = legacy_sect&lt;br /&gt;
    &lt;br /&gt;
    [default_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
    [legacy_sect]&lt;br /&gt;
    activate = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
Note that default properties are not currently functional in the OpenSSL 3.0 alpha 1 release.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are present, but always fail in OpenSSL 3.0 so you should not use them.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they will automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsinstall.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot;. This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the EVP APIs instead). All such APIs are deprecated in OpenSSL 3.0 - so a simple rule is to avoid using all deprecated functions.&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conform to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
NOTE: Default properties are currently not functional in the OpenSSL 3.0 alpha 1 release - see the known issues below&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. It is also possible for a locally specified property query to override the default properties.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default provider that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the serializer algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The serializer algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS provider. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OPENSSL_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    nonfipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS provider so we don't&lt;br /&gt;
     * need to explicitly load it here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OPENSSL_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OPENSSL_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OPENSSL_CTX_free(fipslibctx);&lt;br /&gt;
    OPENSSL_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Serializers are used to read and write keys or parameters from or to some external format (for example a PEM file). In the OpenSSL 3.0 alpha 1 release only the &amp;quot;write&amp;quot; serializers have been implemented. Reading will come in a later alpha release. If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a serializer to do this. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate serializer will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL serializers are implemented in the default provider and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these serializers have the &amp;quot;fips=yes&amp;quot; property against them. You must ensure that the default provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_with_libctx(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use this same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX object using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as serializers from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
Note that in the OpenSSL alpha1 release OpenSSL does not automatically detect what signature algorithms are available within the currently loaded providers. If signature algorithms in the default set are not available, then an OpenSSL endpoint will offer them anyway. This could result in a handshake failure if the peer decides to use that signature algorithm. As a workaround until this is implemented applications can set the supported signature algorithms manually using a function such as SSL_CTX_set1_sigalgs_list() or similar. See the man page [[https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs.html here]]&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
The percentages in the tables below represent the amount of work done to convert legacy implementations to a provider based ones.  Algorithms for which the conversion hasn't been completed (or ever started) remain full functional via the legacy code paths.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_SERIALIZER                      || 50%                || 50%                        || Serializer implemented, deserializer not implemented&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 0%                 || ??                          || Scheduled for alpha 2&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default        || 80%                || ??                          || RSASSA-PSS support untested&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Serializer                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Deserializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Deserializer                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on deserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider serializers for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3058</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3058"/>
		<updated>2020-04-23T17:00:26Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Upgrading from the the OpenSSL 2.0 FIPS Object Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 4 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;EVP&amp;quot; set of APIs. They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;EVP&amp;quot; APIs and the &amp;quot;low level&amp;quot; APIs. The EVP APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
NOTE: The OpenSSL 3.0 alpha 1 release contains an error introduced during the release process which results in a failed compilation. Please edit the VERSION file in the top of the distribution to remove the quotes around the date on the RELEASE_DATE line, i.e. that line should look like this:&lt;br /&gt;
&lt;br /&gt;
    RELEASE_DATE=23 Apr 2020&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' are present in OpenSSL 3.0 but always fail. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module. The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the module:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsinstall.cnf -module /usr/local/lib/ossl-modules/fips.so -provider_name fips -mac_name HMAC -macopt digest:SHA256 -macopt hexkey:00 -section_name fips_sect&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OPENSSL_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OPENSSL_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OPENSSL_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OPENSSL_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OPENSSL_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OPENSSL_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the EVP APIs a provider is selected. It is that provider implementation that actually does the required work. There are four providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them. It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
Note that default properties are not currently functional in the OpenSSL 3.0 alpha 1 release.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are present, but always fail in OpenSSL 3.0 so you should not use them.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they will automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsinstall.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot;. This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the EVP APIs instead). All such APIs are deprecated in OpenSSL 3.0 - so a simple rule is to avoid using all deprecated functions.&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conform to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
NOTE: Default properties are currently not functional in the OpenSSL 3.0 alpha 1 release - see the known issues below&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. It is also possible for a locally specified property query to override the default properties.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default provider that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the serializer algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The serializer algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS provider. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OPENSSL_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    nonfipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS provider so we don't&lt;br /&gt;
     * need to explicitly load it here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OPENSSL_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OPENSSL_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OPENSSL_CTX_free(fipslibctx);&lt;br /&gt;
    OPENSSL_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Serializers are used to read and write keys or parameters from or to some external format (for example a PEM file). In the OpenSSL 3.0 alpha 1 release only the &amp;quot;write&amp;quot; serializers have been implemented. Reading will come in a later alpha release. If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a serializer to do this. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate serializer will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL serializers are implemented in the default provider and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these serializers have the &amp;quot;fips=yes&amp;quot; property against them. You must ensure that the default provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_with_libctx(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use this same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX object using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as serializers from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
Note that in the OpenSSL alpha1 release OpenSSL does not automatically detect what signature algorithms are available within the currently loaded providers. If signature algorithms in the default set are not available, then an OpenSSL endpoint will offer them anyway. This could result in a handshake failure if the peer decides to use that signature algorithm. As a workaround until this is implemented applications can set the supported signature algorithms manually using a function such as SSL_CTX_set1_sigalgs_list() or similar. See the man page [[https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs.html here]]&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_SERIALIZER                      || 50%                || 50%                        || Serializer implemented, deserializer not implemented&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 0%                 || ??                          || Scheduled for alpha 2&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default        || 80%                || ??                          || RSASSA-PSS support untested&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Serializer                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Deserializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Deserializer                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on deserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider serializers for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3057</id>
		<title>OpenSSL 3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3057"/>
		<updated>2020-04-23T16:59:02Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: /* Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 */  Add link to OpenSSL 1.1.0 Changes page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is the next release of OpenSSL that is currently in development. This page is intended as a collection of notes for people downloading the alpha/beta releases or who are planning to upgrade from a previous version of OpenSSL to 3.0.&lt;br /&gt;
&lt;br /&gt;
== Main Changes in OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
=== Major Release ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 is a major release and consequently any application that currently uses an older version of OpenSSL will at the very least need to be recompiled in order to work with the new version. It is the intention that the large majority of applications will work unchanged with OpenSSL 3.0 if those applications previously worked with OpenSSL 1.1.1. However this is not guaranteed and some changes may be required in some cases. Changes may also be required if applications need to take advantage of some of the new features available in OpenSSL 3.0 such as the availability of the FIPS module.&lt;br /&gt;
&lt;br /&gt;
=== Providers and FIPS support ===&lt;br /&gt;
&lt;br /&gt;
One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider concept. Providers collect together and make available algorithm implementations. With OpenSSL 3.0 it is possible to specify, either programmatically or via a config file, which providers you want to use for any given application. OpenSSL 3.0 comes with 4 different providers as standard. Over time third parties may distribute additional providers that can be plugged into OpenSSL. All algorithm implementations available via providers are accessed through the &amp;quot;EVP&amp;quot; set of APIs. They cannot be accessed using the &amp;quot;low level&amp;quot; APIs (see below).&lt;br /&gt;
&lt;br /&gt;
=== Low Level APIs ===&lt;br /&gt;
&lt;br /&gt;
OpenSSL has historically provided two sets of APIs for invoking cryptographic algorithms: the &amp;quot;EVP&amp;quot; APIs and the &amp;quot;low level&amp;quot; APIs. The EVP APIs are typically designed to work across all algorithm types. The &amp;quot;low level&amp;quot; APIs are targeted at a specific algorithm implementation. For example, the EVP APIs provide the functions `EVP_EncryptInit_ex`, `EVP_EncryptUpdate` and `EVP_EncryptFinal` to perform symmetric encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc. On the other hand to do AES encryption using the low level APIs you would have to call AES specific functions such as `AES_set_encrypt_key`, `AES_encrypt`, and so on. The functions for 3DES are different.&lt;br /&gt;
&lt;br /&gt;
Use of the low level APIs has been informally discouraged by the OpenSSL development team for a long time. However in OpenSSL 3.0 this is made more formal. All such low level APIs have been deprecated. You may still ''use'' them in your applications, but you may start to see deprecation warnings during compilation (dependent on compiler support for this). Deprecated APIs may be removed from future versions of OpenSSL so you are strongly encouraged to update your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
=== Legacy Algorithms ===&lt;br /&gt;
&lt;br /&gt;
Some cryptographic algorithms that were available via the EVP APIs are now considered legacy and their use is strongly discouraged. These legacy EVP algorithms are still available in OpenSSL 3.0 but not by default. If you want to use them then you must load the legacy provider. This can be as simple as a config file change, or can be done programmatically (see below).&lt;br /&gt;
&lt;br /&gt;
=== Engines and &amp;quot;METHOD&amp;quot; APIs ===&lt;br /&gt;
&lt;br /&gt;
The refactoring to support Providers conflicts internally with the APIs used to support engines, including the ENGINE API and any function that creates or modifies custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.). These functions are being deprecated in OpenSSL 3.0, and users of these APIs should know that their use can likely bypass provider selection and configuration, with unintended consequences. This is particularly relevant for applications written to use the OpenSSL 3.0 FIPS module, as detailed below.&lt;br /&gt;
Authors and maintainers of external engines are strongly encouraged to refactor their code transforming engines into providers using the new Provider API and avoiding deprecated methods.&lt;br /&gt;
&lt;br /&gt;
=== Versioning Scheme ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL versioning scheme has changed with the 3.0 release. The new versioning scheme has this format:&lt;br /&gt;
&lt;br /&gt;
MAJOR.MINOR.PATCH&lt;br /&gt;
&lt;br /&gt;
For version 1.1.1 and below different patch levels were indicated by a letter at the end of the release version number. This will no longer be used and instead the patch level is indicated by the final number in the version. A change in the second (MINOR) number indicates that new features may have been added. OpenSSL versions with the same major number are API and ABI compatible. If the major number changes then API and ABI compatibility is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Other major new features ===&lt;br /&gt;
&lt;br /&gt;
* Implementation of the Certificate Management Protocol (CMP, RFC 4210) also covering CRMF (RFC 4211) and HTTP transfer (RFC 6712)&lt;br /&gt;
* A proper HTTP(S) client in libcrypto supporting GET and POST, redirection, plain and ASN.1-encoded contents, proxies, and timeouts&lt;br /&gt;
* EVP_KDF APIs have been introduced for working with Key Derivation Functions&lt;br /&gt;
* EVP_MAC APIs have been introduced for working with MACs&lt;br /&gt;
* Support for Linux Kernel TLS&lt;br /&gt;
&lt;br /&gt;
== Installation and Compilation of OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Please refer to the INSTALL.md file in the top of the distribution for instructions on how to build and install OpenSSL 3.0. Please also refer to the various platform specific NOTES files for your specific platform.&lt;br /&gt;
&lt;br /&gt;
NOTE: The OpenSSL 3.0 alpha 1 release contains an error introduced during the release process which results in a failed compilation. Please edit the VERSION file in the top of the distribution to remove the quotes around the date on the RELEASE_DATE line, i.e. that line should look like this:&lt;br /&gt;
&lt;br /&gt;
    RELEASE_DATE=23 Apr 2020&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight forward in most cases. The most likely area where you will encounter problems is if you have used low level APIs in your code (as discussed above). In that case you are likely to start seeing deprecation warnings when compiling your application. If this happens you have 3 options:&lt;br /&gt;
&lt;br /&gt;
1) Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.&lt;br /&gt;
&lt;br /&gt;
2) Suppress the warnings. Refer to your compiler documentation on how to do this.&lt;br /&gt;
&lt;br /&gt;
3) Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the EVP APIs instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more difficult. In addition to the issues discussed above in the section about upgrading from 1.1.1, the main things to be aware of are:&lt;br /&gt;
&lt;br /&gt;
1) The build and installation procedure has changed significantly since OpenSSL 1.0.2. Check the file INSTALL.md in the top of the installation for instructions on how to build and install OpenSSL for your platform. Also checkout the various NOTES files in the same directory, as applicable for your platform.&lt;br /&gt;
&lt;br /&gt;
2) Many structures have been made opaque in OpenSSL 3.0. The structure definitions have been removed from the public header files and moved to internal header files. In practice this means that you can no longer stack allocate some structures. Instead they must be heap allocated through some function call (typically those function names have a `_new` suffix to them). Additionally you must use &amp;quot;setter&amp;quot; or &amp;quot;getter&amp;quot; functions to access the fields within those structures.&lt;br /&gt;
&lt;br /&gt;
For example code that previously looked like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_init(&amp;amp;md_ctx);&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
&lt;br /&gt;
will now generate compiler errors. For example:&lt;br /&gt;
&lt;br /&gt;
 md_ctx.c:6:16: error: storage size of ‘md_ctx’ isn’t known&lt;br /&gt;
&lt;br /&gt;
The code needs to be amended to look like this:&lt;br /&gt;
&lt;br /&gt;
 EVP_MD_CTX *md_ctx;&lt;br /&gt;
 &lt;br /&gt;
 md_ctx = EVP_MD_CTX_new();&lt;br /&gt;
 if (md_ctx == NULL)&lt;br /&gt;
    /* Error */;&lt;br /&gt;
 &lt;br /&gt;
 /* Do something with the md_ctx */&lt;br /&gt;
 &lt;br /&gt;
 EVP_MD_CTX_free(md_ctx);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Support for TLSv1.3 has been added which has a number of implications for SSL/TLS applications. See the [[TLS1.3]] page for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0 can be found on the [[OpenSSL_1.1.0_Changes|OpenSSL 1.1.0 Changes]] page.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from the the OpenSSL 2.0 FIPS Object Module ===&lt;br /&gt;
&lt;br /&gt;
The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built separately and then integrated into your main OpenSSL 1.0.2 build. In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of OpenSSL and is no longer a separate download. You do not need to take separate build steps to add the FIPS support - it is built by default. You ''do'' need to take steps to ensure that your application is ''using'' the FIPS module in OpenSSL 3.0. See the further notes below on configuring this.&lt;br /&gt;
&lt;br /&gt;
The function calls 'FIPS_mode()' and 'FIPS_mode_set()' are present in OpenSSL 3.0 but always fail. You should rewrite your application to not use them. See the sections below on how to write applications to use the FIPS Module in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
== Completing the installation of the FIPS Module ==&lt;br /&gt;
&lt;br /&gt;
Once OpenSSL has been built and installed you will need to take explicit steps to complete the installation of the FIPS module. The OpenSSL 3.0 FIPS support is in the form of the FIPS provider which, on Unix, is in a `fips.so` file. On Windows this will be called `fips.dll`. Following installation of OpenSSL 3.0 the default location for this file is '/usr/local/lib/ossl-modules/fips.so' on Unix or 'C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll' on Windows.&lt;br /&gt;
&lt;br /&gt;
To complete the installation you need to run the 'fipsinstall' command line application. This does 2 things:&lt;br /&gt;
&lt;br /&gt;
* Runs the FIPS module self tests&lt;br /&gt;
* Generates FIPS module config file output containing information about the module such as the self test status, and the module checksum&lt;br /&gt;
&lt;br /&gt;
The FIPS module ''must'' have the self tests run, and the FIPS module config file output generated on ''every'' machine that it is to be used on. You '''must not''' copy the FIPS module config file output data from one machine to another.&lt;br /&gt;
&lt;br /&gt;
For example, to install the module:&lt;br /&gt;
&lt;br /&gt;
 $ openssl fipsinstall -out /usr/local/ssl/fipsinstall.cnf -module /usr/local/lib/ossl-modules/fips.so -provider_name fips -mac_name HMAC -macopt digest:SHA256 -macopt hexkey:00 -section_name fips_sect&lt;br /&gt;
&lt;br /&gt;
== Programming in OpenSSL 3.0 ==&lt;br /&gt;
&lt;br /&gt;
Applications written to work with OpenSSL 1.1.1 will mostly just work with OpenSSL 3.0. However changes will be required if you want to take advantage of some of the new features that OpenSSL 3.0 makes available. In order to do that you need to understand some new concepts introduced in OpenSSL 3.0.&lt;br /&gt;
&lt;br /&gt;
=== Library Contexts ===&lt;br /&gt;
&lt;br /&gt;
A library context can be thought of as a &amp;quot;scope&amp;quot; for OpenSSL operations. All functionality operates with the scope of a library context. Multiple library contexts may exist at the same time, and they each may be configured differently. A library context is represented by the newly introduced OPENSSL_CTX type. See the man page [https://www.openssl.org/docs/manmaster/man3/OPENSSL_CTX.html here].&lt;br /&gt;
&lt;br /&gt;
Many new functions have been introduced into OpenSSL that take an OPENSSL_CTX parameter. In many cases these are variants of some other function that existed in 1.1.1 and work in much the same way - except that they now operate within the scope of the given library context.&lt;br /&gt;
&lt;br /&gt;
All applications have available to them the &amp;quot;default library context&amp;quot;. This library context always exists and, if you don't otherwise specify one, this is the library context that will be used. Any function that takes an OPENSSL_CTX value as a parameter will accept the value NULL for that parameter in order to refer to the default library context. You can also explicitly create new ones via the OPENSSL_CTX_new() function. See the man page for further details.&lt;br /&gt;
&lt;br /&gt;
Config files affect a given library context. It is quite possible to have multiple library contexts in use, with each one having been configured with a different config file (see the OPENSSL_CTX_load_config() function described on the man page).&lt;br /&gt;
&lt;br /&gt;
=== Providers ===&lt;br /&gt;
&lt;br /&gt;
Providers are containers for algorithm implementations. Whenever a cryptographic algorithm is used via the EVP APIs a provider is selected. It is that provider implementation that actually does the required work. There are four providers distributed with OpenSSL. In the future we expect third parties to distribute their own providers which can be added to OpenSSL dynamically. Documentation about writing providers is available on the man page [https://www.openssl.org/docs/manmaster/man7/provider.html here].&lt;br /&gt;
&lt;br /&gt;
The standard providers are:&lt;br /&gt;
&lt;br /&gt;
* The default provider. This collects together all of the standard built-in OpenSSL algorithm implementations. If an application doesn't specify anything else explicitly (e.g. in the application or via config), then this is the provider that will be used. It is loaded automatically the first time that we try to get an algorithm from a provider if no other provider has been loaded yet. If another provider has already been loaded then it won't be loaded automatically. Therefore if you want to use it in conjunction with other providers then you must load it explicitly. This is a &amp;quot;built-in&amp;quot; provider which means that it is built into libcrypto and does not exist as a separate standalone module.&lt;br /&gt;
&lt;br /&gt;
* The legacy provider. This is a collection of legacy algorithms that are either no longer in common use or strongly discouraged from use. However some applications may need to use these algorithms for backwards compatibility reasons. This provider is NOT loaded by default. This may mean that some applications upgrading from earlier versions of OpenSSL may find that some algorithms are no longer available unless they load the legacy provider explicitly. Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5, BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).&lt;br /&gt;
&lt;br /&gt;
* The FIPS provider. This contains a sub-set of the algorithm implementations available from the default provider. Algorithms available in this provider conform to FIPS standards. It is intended that this provider will be FIPS140-2 validated. In some cases there may be minor behavioural differences between algorithm implementations in this provider compared to the equivalent algorithm in the default provider. This is typically in order to conform to FIPS standards.&lt;br /&gt;
&lt;br /&gt;
* The null provider. This provider is &amp;quot;built-in&amp;quot; to libcrypto and contains no algorithm implementations. In order to guarantee that the default provider is not automatically loaded, the null provider can be loaded instead. This can be useful if you are using non-default library contexts and want to ensure that the default library context is never used &amp;quot;by accident&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers to be loaded can be specified in the OpenSSL config file. See the man page [https://www.openssl.org/docs/manmaster/man5/config.html here]for information about how to configure providers via the config file, and how to automatically activate them. It is also possible to load them programmatically. For example you can load the legacy provider into the default library context as shown below. Note that once you have explicitly loaded a provider into the library context the default provider will no longer be automatically loaded. Therefore you will often also want to explicitly load the default provider, as is done here:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *legacy;&lt;br /&gt;
        OSSL_PROVIDER *deflt;&lt;br /&gt;
    &lt;br /&gt;
        /* Load Multiple providers into the default (NULL) library context */&lt;br /&gt;
        legacy = OSSL_PROVIDER_load(NULL, &amp;quot;legacy&amp;quot;);&lt;br /&gt;
        if (legacy == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Legacy provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
        deflt = OSSL_PROVIDER_load(NULL, &amp;quot;default&amp;quot;);&lt;br /&gt;
        if (deflt == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load Default provider\n&amp;quot;);&lt;br /&gt;
            OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(legacy);&lt;br /&gt;
        OSSL_PROVIDER_unload(deflt);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
=== Fetching algorithms and property queries ===&lt;br /&gt;
&lt;br /&gt;
In order to use a cryptographic algorithm (such as AES) then an implementation for it must first be &amp;quot;fetched&amp;quot; from the available providers that have been loaded into the library context being used. This can be done either implicitly or explicitly.&lt;br /&gt;
&lt;br /&gt;
With implicit fetching the application does not need to do anything special. Algorithms implementations will be fetched automatically by the relevant APIs. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
&lt;br /&gt;
In this code we are initialising a digest operation to use the SHA256 algorithm. The EVP_DigestInit_ex() function will automatically fetch an implementation of the SHA256 algorithm from the available providers when it needs to. It will do so using the default library context and the default property query string (see below).&lt;br /&gt;
&lt;br /&gt;
With explicit fetching an application fetches the implementation to be used up front, and then passes that to the relevant EVP API. For example:&lt;br /&gt;
&lt;br /&gt;
    EVP_MD_CTX *mdctx;&lt;br /&gt;
    EVP_MD *sha256;&lt;br /&gt;
    &lt;br /&gt;
    mdctx = EVP_MD_CTX_new();&lt;br /&gt;
    if (mdctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Setting the library ctx to NULL here fetches the algorithm from the providers loaded&lt;br /&gt;
     * into the default library context&lt;br /&gt;
     */&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (sha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    if (EVP_DigestInit_ex(mdctx, sha256, NULL) != 1)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Explicit fetches return a dynamic object that must be freed */&lt;br /&gt;
    EVP_MD_free(sha256);&lt;br /&gt;
&lt;br /&gt;
In this example we have explicitly fetched an implementation of SHA256 from the set of available providers loaded into the default library context.&lt;br /&gt;
&lt;br /&gt;
With an explicit fetch we can additionally supply a property query to further specify which implementation we wish to obtain. For example:&lt;br /&gt;
&lt;br /&gt;
    sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Here we are explicitly fetching a FIPS validated implementation of the SHA256 algorithm. Such an implementation exists in the FIPS provider, so we would need to have ensured that the FIPS provider was loaded into the default library context in order for this to be successful. If no algorithm implementation that matches the criteria can be located then the fetch will fail.&lt;br /&gt;
&lt;br /&gt;
See the section on fetching algorithms in the provider man page for further details: [https://www.openssl.org/docs/manmaster/man7/provider.html#Fetching-algorithms].&lt;br /&gt;
&lt;br /&gt;
If no specific property query is required then NULL can be passed for the last argument. In any case any supplied property query is combined with the default property query. If nothing else is specified then the default property query is empty. However this can be changed so that every fetch automatically inherits these default properties. Default properties can either be set programmatically or via a config file. See the section [[OpenSSL 3.0#Loading the FIPS module at the same time as other providers|Loading the FIPS module at the same time as other providers]] for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
Note that default properties are not currently functional in the OpenSSL 3.0 alpha 1 release.&lt;br /&gt;
&lt;br /&gt;
== Using the FIPS Module in applications ==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways that OpenSSL can be used in conjunction with the FIPS module. Which is the correct approach to use will depend on your own specific circumstances and what you are attempting to achieve. Note that the old functions FIPS_mode() and FIPS_mode_set() are present, but always fail in OpenSSL 3.0 so you should not use them.&lt;br /&gt;
&lt;br /&gt;
=== Making all applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
One simple approach is to cause all applications that are using OpenSSL to only use the FIPS module for cryptographic algorithms by default.&lt;br /&gt;
&lt;br /&gt;
This approach can be done purely via configuration. As long as applications are built and linked against OpenSSL 3.0 and do not override the loading of the default config file or its settings then they will automatically start using the FIPS module without the need for any further code changes.&lt;br /&gt;
&lt;br /&gt;
To do this the default OpenSSL config file will have to be modified. The location of this config file will depend on the platform, and any options that were given during the build process. You can check the location of the config file by running this command:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -d&lt;br /&gt;
 OPENSSLDIR: &amp;quot;/usr/local/ssl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Caution: Many Operating Systems install OpenSSL by default. It is a common error to not have the correct version of OpenSSL on your $PATH. Check that you are running an OpenSSL 3.0 version like this:&lt;br /&gt;
&lt;br /&gt;
 $ openssl version -v&lt;br /&gt;
 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)&lt;br /&gt;
&lt;br /&gt;
The OPENSSLDIR value above gives the directory name for where the default config file is stored. So in this case the default config file will be called /usr/local/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Edit the config file to add the following lines near the beginning:&lt;br /&gt;
&lt;br /&gt;
 openssl_conf = openssl_init&lt;br /&gt;
 &lt;br /&gt;
 .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
 &lt;br /&gt;
 [openssl_init]&lt;br /&gt;
 providers = provider_sect&lt;br /&gt;
 &lt;br /&gt;
 [provider_sect]&lt;br /&gt;
 fips = fips_sect&lt;br /&gt;
&lt;br /&gt;
Obviously the include file location above should match the name of the FIPS module config file that you installed earlier.&lt;br /&gt;
&lt;br /&gt;
Any applications that use OpenSSL 3.0 and are started after these changes are made will start using only the FIPS module unless those applications take explicit steps to avoid this default behaviour.&lt;br /&gt;
&lt;br /&gt;
This approach has the primary advantage that it is simple, and no code changes are required in applications in order to benefit from the FIPS module. There are some disadvantages to this approach:&lt;br /&gt;
&lt;br /&gt;
* You may not want ''all'' applications to use the FIPS module. It may be the case that some applications should and some should not.&lt;br /&gt;
* If applications take explicit steps to not load the default config file or set different settings then this method will not work for them&lt;br /&gt;
* The algorithms available in the FIPS module are a subset of the algorithms that are available in the default OpenSSL Provider. If those applications attempt to use any algorithms that are not present, then they will fail.&lt;br /&gt;
* Usage of certain APIs avoids the use of the FIPS module. If any applications use those APIs then the FIPS module will not be used.&lt;br /&gt;
&lt;br /&gt;
=== Selectively making applications use the FIPS module by default ===&lt;br /&gt;
&lt;br /&gt;
A variation on the above approach is to do the same thing on an individual application basis. The default OpenSSL config file depends on the compiled in value for OPENSSLDIR as described in the section above. However it is also possible to override the config file to be used via the OPENSSL_CONF environment variable. For example the following on Unix will cause the application to be executed with a non-standard config file location:&lt;br /&gt;
&lt;br /&gt;
 $ OPENSSL_CONF=/my/non-default/openssl.cnf myapplication&lt;br /&gt;
&lt;br /&gt;
Using this mechanism you can control which config file is loaded (and hence whether the FIPS module is loaded) on an application by application basis.&lt;br /&gt;
&lt;br /&gt;
This removes the disadvantage listed above that you may not want all applications to use the FIPS module. All the other advantages and disadvantages still apply.&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (default library context) ===&lt;br /&gt;
&lt;br /&gt;
Applications may choose to load the FIPS provider explicitly rather than relying on config to do this. The config file is still necessary in order to hold the FIPS module config data (such as its self test status and integrity data). But in this case we do not automatically activate the FIPS provider via that config file.&lt;br /&gt;
&lt;br /&gt;
To do things this way configure as per the section &amp;quot;Making all applications use the FIPS module by default&amp;quot; above, but edit the fipsinstall.cnf file to remove or comment out the line which says &amp;quot;activate = 1&amp;quot;. This means all the required config information will be available to load the FIPS module, but it is not actually automatically loaded when the application starts. The FIPS provider can then be loaded programmatically like this:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;openssl/provider.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    int main(void)&lt;br /&gt;
    {&lt;br /&gt;
        OSSL_PROVIDER *fips;&lt;br /&gt;
    &lt;br /&gt;
        fips = OSSL_PROVIDER_load(NULL, &amp;quot;fips&amp;quot;);&lt;br /&gt;
        if (fips == NULL) {&lt;br /&gt;
            printf(&amp;quot;Failed to load FIPS provider\n&amp;quot;);&lt;br /&gt;
            exit(EXIT_FAILURE);&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        /* Rest of application */&lt;br /&gt;
    &lt;br /&gt;
        OSSL_PROVIDER_unload(fips);&lt;br /&gt;
        exit(EXIT_SUCCESS);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that this should be one of the first things that you do in your application. If any OpenSSL functions get called that require the use of cryptographic functions before this occurs then, if no provider has yet been loaded, then the default provider will be automatically loaded. If you then later explicitly load the FIPS provider then you will have both the FIPS and the default provider loaded at the same time. It is undefined which implementation of an algorithm will be used if multiple implementations are available and you have not explicitly specified via a property query (see below) which one should be used.&lt;br /&gt;
&lt;br /&gt;
Applications written to use the OpenSSL 3.0 FIPS module should not use any legacy APIs or features that avoid the FIPS module. Specifically this includes:&lt;br /&gt;
&lt;br /&gt;
* Low level cryptographic APIs (use the EVP APIs instead). All such APIs are deprecated in OpenSSL 3.0 - so a simple rule is to avoid using all deprecated functions.&lt;br /&gt;
* Engines&lt;br /&gt;
* Any functions that create or modify custom &amp;quot;METHODS&amp;quot; (for example EVP_MD_meth_new, EVP_CIPHER_meth_new, EVP_PKEY_meth_new, RSA_meth_new, EC_KEY_METHOD_new, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
It is possible to have the FIPS provider and other providers (such as the default provider) all loaded at the same time into the same library context. You can use a property query string during algorithm fetches to specify which implementation you would like to use. &lt;br /&gt;
&lt;br /&gt;
For example to fetch an implementation of SHA256 which conform to FIPS standards you can specify the property query &amp;quot;fips=yes&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no property query is specified, or more than one implementation matches the property query then it is undefined which implementation of a particular algorithm will be returned.&lt;br /&gt;
&lt;br /&gt;
This example shows an explicit request for an implementation of SHA256 from the default provider:&lt;br /&gt;
&lt;br /&gt;
   EVP_MD *sha256;&lt;br /&gt;
   &lt;br /&gt;
   sha256 = EVP_MD_fetch(NULL, &amp;quot;SHA2-256&amp;quot;, &amp;quot;provider=default&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
It is also possible to set a default property query string. The following example sets the default property query of &amp;quot;fips=yes&amp;quot; for all fetches within the default library  context:&lt;br /&gt;
&lt;br /&gt;
   EVP_set_default_properties(NULL, &amp;quot;fips=yes&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
NOTE: Default properties are currently not functional in the OpenSSL 3.0 alpha 1 release - see the known issues below&lt;br /&gt;
&lt;br /&gt;
If a fetch function has both an explicit property query specified, and a default property query is defined then the two queries are merged together and both apply. It is also possible for a locally specified property query to override the default properties.&lt;br /&gt;
&lt;br /&gt;
There are two important built-in properties that you should be aware of:&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;provider&amp;quot; property enables you to specify which provider you want an implementation to be fetched from, e.g. &amp;quot;provider=default&amp;quot; or &amp;quot;provider=fips&amp;quot;. All algorithms implemented in a provider have this property set on them.&lt;br /&gt;
&lt;br /&gt;
There is also the &amp;quot;fips&amp;quot; property. All FIPS algorithms match against the property query &amp;quot;fips=yes&amp;quot;. There are also some non-cryptographic algorithms available in the default provider that also have the &amp;quot;fips=yes&amp;quot; property defined for them. These are the serializer algorithms that can (for example) be used to write out a key generated in the FIPS provider to a file. The serializer algorithms are not in the FIPS module itself but are allowed to be used in conjunction with the FIPS algorithms.&lt;br /&gt;
&lt;br /&gt;
It is possible to specify default properties within a config file. For example the following config file automatically loads the default and fips providers and sets the default property value to be &amp;quot;fips=yes&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
   openssl_conf = openssl_init&lt;br /&gt;
   &lt;br /&gt;
   .include /usr/local/ssl/fipsinstall.cnf&lt;br /&gt;
   &lt;br /&gt;
   [openssl_init]&lt;br /&gt;
   providers = provider_sect&lt;br /&gt;
   alg_section = algorithm_sect&lt;br /&gt;
   &lt;br /&gt;
   [provider_sect]&lt;br /&gt;
   fips = fips_sect&lt;br /&gt;
   default = default sect&lt;br /&gt;
   &lt;br /&gt;
   [default_sect]&lt;br /&gt;
   activate = 1&lt;br /&gt;
   &lt;br /&gt;
   [algorithm_sect]&lt;br /&gt;
   default_properties = fips=yes&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
In addition to using properties to separate usage of the FIPS module from other usages this can also be achieved using library contexts. In this example we create two library contexts. In one we assume the existence of a config file called &amp;quot;openssl-fips.cnf&amp;quot; that automatically loads and configures the FIPS provider. The other library context will just use the default provider.&lt;br /&gt;
&lt;br /&gt;
    OPENSSL_CTX *fipslibctx, *nonfipslibctx;&lt;br /&gt;
    OSSL_PROVIDER *defctxnull = NULL;&lt;br /&gt;
    EVP_MD *fipssha256 = NULL, *nonfipssha256 = NULL;&lt;br /&gt;
    int ret = 1;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Create two non-default library contexts. One for fips usage and one for&lt;br /&gt;
     * non-fips usage&lt;br /&gt;
     */&lt;br /&gt;
    fipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    nonfipslibctx = OPENSSL_CTX_new();&lt;br /&gt;
    if (fipslibctx == NULL || nonfipslibctx == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Prevent anything from using the default library context */&lt;br /&gt;
    defctxnull = OSSL_PROVIDER_load(NULL, &amp;quot;null&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Load config file for the FIPS library context. We assume that this&lt;br /&gt;
     * config file will automatically activate the FIPS provider so we don't&lt;br /&gt;
     * need to explicitly load it here.&lt;br /&gt;
     */&lt;br /&gt;
    if (!OPENSSL_CTX_load_config(fipslibctx, &amp;quot;openssl-fips.cnf&amp;quot;))&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * We don't need to do anything special to load the default provider into&lt;br /&gt;
     * nonfipslibctx. This happens automatically if no other providers are&lt;br /&gt;
     * loaded. Because we don't call OPENSSL_CTX_load_config() explicitly for&lt;br /&gt;
     * nonfipslibctx it will just use the default config file.&lt;br /&gt;
     */&lt;br /&gt;
    &lt;br /&gt;
    /* As an example get some digests */&lt;br /&gt;
    &lt;br /&gt;
    /* Get a FIPS validated digest */&lt;br /&gt;
    fipssha256 = EVP_MD_fetch(fipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (fipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Get a non-FIPS validated digest */&lt;br /&gt;
    nonfipssha256 = EVP_MD_fetch(nonfipslibctx, &amp;quot;SHA2-256&amp;quot;, NULL);&lt;br /&gt;
    if (nonfipssha256 == NULL)&lt;br /&gt;
        goto err;&lt;br /&gt;
    &lt;br /&gt;
    /* Use the digests */&lt;br /&gt;
    &lt;br /&gt;
    printf(&amp;quot;Success\n&amp;quot;);&lt;br /&gt;
    ret = 0;&lt;br /&gt;
 err:&lt;br /&gt;
    EVP_MD_free(fipssha256);&lt;br /&gt;
    EVP_MD_free(nonfipssha256);&lt;br /&gt;
    OPENSSL_CTX_free(fipslibctx);&lt;br /&gt;
    OPENSSL_CTX_free(nonfipslibctx);&lt;br /&gt;
    OSSL_PROVIDER_unload(defctxnull);&lt;br /&gt;
    &lt;br /&gt;
    return ret;&lt;br /&gt;
&lt;br /&gt;
Note that we have made use of the special &amp;quot;null&amp;quot; provider here which we load into the default library context. We could have chosen to use the default library context for FIPS usage, and just create one additional library context for other usages - or vice versa. However if code has not been converted to use library contexts then the default library context will be automatically used. This could be the case for your own existing applications as well as certain parts of OpenSSL itself. Not all parts of OpenSSL are library context aware. If this happens then you could &amp;quot;accidentally&amp;quot; use the wrong library context for a particular operation. To be sure this doesn't happen you can load the &amp;quot;null&amp;quot; provider into the default library context. Because a provider has been explicitly loaded, the default provider will not automatically load. This means code using the default context by accident will fail because no algorithms will be available.&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
Serializers are used to read and write keys or parameters from or to some external format (for example a PEM file). In the OpenSSL 3.0 alpha 1 release only the &amp;quot;write&amp;quot; serializers have been implemented. Reading will come in a later alpha release. If your application generates keys or parameters that then need to be written into PEM or DER format then it is likely that you will need to use a serializer to do this. In most cases this will be invisible to you if you are using APIs that existed in OpenSSL 1.1.1 or earlier such as i2d_PrivateKey. However the appropriate serializer will need to be available in the library context associated with the key or parameter object. The built-in OpenSSL serializers are implemented in the default provider and are not in the FIPS module boundary. However since they are not cryptographic algorithms themselves it is still possible to use them in conjunction with the FIPS module, and therefore these serializers have the &amp;quot;fips=yes&amp;quot; property against them. You must ensure that the default provider is loaded into the library context in this case.&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
Writing an application that uses libssl in conjunction with the FIPS module is much the same as writing a normal libssl application. If you are using global properties to specify usage of FIPS validated algorithms then this will happen automatically for all cryptographic algorithms in libssl. If you are using a non-default library context to load the FIPS provider then you can supply this to libssl using the function SSL_CTX_new_with_libctx(). This works as a drop in replacement for the function SSL_CTX_new() except it provides you with the capability to specify the library context to be used. You can also use this same function to specify libssl specific properties to use.&lt;br /&gt;
&lt;br /&gt;
In this first example we create two SSL_CTX object using two different library contexts.&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the FIPS provider loaded has been&lt;br /&gt;
     * created called fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(fips_libctx, NULL, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * We assume that a non-default library context with the default provider loaded has been&lt;br /&gt;
     * created called non_fips_libctx.&lt;br /&gt;
     /&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(non_fips_libctx, NULL, TLS_method());&lt;br /&gt;
&lt;br /&gt;
In this second example we create two SSL_CTX objects using different properties to specify FIPS usage:&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;fips=yes&amp;quot; property includes all FIPS approved algorithms as well as serializers from the&lt;br /&gt;
     * default provider that are allowed to be used. The NULL below indicates that we are using the&lt;br /&gt;
     * default library context.&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;fips=yes&amp;quot;, TLS_method());&lt;br /&gt;
    /*&lt;br /&gt;
     * The &amp;quot;provider!=fips&amp;quot; property allows algorithms from any provider except the FIPS provider&lt;br /&gt;
     */&lt;br /&gt;
    SSL_CTX *non_fips_ssl_ctx = SSL_CTX_new_with_libctx(NULL, &amp;quot;provider!=fips&amp;quot;, TLS_method());&lt;br /&gt;
&lt;br /&gt;
Note that in the OpenSSL alpha1 release OpenSSL does not automatically detect what signature algorithms are available within the currently loaded providers. If signature algorithms in the default set are not available, then an OpenSSL endpoint will offer them anyway. This could result in a handshake failure if the peer decides to use that signature algorithm. As a workaround until this is implemented applications can set the supported signature algorithms manually using a function such as SSL_CTX_set1_sigalgs_list() or similar. See the man page [[https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs.html here]]&lt;br /&gt;
&lt;br /&gt;
== Openssl command line application changes ==&lt;br /&gt;
&lt;br /&gt;
The following additional command line arguments have been added&lt;br /&gt;
&lt;br /&gt;
 '''-provider_path''' path_name   - Provider load path&lt;br /&gt;
 '''-provider''' provider_name    - Provider to load&lt;br /&gt;
&lt;br /&gt;
These options can be used multiple times to load any providers, such as the 'legacy' provider or third party providers.&lt;br /&gt;
If used then the 'default' provider would also need to be specified if required.&lt;br /&gt;
The -provider_path must be specified before the -provider option.&lt;br /&gt;
&lt;br /&gt;
== STATUS of current development ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The STATUS section should disappear as soon as 3.0.0 is finally relased --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''[this is a collection of notes, changing as time and alpha / beta releases go]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The following should change to &amp;quot;alpha&amp;quot; and &amp;quot;beta&amp;quot; when we enter those release phases --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current status of OpenSSL 3.0 is '''in development'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The next status is expected to be '''alpha'''&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
==== Building and testing ====&lt;br /&gt;
&lt;br /&gt;
* Doesn't build and test on all platforms on our watch list.  See the list of [[#Platforms|platforms]] below&amp;lt;br /&amp;gt;&lt;br /&gt;
: ''To be noted that we can't pretend to build on everything and anything, but there are a number of platforms that we watch, either on our own or with community help and reporting''&lt;br /&gt;
&lt;br /&gt;
==== Integration ====&lt;br /&gt;
&lt;br /&gt;
(these issues are tracked in [[#Provider implementation support in other OpenSSL APIs|a table further down]])&lt;br /&gt;
&lt;br /&gt;
* PKCS#7, CMS, SSL/TLS don't work with asymmetric keys implemented by a provider.  There's a temporary hack in place that &amp;quot;downgrades&amp;quot; such keys to work with legacy methods (&amp;lt;tt&amp;gt;EVP_PKEY_METHOD&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;EVP_PKEY_ASN1_METHOD&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* CMP/CRMF, PKCS#7, TS, CMS, PKCS#12 and OSSL_STORE currently have no library context support&lt;br /&gt;
* OCSP, PEM, ASN.1 have some very limited library context support&lt;br /&gt;
* It is not yet possible to &amp;quot;fetch&amp;quot; a RAND algorithm&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594 github #11594])&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS ====&lt;br /&gt;
&lt;br /&gt;
* libssl does not currently detect what signature algorithms are available within the currently loaded providers. Unless explicitly configured differently endpoints will advertise to peers the default list of signature algorithms that are supported - even if those are not available in the currently loaded providers. This could result in handshake failures. As a workaround until this is fixed you should explicitly configure signature algorithms that are consistent with the loaded providers.&lt;br /&gt;
&lt;br /&gt;
=== Platforms ===&lt;br /&gt;
&lt;br /&gt;
These are platforms that have been observed so far.  More will be added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Platform                             !! Builds !! Tests     !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| Linux - x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Linux - s390x                        ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| Windows + Visual C - x86 / x86_64    ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS - Alpha / Itanium            ||  No    ||  Unknown  || New include directories need to be dealt with, and more elegantly than the 1.1.1 kludge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
All the core support features are in.&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented operation types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| EVP_DIGEST                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_CIPHER                           || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_MAC                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KDF                              || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_ASYM_CIPHER                      || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYEXCH                          || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_SIGNATURE                        || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EVP_KEYMGMT                          || 95%                || 70%                        || Missing functionality for loading HSM keys&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_SERIALIZER                      || 50%                || 50%                        || Serializer implemented, deserializer not implemented&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| AES                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ARIA                                 || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BF                                   || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAMELLIA                             || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CAST                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DESX                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DES-EDE3                             || default, FIPS  || 100%               || ??                        || For FIPS, only DES-EDE3-ECB and DES-EDE3-CBC&lt;br /&gt;
|-&lt;br /&gt;
| IDEA                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RC5                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SEED                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM4                                  || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                               || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM3                                  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD2                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD4                                  || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| MD5, MD5-SHA1                        || default        || 100%               || ??                          || MD5-SHA1 is a TLS special, not otherwise useful&lt;br /&gt;
|-&lt;br /&gt;
| MDC2                                 || legacy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA1                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA2                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHA3                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SHAKE                                || default, FIPS  || 100%               || ??                          || For the FIPS provider, only SHAKE-256 is available, not SHAKE-128.&lt;br /&gt;
|-&lt;br /&gt;
| RIPEMD-160                           || leagcy         || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| WHIRLPOOL                            || legacy         || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| GMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| HMAC                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| POLY1305                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SIPHASH                                  || default  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| HKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KBKDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KRB5KDF                                  || default  || 100%               || ?? || Kerberos KDF&lt;br /&gt;
|-&lt;br /&gt;
| PBKDF2                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SCRYPT                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SSKDF                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| TLS1-PRF                                  || default, FIPS  || 100%               || ?? || TLS 1.x PRF is treated as a KDF by OpenSSL&lt;br /&gt;
|-&lt;br /&gt;
| X942KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X963KDF                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key type                              !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                    || default, FIPS  || 95% &amp;lt;!-- DHX? --&amp;gt;  || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC                                    || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, X25519, ED448, X448          || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ?? || Vendor affirmed for FIPS, they cannot yet be validated.&lt;br /&gt;
|-&lt;br /&gt;
| RSA                                   || default, FIPS  || 100% &amp;lt;!-- ? --&amp;gt;    || ??                          || RSA-PSS or RSA-OAEP are considered separate key types, although the RSA EVP_ASYM_CIPHER and EVP_SIGNATURE implementations carry some of the corresponding properties.&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS                               || default        || 0%                 || ??                          || Scheduled for alpha 2&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP                              || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2                                   || default        || 0%                 || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| RSA                      || default, FIPS  || 80%                || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSAES-OAEP                      || default  || 80%                || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DSA                                  || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDSA                                || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519, ED448                       || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|-&lt;br /&gt;
| RSA, RSASSA-PSS                      || default        || 80%                || ??                          || RSASSA-PSS support untested&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm                            !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH                                   || default, FIPS  || 70% &amp;lt;!-- ? --&amp;gt;     || ??                          || We lack support for X9.42 DH, which is needed by CMS&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ?? || In the FIPS provider, these are vendor affirmed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Serializer                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| DH to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| DSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED25519 to printable text, DER, PEM  || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ED448 to printable text, DER, PEM    || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| EC to printable text, DER, PEM       || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA to printable text, DER, PEM      || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-PSS to printable text, DER, PEM  || default        || 0%                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| RSA-OAEP to printable text, DER, PEM || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| SM2 to printable text, DER, PEM      || default        || 0% ?               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519 to printable text, DER, PEM   || default        || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X448 to printable text, DER, PEM     || default        || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Deserializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Deserializer                         !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! URI scheme                           !! Providers      !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| file:                                || default (?)    || 0%                 || ??                          || This is pending on deserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Library Context/Provider implementation support in other OpenSSL APIs ===&lt;br /&gt;
&lt;br /&gt;
Diverse OpenSSL APIs have been modified and continue to be modified to support provider implementations.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! API                                  !! Code completion %  !! Documentation completion %  !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| ASN1                                 || 5%                 || 5%&lt;br /&gt;
|-&lt;br /&gt;
| CMS                                  || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with CMS&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??                          || We need to investigate if we need to change anything&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OCSP                                 || 20%                || 20%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PEM                                  || 50%                || 50%                         || Integrated with provider serializers for writing out keys and parameters&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%                          || There are hacks in place that downgrade a key to legacy when used with PKCS#7&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#12                              || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 80%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations. Some processing happens in libssl that should be moved to a provider. Presence of signature algorithms is not correctly detected&lt;br /&gt;
|-&lt;br /&gt;
| TS                                   || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| X509                                 || 80%                || 80%                         || All changes needed to pass the libssl test suite have been done. We need to investigate if further changes are required&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=EVP_Authenticated_Encryption_and_Decryption&amp;diff=2746</id>
		<title>EVP Authenticated Encryption and Decryption</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=EVP_Authenticated_Encryption_and_Decryption&amp;diff=2746"/>
		<updated>2019-04-30T15:07:32Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DocInclude&lt;br /&gt;
|Name=Authenticated Encryption and Decryption&lt;br /&gt;
|Url=http://wiki.openssl.org/index.php/Manual:Evp(3)&lt;br /&gt;
|Include=evp.h}}&lt;br /&gt;
&lt;br /&gt;
The EVP interface supports the ability to perform authenticated encryption and decryption, as well as the option to attach unencrypted, associated data to the message. Such Authenticated-Encryption with Associated-Data (AEAD) schemes provide confidentiality by encrypting the data, and also provide authenticity assurances by creating a MAC tag over the encrypted data. The MAC tag will ensure the data is not accidentally altered or maliciously tampered during transmission and storage.&lt;br /&gt;
&lt;br /&gt;
There are a number of AEAD modes of operation. The modes include EAX, CCM and GCM mode. Using AEAD modes is nearly identical to using standard symmetric encryption modes like CBC, CFB and OFB modes.&lt;br /&gt;
&lt;br /&gt;
As with standard symmetric encryption you will need to know the following:&lt;br /&gt;
&lt;br /&gt;
* Algorithm (currently only AES is supported)&lt;br /&gt;
* Mode (currently only GCM and CCM are supported)&lt;br /&gt;
* Key&lt;br /&gt;
* Initialisation Vector (IV)&lt;br /&gt;
&lt;br /&gt;
In addition you can (optionally) provide some ''Additional Authenticated Data'' (AAD). The AAD data is not encrypted, and is typically passed to the recipient in plaintext along with the ciphertext. An example of AAD is the IP address and port number in a IP header used with IPsec.&lt;br /&gt;
&lt;br /&gt;
The output from the encryption operation will be the ciphertext, and a tag. The tag is subsequently used during the decryption operation to ensure that the ciphertext and AAD have not been tampered with.&lt;br /&gt;
&lt;br /&gt;
The OpenSSL manual describes the usage of the GCM and CCM modes here: [[Manual:EVP_EncryptInit(3)#GCM_Mode]].&lt;br /&gt;
&lt;br /&gt;
The complete source code of the following examples can be downloaded as [[Media:evp-gcm-encrypt.c|evp-gcm-encrypt.c]] resp.  [[Media:evp-ccm-encrypt.c|evp-ccm-encrypt.c]].&lt;br /&gt;
&lt;br /&gt;
==Authenticated Encryption using GCM mode==&lt;br /&gt;
&lt;br /&gt;
Encryption is performed in much the same way as for symmetric encryption as described [[EVP Symmetric Encryption and Decryption|here]]. The main differences are:&lt;br /&gt;
* You may optionally pass through an IV length using EVP_CIPHER_CTX_ctrl&lt;br /&gt;
* AAD data is passed through in zero or more calls to EVP_EncryptUpdate, with the output buffer set to NULL&lt;br /&gt;
* After the EVP_EncryptFinal_ex call a new call to EVP_CIPHER_CTX_ctrl retrieves the tag&lt;br /&gt;
&lt;br /&gt;
See the code below for an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int gcm_encrypt(unsigned char *plaintext, int plaintext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv, int iv_len,&lt;br /&gt;
                unsigned char *ciphertext,&lt;br /&gt;
                unsigned char *tag)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
&lt;br /&gt;
    int len;&lt;br /&gt;
&lt;br /&gt;
    int ciphertext_len;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the encryption operation. */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Set IV length if default 12 bytes (96 bits) is not appropriate&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv_len, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide any AAD data. This can be called zero or more times as&lt;br /&gt;
     * required&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be encrypted, and obtain the encrypted output.&lt;br /&gt;
     * EVP_EncryptUpdate can be called multiple times if necessary&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, ciphertext, &amp;amp;len, plaintext, plaintext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Finalise the encryption. Normally ciphertext bytes may be written at&lt;br /&gt;
     * this stage, but this does not occur in GCM mode&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &amp;amp;len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len += len;&lt;br /&gt;
&lt;br /&gt;
    /* Get the tag */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, 16, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    return ciphertext_len;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authenticated Decryption using GCM mode==&lt;br /&gt;
&lt;br /&gt;
Again, the decryption operation is much the same as for normal symmetric decryption as described [[EVP Symmetric Encryption and Decryption|here]]. The main differences are:&lt;br /&gt;
* You may optionally pass through an IV length using EVP_CIPHER_CTX_ctrl&lt;br /&gt;
* AAD data is passed through in zero or more calls to EVP_DecryptUpdate, with the output buffer set to NULL&lt;br /&gt;
* Prior to the EVP_DecryptFinal_ex call a new call to EVP_CIPHER_CTX_ctrl provides the tag&lt;br /&gt;
* A non positive return value from EVP_DecryptFinal_ex should be considered as a failure to authenticate ciphertext and/or AAD. It does not necessarily indicate a more serious error.&lt;br /&gt;
&lt;br /&gt;
See the code example below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int gcm_decrypt(unsigned char *ciphertext, int ciphertext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *tag,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv, int iv_len,&lt;br /&gt;
                unsigned char *plaintext)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
    int len;&lt;br /&gt;
    int plaintext_len;&lt;br /&gt;
    int ret;&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the decryption operation. */&lt;br /&gt;
    if(!EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set IV length. Not necessary if this is 12 bytes (96 bits) */&lt;br /&gt;
    if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv_len, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(!EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide any AAD data. This can be called zero or more times as&lt;br /&gt;
     * required&lt;br /&gt;
     */&lt;br /&gt;
    if(!EVP_DecryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be decrypted, and obtain the plaintext output.&lt;br /&gt;
     * EVP_DecryptUpdate can be called multiple times if necessary&lt;br /&gt;
     */&lt;br /&gt;
    if(!EVP_DecryptUpdate(ctx, plaintext, &amp;amp;len, ciphertext, ciphertext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    plaintext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /* Set expected tag value. Works in OpenSSL 1.0.1d and later */&lt;br /&gt;
    if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Finalise the decryption. A positive return value indicates success,&lt;br /&gt;
     * anything else is a failure - the plaintext is not trustworthy.&lt;br /&gt;
     */&lt;br /&gt;
    ret = EVP_DecryptFinal_ex(ctx, plaintext + len, &amp;amp;len);&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    if(ret &amp;gt; 0) {&lt;br /&gt;
        /* Success */&lt;br /&gt;
        plaintext_len += len;&lt;br /&gt;
        return plaintext_len;&lt;br /&gt;
    } else {&lt;br /&gt;
        /* Verify failed */&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authenticated Encryption using CCM mode==&lt;br /&gt;
&lt;br /&gt;
Encryption with CCM mode is much the same as for encryption with GCM but with some additional things to bear in mind.&lt;br /&gt;
* you can only call EVP_EncryptUpdate once for AAD and once for the plaintext.&lt;br /&gt;
* The total plaintext length must be passed to EVP_EncryptUpdate (only needed if AAD is passed)&lt;br /&gt;
* Optionally the tag and IV length can also be passed. If they are not then the defaults are used (12 bytes for AES tags, and 7 bytes for AES IVs)&lt;br /&gt;
&lt;br /&gt;
See the code below for an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int ccm_encrypt(unsigned char *plaintext, int plaintext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv,&lt;br /&gt;
                unsigned char *ciphertext,&lt;br /&gt;
                unsigned char *tag)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
&lt;br /&gt;
    int len;&lt;br /&gt;
&lt;br /&gt;
    int ciphertext_len;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the encryption operation. */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_256_ccm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Setting IV len to 7. Not strictly necessary as this is the default&lt;br /&gt;
     * but shown here for the purposes of this example.&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, 7, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set tag length */&lt;br /&gt;
    EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, 14, NULL);&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Provide the total plaintext length */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, NULL, &amp;amp;len, NULL, plaintext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Provide any AAD data. This can be called zero or one times as required */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be encrypted, and obtain the encrypted output.&lt;br /&gt;
     * EVP_EncryptUpdate can only be called once for this.&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, ciphertext, &amp;amp;len, plaintext, plaintext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Finalise the encryption. Normally ciphertext bytes may be written at&lt;br /&gt;
     * this stage, but this does not occur in CCM mode.&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &amp;amp;len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len += len;&lt;br /&gt;
&lt;br /&gt;
    /* Get the tag */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_GET_TAG, 14, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    return ciphertext_len;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authenticated Decryption using CCM mode==&lt;br /&gt;
&lt;br /&gt;
Decryption with CCM mode is much the same as for decryption with CCM but with some additional things to bear in mind.&lt;br /&gt;
* you can only call EVP_DecryptUpdate once for AAD and once for the plaintext.&lt;br /&gt;
* The total ciphertext length must be passed to EVP_DecryptUpdate (only needed if AAD is passed)&lt;br /&gt;
* Optionally the tag and IV length can also be passed. If they are not then the defaults are used (12 bytes for AES tags, and 7 bytes for AES IVs)&lt;br /&gt;
* The tag verify is performed when you call the final EVP_DecryptUpdate and is reflected by the return value: there is no call to EVP_DecryptFinal.&lt;br /&gt;
&lt;br /&gt;
See the code below for an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int ccm_decrypt(unsigned char *ciphertext, int ciphertext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *tag,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv,&lt;br /&gt;
                unsigned char *plaintext)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
    int len;&lt;br /&gt;
    int plaintext_len;&lt;br /&gt;
    int ret;&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the decryption operation. */&lt;br /&gt;
    if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_256_ccm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Setting IV len to 7. Not strictly necessary as this is the default&lt;br /&gt;
     * but shown here for the purposes of this example */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, 7, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set expected tag value. */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, 14, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(1 != EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /* Provide the total ciphertext length */&lt;br /&gt;
    if(1 != EVP_DecryptUpdate(ctx, NULL, &amp;amp;len, NULL, ciphertext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Provide any AAD data. This can be called zero or more times as required */&lt;br /&gt;
    if(1 != EVP_DecryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be decrypted, and obtain the plaintext output.&lt;br /&gt;
     * EVP_DecryptUpdate can be called multiple times if necessary&lt;br /&gt;
     */&lt;br /&gt;
    ret = EVP_DecryptUpdate(ctx, plaintext, &amp;amp;len, ciphertext, ciphertext_len);&lt;br /&gt;
&lt;br /&gt;
    plaintext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    if(ret &amp;gt; 0) {&lt;br /&gt;
        /* Success */&lt;br /&gt;
        return plaintext_len;&lt;br /&gt;
    } else {&lt;br /&gt;
        /* Verify failed */&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Potential Issue in AES/GCM ==&lt;br /&gt;
&lt;br /&gt;
Early versions of the authenticated encryption interface required using a 0-sized array (not a NULL array) to arrive at the proper authentication tag '''''when''''' the authentication tag size was ''not'' a multiple of the block size (for example, an authentication tag size of 20 bytes). For more information on the issue and the work-arounds, see [http://rt.openssl.org/Ticket/Display.html?id=2859 Issue #2859: Possible bug in AES GCM mode] and [http://groups.google.com/d/msg/mailing.openssl.users/idg9Z22MYZs/Jqlo8dA-2tMJ Possible bug in GCM/GMAC with (just) AAD of size unequal to block size].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[EVP]]&lt;br /&gt;
* [[Libcrypto API]]&lt;br /&gt;
* [[EVP Symmetric Encryption and Decryption]]&lt;br /&gt;
* [[EVP Asymmetric Encryption and Decryption of an Envelope]]&lt;br /&gt;
* [[EVP Signing and Verifying]]&lt;br /&gt;
* [[EVP Message Digests]]&lt;br /&gt;
* [[EVP Key Agreement]]&lt;br /&gt;
* [[EVP Key and Parameter Generation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Crypto API]]&lt;br /&gt;
[[Category:C level]]&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=File:Evp-gcm-encrypt.c&amp;diff=2745</id>
		<title>File:Evp-gcm-encrypt.c</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=File:Evp-gcm-encrypt.c&amp;diff=2745"/>
		<updated>2019-04-30T15:04:47Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: Mspncp uploaded a new version of File:Evp-gcm-encrypt.c&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(EVP GCM Authenticated Encryption and Decryption - C sample)&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=EVP_Authenticated_Encryption_and_Decryption&amp;diff=2744</id>
		<title>EVP Authenticated Encryption and Decryption</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=EVP_Authenticated_Encryption_and_Decryption&amp;diff=2744"/>
		<updated>2019-04-30T14:12:12Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: (Reformat code according to OpenSSL coding style and provide downloadable sample C files)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DocInclude&lt;br /&gt;
|Name=Authenticated Encryption and Decryption&lt;br /&gt;
|Url=http://wiki.openssl.org/index.php/Manual:Evp(3)&lt;br /&gt;
|Include=evp.h}}&lt;br /&gt;
&lt;br /&gt;
The EVP interface supports the ability to perform authenticated encryption and decryption, as well as the option to attach unencrypted, associated data to the message. Such Authenticated-Encryption with Associated-Data (AEAD) schemes provide confidentiality by encrypting the data, and also provide authenticity assurances by creating a MAC tag over the encrypted data. The MAC tag will ensure the data is not accidentally altered or maliciously tampered during transmission and storage.&lt;br /&gt;
&lt;br /&gt;
There are a number of AEAD modes of operation. The modes include EAX, CCM and GCM mode. Using AEAD modes is nearly identical to using standard symmetric encryption modes like CBC, CFB and OFB modes.&lt;br /&gt;
&lt;br /&gt;
As with standard symmetric encryption you will need to know the following:&lt;br /&gt;
&lt;br /&gt;
* Algorithm (currently only AES is supported)&lt;br /&gt;
* Mode (currently only GCM and CCM are supported)&lt;br /&gt;
* Key&lt;br /&gt;
* Initialisation Vector (IV)&lt;br /&gt;
&lt;br /&gt;
In addition you can (optionally) provide some ''Additional Authenticated Data'' (AAD). The AAD data is not encrypted, and is typically passed to the recipient in plaintext along with the ciphertext. An example of AAD is the IP address and port number in a IP header used with IPsec.&lt;br /&gt;
&lt;br /&gt;
The output from the encryption operation will be the ciphertext, and a tag. The tag is subsequently used during the decryption operation to ensure that the ciphertext and AAD have not been tampered with.&lt;br /&gt;
&lt;br /&gt;
The OpenSSL manual describes the usage of the GCM and CCM modes here: [[Manual:EVP_EncryptInit(3)#GCM_Mode]].&lt;br /&gt;
&lt;br /&gt;
The complete source code of the following examples can be downloaded as [[Media:evp-gcm-encrypt.c|evp-gcm-encrypt.c]] resp.  [[Media:evp-ccm-encrypt.c|evp-ccm-encrypt.c]].&lt;br /&gt;
&lt;br /&gt;
==Authenticated Encryption using GCM mode==&lt;br /&gt;
&lt;br /&gt;
Encryption is performed in much the same way as for symmetric encryption as described [[EVP Symmetric Encryption and Decryption|here]]. The main differences are:&lt;br /&gt;
* You may optionally pass through an IV length using EVP_CIPHER_CTX_ctrl&lt;br /&gt;
* AAD data is passed through in zero or more calls to EVP_EncryptUpdate, with the output buffer set to NULL&lt;br /&gt;
* After the EVP_EncryptFinal_ex call a new call to EVP_CIPHER_CTX_ctrl retrieves the tag&lt;br /&gt;
&lt;br /&gt;
See the code below for an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int gcm_encrypt(unsigned char *plaintext, int plaintext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv, int iv_len,&lt;br /&gt;
                unsigned char *ciphertext,&lt;br /&gt;
                unsigned char *tag)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
&lt;br /&gt;
    int len;&lt;br /&gt;
&lt;br /&gt;
    int ciphertext_len;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the encryption operation. */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set IV length if default 12 bytes (96 bits) is not appropriate */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv_len, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide any AAD data. This can be called zero or more times as&lt;br /&gt;
     * required&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be encrypted, and obtain the encrypted output.&lt;br /&gt;
     * EVP_EncryptUpdate can be called multiple times if necessary&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, ciphertext, &amp;amp;len, plaintext, plaintext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Finalise the encryption. Normally ciphertext bytes may be written at&lt;br /&gt;
     * this stage, but this does not occur in GCM mode&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &amp;amp;len)) handleErrors();&lt;br /&gt;
    ciphertext_len += len;&lt;br /&gt;
&lt;br /&gt;
    /* Get the tag */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, 16, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    return ciphertext_len;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authenticated Decryption using GCM mode==&lt;br /&gt;
&lt;br /&gt;
Again, the decryption operation is much the same as for normal symmetric decryption as described [[EVP Symmetric Encryption and Decryption|here]]. The main differences are:&lt;br /&gt;
* You may optionally pass through an IV length using EVP_CIPHER_CTX_ctrl&lt;br /&gt;
* AAD data is passed through in zero or more calls to EVP_DecryptUpdate, with the output buffer set to NULL&lt;br /&gt;
* Prior to the EVP_DecryptFinal_ex call a new call to EVP_CIPHER_CTX_ctrl provides the tag&lt;br /&gt;
* A non positive return value from EVP_DecryptFinal_ex should be considered as a failure to authenticate ciphertext and/or AAD. It does not necessarily indicate a more serious error.&lt;br /&gt;
&lt;br /&gt;
See the code example below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int gcm_decrypt(unsigned char *ciphertext, int ciphertext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *tag,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv, int iv_len,&lt;br /&gt;
                unsigned char *plaintext)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
    int len;&lt;br /&gt;
    int plaintext_len;&lt;br /&gt;
    int ret;&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new())) handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the decryption operation. */&lt;br /&gt;
    if(!EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set IV length. Not necessary if this is 12 bytes (96 bits) */&lt;br /&gt;
    if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv_len, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(!EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv)) handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide any AAD data. This can be called zero or more times as&lt;br /&gt;
     * required&lt;br /&gt;
     */&lt;br /&gt;
    if(!EVP_DecryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be decrypted, and obtain the plaintext output.&lt;br /&gt;
     * EVP_DecryptUpdate can be called multiple times if necessary&lt;br /&gt;
     */&lt;br /&gt;
    if(!EVP_DecryptUpdate(ctx, plaintext, &amp;amp;len, ciphertext, ciphertext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    plaintext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /* Set expected tag value. Works in OpenSSL 1.0.1d and later */&lt;br /&gt;
    if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Finalise the decryption. A positive return value indicates success,&lt;br /&gt;
     * anything else is a failure - the plaintext is not trustworthy.&lt;br /&gt;
     */&lt;br /&gt;
    ret = EVP_DecryptFinal_ex(ctx, plaintext + len, &amp;amp;len);&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    if(ret &amp;gt; 0) {&lt;br /&gt;
        /* Success */&lt;br /&gt;
        plaintext_len += len;&lt;br /&gt;
        return plaintext_len;&lt;br /&gt;
    } else {&lt;br /&gt;
        /* Verify failed */&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authenticated Encryption using CCM mode==&lt;br /&gt;
&lt;br /&gt;
Encryption with CCM mode is much the same as for encryption with GCM but with some additional things to bear in mind.&lt;br /&gt;
* you can only call EVP_EncryptUpdate once for AAD and once for the plaintext.&lt;br /&gt;
* The total plaintext length must be passed to EVP_EncryptUpdate (only needed if AAD is passed)&lt;br /&gt;
* Optionally the tag and IV length can also be passed. If they are not then the defaults are used (12 bytes for AES tags, and 7 bytes for AES IVs)&lt;br /&gt;
&lt;br /&gt;
See the code below for an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int ccm_encrypt(unsigned char *plaintext, int plaintext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv,&lt;br /&gt;
                unsigned char *ciphertext,&lt;br /&gt;
                unsigned char *tag)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
&lt;br /&gt;
    int len;&lt;br /&gt;
&lt;br /&gt;
    int ciphertext_len;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the encryption operation. */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_256_ccm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Setting IV len to 7. Not strictly necessary as this is the default&lt;br /&gt;
     * but shown here for the purposes of this example.&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, 7, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set tag length */&lt;br /&gt;
    EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, 14, NULL);&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(1 != EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Provide the total plaintext length */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, NULL, &amp;amp;len, NULL, plaintext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Provide any AAD data. This can be called zero or one times as required */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be encrypted, and obtain the encrypted output.&lt;br /&gt;
     * EVP_EncryptUpdate can only be called once for this.&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptUpdate(ctx, ciphertext, &amp;amp;len, plaintext, plaintext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Finalise the encryption. Normally ciphertext bytes may be written at&lt;br /&gt;
     * this stage, but this does not occur in CCM mode.&lt;br /&gt;
     */&lt;br /&gt;
    if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &amp;amp;len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
    ciphertext_len += len;&lt;br /&gt;
&lt;br /&gt;
    /* Get the tag */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_GET_TAG, 14, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    return ciphertext_len;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authenticated Decryption using CCM mode==&lt;br /&gt;
&lt;br /&gt;
Decryption with CCM mode is much the same as for decryption with CCM but with some additional things to bear in mind.&lt;br /&gt;
* you can only call EVP_DecryptUpdate once for AAD and once for the plaintext.&lt;br /&gt;
* The total ciphertext length must be passed to EVP_DecryptUpdate (only needed if AAD is passed)&lt;br /&gt;
* Optionally the tag and IV length can also be passed. If they are not then the defaults are used (12 bytes for AES tags, and 7 bytes for AES IVs)&lt;br /&gt;
* The tag verify is performed when you call the final EVP_DecryptUpdate and is reflected by the return value: there is no call to EVP_DecryptFinal.&lt;br /&gt;
&lt;br /&gt;
See the code below for an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int ccm_decrypt(unsigned char *ciphertext, int ciphertext_len,&lt;br /&gt;
                unsigned char *aad, int aad_len,&lt;br /&gt;
                unsigned char *tag,&lt;br /&gt;
                unsigned char *key,&lt;br /&gt;
                unsigned char *iv,&lt;br /&gt;
                unsigned char *plaintext)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX *ctx;&lt;br /&gt;
    int len;&lt;br /&gt;
    int plaintext_len;&lt;br /&gt;
    int ret;&lt;br /&gt;
&lt;br /&gt;
    /* Create and initialise the context */&lt;br /&gt;
    if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise the decryption operation. */&lt;br /&gt;
    if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_256_ccm(), NULL, NULL, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Setting IV len to 7. Not strictly necessary as this is the default&lt;br /&gt;
     * but shown here for the purposes of this example */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, 7, NULL))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Set expected tag value. */&lt;br /&gt;
    if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, 14, tag))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Initialise key and IV */&lt;br /&gt;
    if(1 != EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /* Provide the total ciphertext length */&lt;br /&gt;
    if(1 != EVP_DecryptUpdate(ctx, NULL, &amp;amp;len, NULL, ciphertext_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /* Provide any AAD data. This can be called zero or more times as required */&lt;br /&gt;
    if(1 != EVP_DecryptUpdate(ctx, NULL, &amp;amp;len, aad, aad_len))&lt;br /&gt;
        handleErrors();&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Provide the message to be decrypted, and obtain the plaintext output.&lt;br /&gt;
     * EVP_DecryptUpdate can be called multiple times if necessary&lt;br /&gt;
     */&lt;br /&gt;
    ret = EVP_DecryptUpdate(ctx, plaintext, &amp;amp;len, ciphertext, ciphertext_len);&lt;br /&gt;
&lt;br /&gt;
    plaintext_len = len;&lt;br /&gt;
&lt;br /&gt;
    /* Clean up */&lt;br /&gt;
    EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
&lt;br /&gt;
    if(ret &amp;gt; 0) {&lt;br /&gt;
        /* Success */&lt;br /&gt;
        return plaintext_len;&lt;br /&gt;
    } else {&lt;br /&gt;
        /* Verify failed */&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Potential Issue in AES/GCM ==&lt;br /&gt;
&lt;br /&gt;
Early versions of the authenticated encryption interface required using a 0-sized array (not a NULL array) to arrive at the proper authentication tag '''''when''''' the authentication tag size was ''not'' a multiple of the block size (for example, an authentication tag size of 20 bytes). For more information on the issue and the work-arounds, see [http://rt.openssl.org/Ticket/Display.html?id=2859 Issue #2859: Possible bug in AES GCM mode] and [http://groups.google.com/d/msg/mailing.openssl.users/idg9Z22MYZs/Jqlo8dA-2tMJ Possible bug in GCM/GMAC with (just) AAD of size unequal to block size].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[EVP]]&lt;br /&gt;
* [[Libcrypto API]]&lt;br /&gt;
* [[EVP Symmetric Encryption and Decryption]]&lt;br /&gt;
* [[EVP Asymmetric Encryption and Decryption of an Envelope]]&lt;br /&gt;
* [[EVP Signing and Verifying]]&lt;br /&gt;
* [[EVP Message Digests]]&lt;br /&gt;
* [[EVP Key Agreement]]&lt;br /&gt;
* [[EVP Key and Parameter Generation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Crypto API]]&lt;br /&gt;
[[Category:C level]]&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=File:Evp-ccm-encrypt.c&amp;diff=2743</id>
		<title>File:Evp-ccm-encrypt.c</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=File:Evp-ccm-encrypt.c&amp;diff=2743"/>
		<updated>2019-04-30T14:05:56Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: (EVP CCM Authenticated Encryption and Decryption - C sample)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(EVP CCM Authenticated Encryption and Decryption - C sample)&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=File:Evp-gcm-encrypt.c&amp;diff=2742</id>
		<title>File:Evp-gcm-encrypt.c</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=File:Evp-gcm-encrypt.c&amp;diff=2742"/>
		<updated>2019-04-30T14:02:56Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: (EVP GCM Authenticated Encryption and Decryption - C sample)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(EVP GCM Authenticated Encryption and Decryption - C sample)&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=EVP_Symmetric_Encryption_and_Decryption&amp;diff=2741</id>
		<title>EVP Symmetric Encryption and Decryption</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=EVP_Symmetric_Encryption_and_Decryption&amp;diff=2741"/>
		<updated>2019-04-30T11:55:19Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: Reformat code according to OpenSSL coding style and provide downloadable sample C file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DocInclude&lt;br /&gt;
|Name=Symmetric Encryption and Decryption&lt;br /&gt;
|Url=http://wiki.openssl.org/index.php/Manual:Evp(3)&lt;br /&gt;
|Include=evp.h}}&lt;br /&gt;
&lt;br /&gt;
The [[Libcrypto API|libcrypto]] library within OpenSSL provides functions for performing symmetric encryption and decryption operations across a wide range of algorithms and modes. This page walks you through the basics of performing a simple encryption and corresponding decryption operation.&lt;br /&gt;
&lt;br /&gt;
In order to perform encryption/decryption you need to know:&lt;br /&gt;
* Your algorithm&lt;br /&gt;
* Your mode&lt;br /&gt;
* Your key&lt;br /&gt;
* Your Initialisation Vector (IV)&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know what all of these things mean. If you don't then please refer to [[Basics of Encryption]].&lt;br /&gt;
&lt;br /&gt;
The complete source code of the following example can be downloaded as [[Media:evp-symmetric-encrypt.c|evp-symmetric-encrypt.c]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting it up==&lt;br /&gt;
&lt;br /&gt;
The code below sets up the program. In this example we are going to take a simple message (&amp;quot;The quick brown fox jumps over the lazy dog&amp;quot;), and then encrypt it using a predefined key and IV. In this example the key and IV have been hard coded in - in a real situation you would never do this! Following encryption we will then decrypt the resulting ciphertext, and (hopefully!) end up with the message we first started with. This program expects two functions to be defined: &amp;quot;encrypt&amp;quot; and &amp;quot;decrypt&amp;quot;. We will define those further down the page. Note that this uses the auto-init facility in 1.1.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;openssl/conf.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;openssl/evp.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;openssl/err.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main (void)&lt;br /&gt;
 {&lt;br /&gt;
     /*&lt;br /&gt;
      * Set up the key and iv. Do I need to say to not hard code these in a&lt;br /&gt;
      * real application? :-)&lt;br /&gt;
      */&lt;br /&gt;
 &lt;br /&gt;
     /* A 256 bit key */&lt;br /&gt;
     unsigned char *key = (unsigned char *)&amp;quot;01234567890123456789012345678901&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     /* A 128 bit IV */&lt;br /&gt;
     unsigned char *iv = (unsigned char *)&amp;quot;0123456789012345&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     /* Message to be encrypted */&lt;br /&gt;
     unsigned char *plaintext =&lt;br /&gt;
         (unsigned char *)&amp;quot;The quick brown fox jumps over the lazy dog&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Buffer for ciphertext. Ensure the buffer is long enough for the&lt;br /&gt;
      * ciphertext which may be longer than the plaintext, depending on the&lt;br /&gt;
      * algorithm and mode.&lt;br /&gt;
      */&lt;br /&gt;
     unsigned char ciphertext[128];&lt;br /&gt;
 &lt;br /&gt;
     /* Buffer for the decrypted text */&lt;br /&gt;
     unsigned char decryptedtext[128];&lt;br /&gt;
 &lt;br /&gt;
     int decryptedtext_len, ciphertext_len;&lt;br /&gt;
 &lt;br /&gt;
     /* Encrypt the plaintext */&lt;br /&gt;
     ciphertext_len = encrypt (plaintext, strlen ((char *)plaintext), key, iv,&lt;br /&gt;
                               ciphertext);&lt;br /&gt;
 &lt;br /&gt;
     /* Do something useful with the ciphertext here */&lt;br /&gt;
     printf(&amp;quot;Ciphertext is:\n&amp;quot;);&lt;br /&gt;
     BIO_dump_fp (stdout, (const char *)ciphertext, ciphertext_len);&lt;br /&gt;
 &lt;br /&gt;
     /* Decrypt the ciphertext */&lt;br /&gt;
     decryptedtext_len = decrypt(ciphertext, ciphertext_len, key, iv,&lt;br /&gt;
                                 decryptedtext);&lt;br /&gt;
 &lt;br /&gt;
     /* Add a NULL terminator. We are expecting printable text */&lt;br /&gt;
     decryptedtext[decryptedtext_len] = '\0';&lt;br /&gt;
 &lt;br /&gt;
     /* Show the decrypted text */&lt;br /&gt;
     printf(&amp;quot;Decrypted text is:\n&amp;quot;);&lt;br /&gt;
     printf(&amp;quot;%s\n&amp;quot;, decryptedtext);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The program sets up a 256 bit key and a 128 bit IV. This is appropriate for the 256-bit AES encryption that we going to be doing in CBC mode. Make sure you use the right key and IV length for the cipher you have selected, or it will go horribly wrong!! The IV should be random for CBC mode.&lt;br /&gt;
&lt;br /&gt;
We've also set up a buffer for the ciphertext to be placed in. It is important to ensure that this buffer is sufficiently large for the expected ciphertext or you may see a program crash (or potentially introduce a security vulnerability into your code). Note: The ciphertext may be longer than the plaintext (e.g. if padding is being used).&lt;br /&gt;
&lt;br /&gt;
We're also going to need a helper function to handle any errors. This will simply dump any error messages from the OpenSSL error stack to the screen, and then abort the program.&lt;br /&gt;
&lt;br /&gt;
 void handleErrors(void)&lt;br /&gt;
 {&lt;br /&gt;
     ERR_print_errors_fp(stderr);&lt;br /&gt;
     abort();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Encrypting the message==&lt;br /&gt;
&lt;br /&gt;
So now that we have set up the program we need to define the &amp;quot;encrypt&amp;quot; function. This will take as parameters the plaintext, the length of the plaintext, the key to be used, and the IV. We'll also take in a buffer to put the ciphertext in (which we assume to be long enough), and will return the length of the ciphertext that we have written.&lt;br /&gt;
&lt;br /&gt;
Encrypting consists of the following stages:&lt;br /&gt;
* Setting up a context&lt;br /&gt;
* Initialising the encryption operation&lt;br /&gt;
* Providing plaintext bytes to be encrypted&lt;br /&gt;
* Finalising the encryption operation&lt;br /&gt;
&lt;br /&gt;
During initialisation we will provide an EVP_CIPHER object. In this case we are using EVP_aes_256_cbc(), which uses the AES algorithm with a 256-bit key in [[CBC]] mode. Refer to [[EVP#Working with Algorithms and Modes]] for further details.&lt;br /&gt;
&lt;br /&gt;
 int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,&lt;br /&gt;
             unsigned char *iv, unsigned char *ciphertext)&lt;br /&gt;
 {&lt;br /&gt;
     EVP_CIPHER_CTX *ctx;&lt;br /&gt;
 &lt;br /&gt;
     int len;&lt;br /&gt;
 &lt;br /&gt;
     int ciphertext_len;&lt;br /&gt;
 &lt;br /&gt;
     /* Create and initialise the context */&lt;br /&gt;
     if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Initialise the encryption operation. IMPORTANT - ensure you use a key&lt;br /&gt;
      * and IV size appropriate for your cipher&lt;br /&gt;
      * In this example we are using 256 bit AES (i.e. a 256 bit key). The&lt;br /&gt;
      * IV size for *most* modes is the same as the block size. For AES this&lt;br /&gt;
      * is 128 bits&lt;br /&gt;
      */&lt;br /&gt;
     if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, key, iv))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Provide the message to be encrypted, and obtain the encrypted output.&lt;br /&gt;
      * EVP_EncryptUpdate can be called multiple times if necessary&lt;br /&gt;
      */&lt;br /&gt;
     if(1 != EVP_EncryptUpdate(ctx, ciphertext, &amp;amp;len, plaintext, plaintext_len))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
     ciphertext_len = len;&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Finalise the encryption. Further ciphertext bytes may be written at&lt;br /&gt;
      * this stage.&lt;br /&gt;
      */&lt;br /&gt;
     if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &amp;amp;len))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
     ciphertext_len += len;&lt;br /&gt;
 &lt;br /&gt;
     /* Clean up */&lt;br /&gt;
     EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
 &lt;br /&gt;
     return ciphertext_len;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Decrypting the Message==&lt;br /&gt;
&lt;br /&gt;
Finally we need to define the &amp;quot;decrypt&amp;quot; operation. This is very similar to encryption and consists of the following stages:&lt;br /&gt;
Decrypting consists of the following stages:&lt;br /&gt;
* Setting up a context&lt;br /&gt;
* Initialising the decryption operation&lt;br /&gt;
* Providing ciphertext bytes to be decrypted&lt;br /&gt;
* Finalising the decryption operation&lt;br /&gt;
&lt;br /&gt;
Again through the parameters we will receive the ciphertext to be decrypted, the length of the ciphertext, the key and the IV. We'll also receive a buffer to place the decrypted text into, and return the length of the plaintext we have found.&lt;br /&gt;
&lt;br /&gt;
Note that we have passed the length of the ciphertext. This is required as you cannot use functions such as &amp;quot;strlen&amp;quot; on this data - its binary! Similarly, even though in this example our plaintext really is ASCII text, OpenSSL does not know that. In spite of the name plaintext could be binary data, and therefore no NULL terminator will be put on the end (unless you encrypt the NULL as well of course).&lt;br /&gt;
&lt;br /&gt;
Here is the decrypt function:&lt;br /&gt;
&lt;br /&gt;
 int decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *key,&lt;br /&gt;
             unsigned char *iv, unsigned char *plaintext)&lt;br /&gt;
 {&lt;br /&gt;
     EVP_CIPHER_CTX *ctx;&lt;br /&gt;
 &lt;br /&gt;
     int len;&lt;br /&gt;
 &lt;br /&gt;
     int plaintext_len;&lt;br /&gt;
 &lt;br /&gt;
     /* Create and initialise the context */&lt;br /&gt;
     if(!(ctx = EVP_CIPHER_CTX_new()))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Initialise the decryption operation. IMPORTANT - ensure you use a key&lt;br /&gt;
      * and IV size appropriate for your cipher&lt;br /&gt;
      * In this example we are using 256 bit AES (i.e. a 256 bit key). The&lt;br /&gt;
      * IV size for *most* modes is the same as the block size. For AES this&lt;br /&gt;
      * is 128 bits&lt;br /&gt;
      */&lt;br /&gt;
     if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, key, iv))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Provide the message to be decrypted, and obtain the plaintext output.&lt;br /&gt;
      * EVP_DecryptUpdate can be called multiple times if necessary.&lt;br /&gt;
      */&lt;br /&gt;
     if(1 != EVP_DecryptUpdate(ctx, plaintext, &amp;amp;len, ciphertext, ciphertext_len))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
     plaintext_len = len;&lt;br /&gt;
 &lt;br /&gt;
     /*&lt;br /&gt;
      * Finalise the decryption. Further plaintext bytes may be written at&lt;br /&gt;
      * this stage.&lt;br /&gt;
      */&lt;br /&gt;
     if(1 != EVP_DecryptFinal_ex(ctx, plaintext + len, &amp;amp;len))&lt;br /&gt;
         handleErrors();&lt;br /&gt;
     plaintext_len += len;&lt;br /&gt;
 &lt;br /&gt;
     /* Clean up */&lt;br /&gt;
     EVP_CIPHER_CTX_free(ctx);&lt;br /&gt;
 &lt;br /&gt;
     return plaintext_len;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Ciphertext Output==&lt;br /&gt;
&lt;br /&gt;
If all goes well you should end up with output that looks like the following:&lt;br /&gt;
 Ciphertext is:&lt;br /&gt;
 0000 - e0 6f 63 a7 11 e8 b7 aa-9f 94 40 10 7d 46 80 a1   .oc.......@.}F..&lt;br /&gt;
 0010 - 17 99 43 80 ea 31 d2 a2-99 b9 53 02 d4 39 b9 70   ..C..1....S..9.p&lt;br /&gt;
 0020 - 2c 8e 65 a9 92 36 ec 92-07 04 91 5c f1 a9 8a 44   ,.e..6.....\...D&lt;br /&gt;
 Decrypted text is:&lt;br /&gt;
 The quick brown fox jumps over the lazy dog&lt;br /&gt;
&lt;br /&gt;
For further details about symmetric encryption and decryption operations refer to the OpenSSL documentation [[Manual:EVP_EncryptInit(3)]].&lt;br /&gt;
&lt;br /&gt;
==Padding==&lt;br /&gt;
&lt;br /&gt;
OpenSSL uses PKCS padding by default. If the mode you are using allows you to change the padding, then you can change it with &amp;lt;tt&amp;gt;[http://www.openssl.org/docs/man1.0.2/crypto/EVP_CIPHER_CTX_set_padding.html EVP_CIPHER_CTX_set_padding]&amp;lt;/tt&amp;gt;. From the man page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;EVP_CIPHER_CTX_set_padding() enables or disables padding. By default encryption operations are padded using standard block padding and the padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur...&lt;br /&gt;
&lt;br /&gt;
PKCS padding works by adding n padding bytes of value n to make the total length of the encrypted data a multiple of the block size. Padding is always added so if the data is already a multiple of the block size n will equal the block size. For example if the block size is 8 and 11 bytes are to be encrypted then 5 padding bytes of value 5 will be added...&lt;br /&gt;
&lt;br /&gt;
If padding is disabled then the decryption operation will only succeed if the total amount of data decrypted is a multiple of the block size.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==C++ Programs==&lt;br /&gt;
&lt;br /&gt;
Questions regarding how to use the EVP interfaces from a C++ program arise on occasion. Generally speaking, using the EVP interfaces from a C++ program is the same as using them from a C program.&lt;br /&gt;
&lt;br /&gt;
You can download a sample program using EVP symmetric encryption and C++11 called [[Media:Evp-encrypt-cxx.tar.gz|evp-encrypt.cxx]]. The sample uses a custom allocator to zeroize memory, C++ smart pointers to manage resources, and provides a &amp;lt;tt&amp;gt;secure_string&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;basic_string&amp;lt;/tt&amp;gt; and the custom allocator. You need to use &amp;lt;tt&amp;gt;g++ -std=c++11 ...&amp;lt;/tt&amp;gt; to compile it because of &amp;lt;tt&amp;gt;std::unique_ptr&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You should also ensure you configure an build with &amp;lt;tt&amp;gt;-fexception&amp;lt;/tt&amp;gt; to ensure C++ exceptions pass as expected through C code. And you should avoid other flags, like &amp;lt;tt&amp;gt;-fno-exceptions&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-fno-rtti&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The program's &amp;lt;tt&amp;gt;main&amp;lt;/tt&amp;gt; simply encrypts and decrypts a string using AES-256 in CBC mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef unsigned char byte;&lt;br /&gt;
typedef std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, zallocator&amp;lt;char&amp;gt; &amp;gt; secure_string;&lt;br /&gt;
using EVP_CIPHER_CTX_ptr = std::unique_ptr&amp;lt;EVP_CIPHER_CTX, decltype(&amp;amp;::EVP_CIPHER_CTX_free)&amp;gt;;&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char* argv[])&lt;br /&gt;
{&lt;br /&gt;
    // Load the necessary cipher&lt;br /&gt;
    EVP_add_cipher(EVP_aes_256_cbc());&lt;br /&gt;
&lt;br /&gt;
    // plaintext, ciphertext, recovered text&lt;br /&gt;
    secure_string ptext = &amp;quot;Yoda said, Do or do not. There is no try.&amp;quot;;&lt;br /&gt;
    secure_string ctext, rtext;&lt;br /&gt;
&lt;br /&gt;
    byte key[KEY_SIZE], iv[BLOCK_SIZE];&lt;br /&gt;
    gen_params(key, iv);&lt;br /&gt;
  &lt;br /&gt;
    aes_encrypt(key, iv, ptext, ctext);&lt;br /&gt;
    aes_decrypt(key, iv, ctext, rtext);&lt;br /&gt;
    &lt;br /&gt;
    OPENSSL_cleanse(key, KEY_SIZE);&lt;br /&gt;
    OPENSSL_cleanse(iv, BLOCK_SIZE);&lt;br /&gt;
&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;Original message:\n&amp;quot; &amp;lt;&amp;lt; ptext &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;Recovered message:\n&amp;quot; &amp;lt;&amp;lt; rtext &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the encryption routine is as follows. The decryption routine is similar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void aes_encrypt(const byte key[KEY_SIZE], const byte iv[BLOCK_SIZE], const secure_string&amp;amp; ptext, secure_string&amp;amp; ctext)&lt;br /&gt;
{&lt;br /&gt;
    EVP_CIPHER_CTX_ptr ctx(EVP_CIPHER_CTX_new(), ::EVP_CIPHER_CTX_free);&lt;br /&gt;
    int rc = EVP_EncryptInit_ex(ctx.get(), EVP_aes_256_cbc(), NULL, key, iv);&lt;br /&gt;
    if (rc != 1)&lt;br /&gt;
      throw std::runtime_error(&amp;quot;EVP_EncryptInit_ex failed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    // Cipher text expands upto BLOCK_SIZE&lt;br /&gt;
    ctext.resize(ptext.size()+BLOCK_SIZE);&lt;br /&gt;
    int out_len1 = (int)ctext.size();&lt;br /&gt;
&lt;br /&gt;
    rc = EVP_EncryptUpdate(ctx.get(), (byte*)&amp;amp;ctext[0], &amp;amp;out_len1, (const byte*)&amp;amp;ptext[0], (int)ptext.size());&lt;br /&gt;
    if (rc != 1)&lt;br /&gt;
      throw std::runtime_error(&amp;quot;EVP_EncryptUpdate failed&amp;quot;);&lt;br /&gt;
  &lt;br /&gt;
    int out_len2 = (int)ctext.size() - out_len1;&lt;br /&gt;
    rc = EVP_EncryptFinal_ex(ctx.get(), (byte*)&amp;amp;ctext[0]+out_len1, &amp;amp;out_len2);&lt;br /&gt;
    if (rc != 1)&lt;br /&gt;
      throw std::runtime_error(&amp;quot;EVP_EncryptFinal_ex failed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    // Set cipher text size now that we know it&lt;br /&gt;
    ctext.resize(out_len1 + out_len2);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes on some unusual modes==&lt;br /&gt;
&lt;br /&gt;
Worthy of mention here is the [[XTS]] mode (e.g. EVP_aes_256_xts()). This works in exactly the same way as shown above, except that the &amp;quot;tweak&amp;quot; is provided in the IV parameter. A further &amp;quot;gotcha&amp;quot; is that XTS mode expects a key which is twice as long as normal. Therefore EVP_aes_256_xts() expects a key which is 512-bits long.&lt;br /&gt;
&lt;br /&gt;
Authenticated encryption modes ([[GCM]] or [[CCM]]) work in essentially the same way as shown above but require some special handling. See [[EVP Authenticated Encryption and Decryption]] for further details.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[EVP]]&lt;br /&gt;
* [[Libcrypto API]]&lt;br /&gt;
* [[EVP Authenticated Encryption and Decryption]]&lt;br /&gt;
* [[EVP Asymmetric Encryption and Decryption of an Envelope]]&lt;br /&gt;
* [[EVP Signing and Verifying]]&lt;br /&gt;
* [[EVP Message Digests]]&lt;br /&gt;
* [[EVP Key Agreement]]&lt;br /&gt;
* [[EVP Key and Parameter Generation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Crypto API]]&lt;br /&gt;
[[Category:C level]]&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=File:Evp-symmetric-encrypt.c&amp;diff=2740</id>
		<title>File:Evp-symmetric-encrypt.c</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=File:Evp-symmetric-encrypt.c&amp;diff=2740"/>
		<updated>2019-04-30T11:50:06Z</updated>

		<summary type="html">&lt;p&gt;Mspncp: EVP Symmetric Encryption and Decryption - C sample&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;EVP Symmetric Encryption and Decryption - C sample&lt;/div&gt;</summary>
		<author><name>Mspncp</name></author>
	</entry>
</feed>