<?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=Levitte</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=Levitte"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php/Special:Contributions/Levitte"/>
	<updated>2026-05-28T23:06:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Compilation_and_Installation&amp;diff=3240</id>
		<title>Compilation and Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Compilation_and_Installation&amp;diff=3240"/>
		<updated>2025-01-15T12:53:41Z</updated>

		<summary type="html">&lt;p&gt;Levitte: gcc knowns -rpath=DIR, clang does not.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following page is a combination of the &amp;lt;tt&amp;gt;INSTALL&amp;lt;/tt&amp;gt; file provided with the OpenSSL library and notes from the field. If you have questions about what you are doing or seeing, then you should consult &amp;lt;tt&amp;gt;INSTALL&amp;lt;/tt&amp;gt; since it contains the commands and specifies the behavior by the development team.&lt;br /&gt;
&lt;br /&gt;
OpenSSL uses a custom build system to configure the library. Configuration will allow the library to set up the recursive makefiles from &amp;lt;tt&amp;gt;makefile.org&amp;lt;/tt&amp;gt;. Once configured, you use &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; to build the library. You should avoid custom build systems because they often miss details, like each architecture and platform has a unique &amp;lt;tt&amp;gt;opensslconf.h&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;bn.h&amp;lt;/tt&amp;gt; generated by &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You must use a C compiler to build the OpenSSL library. You cannot use a C++ compiler. Later, once the library is built, it is OK to create user programs with a C++ compiler. But the library proper must be built with a C compiler.&lt;br /&gt;
&lt;br /&gt;
There are two generations of build system. First is the build system used in OpenSSL 1.0.2 and below. The instructions below apply to it. Second is the build system for OpenSSL 1.1.0 and above. The instructions are similar, but not the same. For example, the second generation abandons the monolithic &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and places individual configurations in the &amp;lt;tt&amp;gt;Configurations&amp;lt;/tt&amp;gt; directory.  Also, the second generation is more platform agnostic and uses templates to produce a final, top level build file (&amp;lt;tt&amp;gt;Makefile&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;descrip.mms&amp;lt;/tt&amp;gt;, what have you).&lt;br /&gt;
&lt;br /&gt;
After you configure and build the library, you should always perform a &amp;lt;tt&amp;gt;make test&amp;lt;/tt&amp;gt; to ensure the library performs as expected under its self tests. If you are building OpenSSL 1.1.0 and above, then you will also need PERL 5.10 or higher (see &amp;lt;tt&amp;gt;README.PERL&amp;lt;/tt&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
OpenSSL's build system does not rely upon &amp;lt;tt&amp;gt;autotools&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;libtool&amp;lt;/tt&amp;gt;. Also see [http://www.openssl.org/support/faq.html#MISC5 Why aren't tools like 'autoconf' and 'libtool' used?] in the OpenSSL FAQ.&lt;br /&gt;
&lt;br /&gt;
== Retrieve source code ==&lt;br /&gt;
&lt;br /&gt;
The OpenSSL source code can be downloaded from [http://www.openssl.org/source/ OpenSSL Source Tarballs] or any suitable [http://www.openssl.org/source/mirror.html ftp mirror]. There are various versions including stable as well as unstable versions. &lt;br /&gt;
&lt;br /&gt;
The source code is managed via Git. It's referred to as Master. The repository is&lt;br /&gt;
&lt;br /&gt;
: git://git.openssl.org/openssl.git&lt;br /&gt;
&lt;br /&gt;
The source is also available via a [https://github.com/openssl/openssl GitHub] mirror. This repository is updated every 15 minutes.&lt;br /&gt;
&lt;br /&gt;
* [[Use_of_Git|Accessing OpenSSL source code via Git]]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
OpenSSL is configured for a particular platform with protocol and behavior options using &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You should avoid custom build systems because they often miss details, like each architecture and platform has a unique &amp;lt;tt&amp;gt;opensslconf.h&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;bn.h&amp;lt;/tt&amp;gt; generated by &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Supported Platforms ===&lt;br /&gt;
&lt;br /&gt;
You can run &amp;lt;tt&amp;gt;Configure LIST&amp;lt;/tt&amp;gt; to see a list of available platforms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./Configure LIST&lt;br /&gt;
BC-32&lt;br /&gt;
BS2000-OSD&lt;br /&gt;
BSD-generic32&lt;br /&gt;
BSD-generic64&lt;br /&gt;
BSD-ia64&lt;br /&gt;
BSD-sparc64&lt;br /&gt;
BSD-sparcv8&lt;br /&gt;
BSD-x86&lt;br /&gt;
BSD-x86-elf&lt;br /&gt;
BSD-x86_64&lt;br /&gt;
Cygwin&lt;br /&gt;
Cygwin-x86_64&lt;br /&gt;
DJGPP&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your platform is not listed, then use a similar platform and tune the &amp;lt;tt&amp;gt;$cflags&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$ldflags&amp;lt;/tt&amp;gt; by making a copy of the configure line and giving it its own name. &amp;lt;tt&amp;gt;$cflags&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$ldflags&amp;lt;/tt&amp;gt; correspond to fields 2 and 6 in a configure line. An example of using a similar configure line is presented in [[Compilation_and_Installation#Using_RPATHs|Using RPATHs]].&lt;br /&gt;
&lt;br /&gt;
=== Configure &amp;amp; Config ===&lt;br /&gt;
&lt;br /&gt;
You use &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; to tune the compile and installation process through options and switches. The difference between is &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; properly handles the host-arch-compiler triplet, and &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; does not. &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; attempts to guess the triplet, so it's a lot like autotool's &amp;lt;tt&amp;gt;config.guess&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can usually use &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt; and it will do the right thing (from Ubuntu 13.04, x64):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./config &lt;br /&gt;
Operating system: x86_64-whatever-linux2&lt;br /&gt;
Configuring for linux-x86_64&lt;br /&gt;
Configuring for linux-x86_64&lt;br /&gt;
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)&lt;br /&gt;
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)&lt;br /&gt;
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)&lt;br /&gt;
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5&lt;br /&gt;
    ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mac OS X can have issues (it's often a neglected platform), and you will have to use &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ./Configure darwin64-x86_64-cc&lt;br /&gt;
Configuring for darwin64-x86_64-cc&lt;br /&gt;
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)&lt;br /&gt;
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)&lt;br /&gt;
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)&lt;br /&gt;
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5&lt;br /&gt;
    ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also configure on Darwin by exporting &amp;lt;tt&amp;gt;KERNEL_BITS&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export KERNEL_BITS=64&lt;br /&gt;
$ ./config shared no-ssl2 no-ssl3 enable-ec_nistp_64_gcc_128 --openssldir=/usr/local/ssl/macosx-x64/&lt;br /&gt;
Operating system: i686-apple-darwinDarwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64&lt;br /&gt;
Configuring for darwin64-x86_64-cc&lt;br /&gt;
Configuring for darwin64-x86_64-cc&lt;br /&gt;
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)&lt;br /&gt;
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)&lt;br /&gt;
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5&lt;br /&gt;
    ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you provide a option not known to configure or ask for help, then you get a brief help message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./Configure --help&lt;br /&gt;
Usage: Configure [no-&amp;lt;cipher&amp;gt; ...] [enable-&amp;lt;cipher&amp;gt; ...] [experimental-&amp;lt;cipher&amp;gt; ...]&lt;br /&gt;
[-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared]&lt;br /&gt;
[[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR]&lt;br /&gt;
[--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you supply an unknown triplet: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./Configure darwin64-x86_64-clang&lt;br /&gt;
Configuring for darwin64-x86_64-clang&lt;br /&gt;
Usage: Configure [no-&amp;lt;cipher&amp;gt; ...] [enable-&amp;lt;cipher&amp;gt; ...] [experimental-&amp;lt;cipher&amp;gt; ...]&lt;br /&gt;
[-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared]&lt;br /&gt;
[[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR]&lt;br /&gt;
[--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]&lt;br /&gt;
&lt;br /&gt;
pick os/compiler from:&lt;br /&gt;
BC-32 BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8 &lt;br /&gt;
BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-pre1.3 DJGPP MPE/iX-gcc OS2-EMX &lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
NOTE: If in doubt, on Unix-ish systems use './config'.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
If you are prompted to run &amp;lt;tt&amp;gt;make depend&amp;lt;/tt&amp;gt;, then you must do so. For OpenSSL 1.0.2 and below, it's required to update the standard distribution once configuration options change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Since you've disabled or enabled at least one algorithm, you need to do&lt;br /&gt;
the following before building:&lt;br /&gt;
&lt;br /&gt;
	make depend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSSL 1.1.0 and above performs the dependency step for you, so you should not see the message. However, you should perform a &amp;lt;tt&amp;gt;make clean&amp;lt;/tt&amp;gt; to ensure the list of objects files is accurate after a reconfiguration.&lt;br /&gt;
&lt;br /&gt;
== Configure Options ==&lt;br /&gt;
&lt;br /&gt;
OpenSSL has been around a long time, and it carries around a lot of cruft. For example, from above, SSLv2 is enabled by default. SSLv2 is completely broken, and you should disable it during configuration. You can disable protocols and provide other options through &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;config&amp;lt;/tt&amp;gt;, and the following lists some of them.&lt;br /&gt;
&lt;br /&gt;
'''Note''': if you specify a non-existent option, then the configure scripts will proceed without warning. For example, if you inadvertently specify '''no-sslv2''' rather than '''no-ssl2 no-ssl3''', the script will configure ''with'' SSLv2 and ''without'' warning for the unknown no-sslv2.&lt;br /&gt;
&lt;br /&gt;
'''Note''': when building a shared object, both the static archive and shared objects are built. You do not need to do anything special to build both when '''shared''' is specified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ OpenSSL Library Options&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;150px&amp;quot; | Option&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; class=&amp;quot;unsortable&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| --prefix=XXX || See [[#PREFIX_and_OPENSSLDIR|PREFIX and OPENSSLDIR]] in the next section (below).&lt;br /&gt;
|-&lt;br /&gt;
| --openssldir=XXX || See [[#PREFIX_and_OPENSSLDIR|PREFIX and OPENSSLDIR]] in the next section (below).&lt;br /&gt;
|-&lt;br /&gt;
| -d || Debug build of the library. Optimizations are disabled (no &amp;lt;tt&amp;gt;-O3&amp;lt;/tt&amp;gt; or similar) and &amp;lt;tt&amp;gt;libefence&amp;lt;/tt&amp;gt; is used (&amp;lt;tt&amp;gt;apt-get install electric-fence&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;yum install electric-fence&amp;lt;/tt&amp;gt;). TODO: Any other features?&lt;br /&gt;
|-&lt;br /&gt;
| shared || Build a shared object in addition to the static archive. You probably need a [[#Using_RPATHs|RPATH]] when enabling &amp;lt;tt&amp;gt;shared&amp;lt;/tt&amp;gt; to ensure &amp;lt;tt&amp;gt;openssl&amp;lt;/tt&amp;gt; uses the correct &amp;lt;tt&amp;gt;libssl&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;libcrypto&amp;lt;/tt&amp;gt; after installation.&lt;br /&gt;
|-&lt;br /&gt;
| enable-ec_nistp_64_gcc_128 || Use on little endian platforms when GCC supports &amp;lt;tt&amp;gt;__uint128_t&amp;lt;/tt&amp;gt;. ECDH is about 2 to 4 times faster. Not enabled by default because &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; can't determine it. Enable it if your compiler defines &amp;lt;tt&amp;gt;__SIZEOF_INT128__&amp;lt;/tt&amp;gt;, the CPU is little endian and it tolerates unaligned data access.&lt;br /&gt;
|-&lt;br /&gt;
| enable-capieng || Enables the Microsoft CAPI engine on Windows platforms. Used to access the Windows Certificate Store. Also see [http://openssl.6102.n7.nabble.com/Using-Windows-certificate-store-through-OpenSSL-td46788.html Using Windows certificate store through OpenSSL] on the OpenSSL developer list.&lt;br /&gt;
|-&lt;br /&gt;
| no-ssl2 || Disables SSLv2. &amp;lt;tt&amp;gt;OPENSSL_NO_SSL2&amp;lt;/tt&amp;gt; will be defined in the OpenSSL headers.&lt;br /&gt;
|-&lt;br /&gt;
| no-ssl3 || Disables SSLv3. &amp;lt;tt&amp;gt;OPENSSL_NO_SSL3&amp;lt;/tt&amp;gt; will be defined in the OpenSSL headers.&lt;br /&gt;
|-&lt;br /&gt;
| no-comp || Disables compression independent of &amp;lt;tt&amp;gt;zlib&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;OPENSSL_NO_COMP&amp;lt;/tt&amp;gt; will be defined in the OpenSSL headers.&lt;br /&gt;
|-&lt;br /&gt;
| no-idea || Disables IDEA algorithm. Unlike RC5 and MDC2, IDEA is enabled by default&lt;br /&gt;
|-&lt;br /&gt;
| no-asm || Disables assembly language routines (and uses C routines)&lt;br /&gt;
|-&lt;br /&gt;
| no-dtls || Disables DTLS in OpenSSL 1.1.0 and above&lt;br /&gt;
|-&lt;br /&gt;
| no-dtls1 || Disables DTLS in OpenSSL 1.0.2 and below&lt;br /&gt;
|-&lt;br /&gt;
| no-shared || Disables shared objects (only a static library is created)&lt;br /&gt;
|-&lt;br /&gt;
| no-hw || Disables hardware support (useful on mobile devices)&lt;br /&gt;
|-&lt;br /&gt;
| no-engine || Disables hardware support (useful on mobile devices)&lt;br /&gt;
|-&lt;br /&gt;
| no-threads || Disables threading support.&lt;br /&gt;
|-&lt;br /&gt;
| no-dso || Disables the OpenSSL DSO API (the library offers a shared object abstraction layer). If you disable DSO, then you must disable Engines also&lt;br /&gt;
|-&lt;br /&gt;
| no-err || Removes all error function names and error reason text to reduce footprint&lt;br /&gt;
|-&lt;br /&gt;
| no-npn/no-nextprotoneg || Disables Next Protocol Negotiation (NPN). Use &amp;lt;tt&amp;gt;no-nextprotoneg&amp;lt;/tt&amp;gt; for 1.1.0 and above; and &amp;lt;tt&amp;gt;no-npn&amp;lt;/tt&amp;gt; otherwise&lt;br /&gt;
|-&lt;br /&gt;
| no-psk || Disables Preshared Key (PSK). PSK provides mutual authentication independent of trusted authorities, but it's rarely offered or used&lt;br /&gt;
|-&lt;br /&gt;
| no-srp || Disables Secure Remote Password (SRP). SRP provides mutual authentication independent of trusted authorities, but it's rarely offered or used&lt;br /&gt;
|-&lt;br /&gt;
| no-ec2m || Used when configuring FIPS Capable Library with a FIPS Object Module that only includes prime curves. That is, use this switch if you use &amp;lt;tt&amp;gt;openssl-fips-ecp-2.0.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| no-weak-ssl-ciphers || Disables RC4. Available in OpenSSL 1.1.0 and above.&lt;br /&gt;
|-&lt;br /&gt;
| -DXXX || Defines XXX. For example, &amp;lt;tt&amp;gt;-DOPENSSL_NO_HEARTBEATS&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| -DPEDANTIC || Defines PEDANTIC. The library will avoid some undefined behavior, like casting an unaligned byte array to a different pointer type. This define should be used if building OpenSSL with undefined behavior sanitizer (&amp;lt;tt&amp;gt;-fsanitize=undefined&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| -DOPENSSL_USE_IPV6=0 || Disables IPv6. Useful if OpenSSL encounters incorrect or inconsistent platform headers and mistakenly enables IPv6. Must be passed to &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; manually.&lt;br /&gt;
|-&lt;br /&gt;
| -DNO_FORK || Defines NO_FORK. Disables calls to &amp;lt;tt&amp;gt;fork&amp;lt;/tt&amp;gt;. Useful for operating systems like AppleTVOS, WatchOS, AppleTVSimulator and WatchSimulator.&lt;br /&gt;
|-&lt;br /&gt;
| -L''something'', -l''something'', -K''something'', -Wl,''something'' || Linker options, will become part of LDFLAGS.&lt;br /&gt;
|-&lt;br /&gt;
| -''anythingelse'', +''anythingelse'' || Compiler options, will become part of CFLAGS.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''''Note''''': on older OSes, like CentOS 5, BSD 5, and Windows XP or Vista, you will need to configure with &amp;lt;tt&amp;gt;no-async&amp;lt;/tt&amp;gt; when building OpenSSL 1.1.0 and above. The configuration system does not detect lack of the Posix feature on the platforms.&lt;br /&gt;
&lt;br /&gt;
'''''Note''''': you can verify compiler support for &amp;lt;tt&amp;gt;__uint128_t&amp;lt;/tt&amp;gt; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# gcc -dM -E - &amp;lt;/dev/null | grep __SIZEOF_INT128__  &lt;br /&gt;
#define __SIZEOF_INT128__ 16&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PREFIX and OPENSSLDIR ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; control the configuration of installed components. The behavior and interactions of &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; are slightly different between OpenSSL 1.0.2 and below, and OpenSSL 1.1.0 and above.&lt;br /&gt;
&lt;br /&gt;
The '''''rule of thumb''''' to use when you want something that &amp;quot;just works&amp;quot; for all recent versions of OpenSSL, including OpenSSL 1.0.2 and 1.1.0, is:&lt;br /&gt;
&lt;br /&gt;
* specify ''both'' &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; to the same location&lt;br /&gt;
&lt;br /&gt;
One word of caution is ''avoid'' &amp;lt;tt&amp;gt;--prefix=/usr&amp;lt;/tt&amp;gt; when OpenSSL versions are '''''not''''' [[Binary_Compatibility|binary compatible]]. You will replace the distro's version of OpenSSL with your version of OpenSSL. It will most likely break everything, including the package management system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OpenSSL 1.0.2 and below'''&lt;br /&gt;
&lt;br /&gt;
It is usually ''not'' necessary to specify &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt;. If &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; is ''not'' specified, then &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; is used. However, specifying ''only'' &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; may result in broken builds because the 1.0.2 build system attempts to build in a FIPS configuration.&lt;br /&gt;
&lt;br /&gt;
You can ''omit'' If &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and use &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt;. In this case, the paths for &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; will be used during configuration. If &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; is not specified, the the default &amp;lt;tt&amp;gt;/usr/local/ssl&amp;lt;/tt&amp;gt; is used.&lt;br /&gt;
&lt;br /&gt;
The takeaway is &amp;lt;tt&amp;gt;/usr/local/ssl&amp;lt;/tt&amp;gt; is used by default, and it can be overridden with &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt;. The rule of thumb applies for path overrides: specify ''both'' &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OpenSSL 1.1.0 and above'''&lt;br /&gt;
&lt;br /&gt;
OpenSSL 1.1.0 changed the behavior of install rules. You should specify both &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt; to ensure &amp;lt;tt&amp;gt;make install&amp;lt;/tt&amp;gt; works as expected.&lt;br /&gt;
&lt;br /&gt;
The takeaway is &amp;lt;tt&amp;gt;/usr/local/ssl&amp;lt;/tt&amp;gt; is used by default, and it can be overridden with ''both'' &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt;. The rule of thumb applies for path overrides: specify ''both'' &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--openssldir&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Debug Configuration ===&lt;br /&gt;
&lt;br /&gt;
From the list above, it's possible to quickly configure a &amp;quot;debug&amp;quot; build with &amp;lt;tt&amp;gt;./config -d&amp;lt;/tt&amp;gt;. However, you can often get into a more amicable state ''without'' the [http://en.wikipedia.org/wiki/Electric_Fence Electric Fence] dependency by issuing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./config no-asm -g3 -O0 -fno-omit-frame-pointer -fno-inline-functions&lt;br /&gt;
Operating system: x86_64-whatever-linux2&lt;br /&gt;
Configuring for linux-x86_64&lt;br /&gt;
Configuring OpenSSL version 1.1.0-pre5-dev (0x0x10100005L)&lt;br /&gt;
    no-asm          [option]   OPENSSL_NO_ASM&lt;br /&gt;
    ...&lt;br /&gt;
Configuring for linux-x86_64&lt;br /&gt;
IsMK1MF       =no&lt;br /&gt;
CC            =gcc&lt;br /&gt;
CFLAG         =-Wall -O3 -pthread -m64 -DL_ENDIAN  -g3 -O0 -fno-omit-frame-pointer&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don't be alarmed about both &amp;lt;tt&amp;gt;-O3&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-O0&amp;lt;/tt&amp;gt;. The last setting ''&amp;quot;sticks&amp;quot;'', and that's the &amp;lt;tt&amp;gt;-O0&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are working in Visual Studio and you can't step into library calls, then see [http://stackoverflow.com/q/38249235 Step into not working, but can force stepping after some asm steps] on Stack Overflow.&lt;br /&gt;
&lt;br /&gt;
=== Modifying Build Settings ===&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to work around OpenSSL's selections for building the library. For example, you might want to use &amp;lt;tt&amp;gt;-Os&amp;lt;/tt&amp;gt; for a mobile device (rather than &amp;lt;tt&amp;gt;-O3&amp;lt;/tt&amp;gt;), or you might want to use the &amp;lt;tt&amp;gt;clang&amp;lt;/tt&amp;gt; compiler (rather than &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In case like these, its' often easier to modify &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Makefile.org&amp;lt;/tt&amp;gt; rather than trying to add targets to the configure scripts. Below is a patch that modifies &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Makefile.org&amp;lt;/tt&amp;gt; for use under the iOS 7.0 SDK (which lacks &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* Modifies &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;clang&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Modifies &amp;lt;tt&amp;gt;Makefile.org&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;clang&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Modifies &amp;lt;tt&amp;gt;CFLAG&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;-Os&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Modifies &amp;lt;tt&amp;gt;MAKEDEPPROG&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;$(CC) -M&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setting and resetting of &amp;lt;tt&amp;gt;LANG&amp;lt;/tt&amp;gt; is required on Mac OSX to work around a &amp;lt;tt&amp;gt;sed&amp;lt;/tt&amp;gt; bug or limitation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;OLD_LANG=$LANG&lt;br /&gt;
unset LANG&lt;br /&gt;
&lt;br /&gt;
sed -i &amp;quot;&amp;quot; 's|\&amp;quot;iphoneos-cross\&amp;quot;\,\&amp;quot;llvm-gcc\:-O3|\&amp;quot;iphoneos-cross\&amp;quot;\,\&amp;quot;clang\:-Os|g' Configure&lt;br /&gt;
sed -i &amp;quot;&amp;quot; 's/CC= cc/CC= clang/g' Makefile.org&lt;br /&gt;
sed -i &amp;quot;&amp;quot; 's/CFLAG= -O/CFLAG= -Os/g' Makefile.org&lt;br /&gt;
sed -i &amp;quot;&amp;quot; 's/MAKEDEPPROG=makedepend/MAKEDEPPROG=$(CC) -M/g' Makefile.org&lt;br /&gt;
&lt;br /&gt;
export LANG=$OLD_LANG&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After modification, be sure to dclean and configure again so the new settings are picked up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;make dclean&lt;br /&gt;
&lt;br /&gt;
./config&lt;br /&gt;
make depend&lt;br /&gt;
make all&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using RPATHs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt;'s are supported by default on the BSD platforms, but not others. If you are working on Linux and compatibles, then you have to manually add an RPATH. One of the easiest ways to add a &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt; is to configure with it as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./config -Wl,-rpath,/usr/local/ssl/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For modern Linux you should also use &amp;lt;tt&amp;gt;-Wl,--enable-new-dtags&amp;lt;/tt&amp;gt;. The linker option sets a &amp;lt;tt&amp;gt;RUNPATH&amp;lt;/tt&amp;gt; as opposed to a &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt;. A &amp;lt;tt&amp;gt;RUNPATH&amp;lt;/tt&amp;gt; allows library path overrides at runtime, while a &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt; does not.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./config -Wl,-rpath,/usr/local/ssl/lib -Wl,--enable-new-dtags&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Note well''''': you should use a &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;RUNPATH&amp;lt;/tt&amp;gt; when building both OpenSSL and your program. If you don't add a &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;RUNPATH&amp;lt;/tt&amp;gt; to both, then your program could runtime-link to the wrong version of OpenSSL. Linking against random versions of a security library is ''not'' a good idea.&lt;br /&gt;
&lt;br /&gt;
You can also add an &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;RUNPATH&amp;lt;/tt&amp;gt; by hard coding the &amp;lt;tt&amp;gt;RPATH&amp;lt;/tt&amp;gt; into a configure line. For example, on Debian x86_64 open the file &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; in an editor, copy &amp;lt;tt&amp;gt;linux-x86_64&amp;lt;/tt&amp;gt;, name it &amp;lt;tt&amp;gt;linux-x86_64-rpath&amp;lt;/tt&amp;gt;, and make the following change to add the &amp;lt;tt&amp;gt;-rpath&amp;lt;/tt&amp;gt; option. Notice the addition of &amp;lt;tt&amp;gt;-Wl,-rpath,...&amp;lt;/tt&amp;gt; in two places.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;linux-x86_64-rpath&amp;quot;, &amp;quot;gcc:-m64 -DL_ENDIAN -O3 -Wall -Wl,-rpath,/usr/local/ssl/lib::&lt;br /&gt;
  -D_REENTRANT::-Wl,-rpath,/usr/local/ssl/lib -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:&lt;br /&gt;
  ${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64&amp;quot;,&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, fields 2 and 6 were changed. They correspond to &amp;lt;tt&amp;gt;$cflag&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$ldflag&amp;lt;/tt&amp;gt; in OpenSSL's builds system.&lt;br /&gt;
&lt;br /&gt;
Then, Configure with the new configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./Configure linux-x86_64-rpath shared no-ssl2 no-ssl3 no-comp \&lt;br /&gt;
    --openssldir=/usr/local/ssl enable-ec_nistp_64_gcc_128&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, after &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;, verify the settings stuck:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ readelf -d ./libssl.so | grep -i -E 'rpath|runpath'&lt;br /&gt;
0x000000000000000f (RPATH)              Library rpath: [/usr/local/ssl/lib]&lt;br /&gt;
$ readelf -d ./libcrypto.so | grep -i rpath&lt;br /&gt;
0x000000000000000f (RPATH)              Library rpath: [/usr/local/ssl/lib]&lt;br /&gt;
$ readelf -d ./apps/openssl | grep -i rpath &lt;br /&gt;
0x000000000000000f (RPATH)              Library rpath: [/usr/local/ssl/lib]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you perform &amp;lt;tt&amp;gt;make install&amp;lt;/tt&amp;gt;, then &amp;lt;tt&amp;gt;ldd&amp;lt;/tt&amp;gt; will produce expected results:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ldd /usr/local/ssl/lib/libssl.so&lt;br /&gt;
linux-vdso.so.1 =&amp;gt;  (0x00007ffceff6c000)&lt;br /&gt;
 ibcrypto.so.1.0.0 =&amp;gt; /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x00007ff5eff96000)&lt;br /&gt;
...&lt;br /&gt;
    &lt;br /&gt;
$ ldd /usr/local/ssl/bin/openssl &lt;br /&gt;
linux-vdso.so.1 =&amp;gt;  (0x00007ffc30d3a000)&lt;br /&gt;
libssl.so.1.0.0 =&amp;gt; /usr/local/ssl/lib/libssl.so.1.0.0 (0x00007f9e8372e000)&lt;br /&gt;
libcrypto.so.1.0.0 =&amp;gt; /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x00007f9e832c0000)&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FIPS Capable Library ===&lt;br /&gt;
&lt;br /&gt;
If you want to use FIPS validated cryptography, you download, build and install the FIPS Object Module (&amp;lt;tt&amp;gt;openssl-fips-2.0.5.tar.gz&amp;lt;/tt&amp;gt;) according to the [https://www.openssl.org/docs/fips/UserGuide-2.0.pdf FIPS User Guide 2.0] and [https://www.openssl.org/docs/fips/SecurityPolicy-2.0.pdf FIPS 140-2 Security Policy]. You then download, build and install the FIPS Capable Library (&amp;lt;tt&amp;gt;openssl-1.0.1e.tar.gz&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
When configuring the FIPS Capable Library, you must use &amp;lt;tt&amp;gt;fips&amp;lt;/tt&amp;gt; as an option:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./config fips &amp;lt;other options ...&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are configuring the FIPS Capable Library with only prime curves (&amp;lt;tt&amp;gt;openssl-fips-ecp-2.0.5.tar.gz&amp;lt;/tt&amp;gt;), then you must configure with &amp;lt;tt&amp;gt;no-ec2m&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./config fips no-ec2m &amp;lt;other options ...&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile Time Checking ===&lt;br /&gt;
&lt;br /&gt;
If you disable an option during configure, you can check if it's available through &amp;lt;tt&amp;gt;OPENSSL_NO_*&amp;lt;/tt&amp;gt; defines. OpenSSL writes the configure options to &amp;lt;tt&amp;gt;&amp;lt;openssl/opensslconf.h&amp;gt;&amp;lt;/tt&amp;gt;. For example, if you want to know if SSLv3 is available, then you would perform the following in your code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#include &amp;lt;openssl/opensslconf.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
#if !defined(OPENSSL_NO_SSL3)&lt;br /&gt;
  /* SSLv3 is available */&lt;br /&gt;
#endif&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
After configuring the library, you should run &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;. If prompted, there's usually no need to &amp;lt;tt&amp;gt;make depend&amp;lt;/tt&amp;gt; since you are building from a clean download.&lt;br /&gt;
&lt;br /&gt;
==== Quick ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./config &amp;lt;nowiki&amp;gt;&amp;lt;options ...&amp;gt; --openssldir=/usr/local/ssl&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
make test&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Various options can be found examining the &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; file (there is a well commented block at its top). OpenSSL ships with SSLv2, SSLv3 and Compression enabled by default (see &amp;lt;tt&amp;gt;my $disabled&amp;lt;/tt&amp;gt;), so you might want to use &amp;lt;tt&amp;gt;no-ssl2 no-ssl3&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;no-ssl3&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;no-comp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Platfom specific ==&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
==== Intel ====&lt;br /&gt;
&lt;br /&gt;
==== ARM ====&lt;br /&gt;
&lt;br /&gt;
==== X32 (ILP32) ====&lt;br /&gt;
&lt;br /&gt;
X32 uses the 32-bit data model (ILP32) on x86_64/amd64. To properly configure for X32 under current OpenSSL distributions, you must use &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; and use the x32 triplet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# ./Configure LIST | grep x32&lt;br /&gt;
linux-x32&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# ./Configure linux-x32      &lt;br /&gt;
Configuring OpenSSL version 1.1.0-pre6-dev (0x0x10100006L)&lt;br /&gt;
    no-asan         [default]  OPENSSL_NO_ASAN (skip dir)&lt;br /&gt;
    ...&lt;br /&gt;
Configuring for linux-x32&lt;br /&gt;
CC            =gcc&lt;br /&gt;
CFLAG         =-Wall -O3 -pthread -mx32 -DL_ENDIAN &lt;br /&gt;
SHARED_CFLAG  =-fPIC&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If using an amd64-compatible processor and GCC with that supports &amp;lt;tt&amp;gt;__uint128_t&amp;lt;/tt&amp;gt;, then you usually add &amp;lt;tt&amp;gt;enable-ec_nistp_64_gcc_128 &amp;lt;/tt&amp;gt; in addition to your other flags.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
3noch wrote a VERY good guide in 2012 [https://web.archive.org/web/20161123004257/http://developer.covenanteyes.com/building-openssl-for-visual-studio// here] (PLEASE NOTE: the guide was written in 2012 and is no longer available at the original location; the link now points to an archived version at the Internet Archive Wayback Machine).&lt;br /&gt;
&lt;br /&gt;
Like he said in his article, make absolutely sure to create separate directories for 32 and 64 bit versions.&lt;br /&gt;
&lt;br /&gt;
==== W32 / Windows NT - Windows 9x ====&lt;br /&gt;
&lt;br /&gt;
type INSTALL.W32&lt;br /&gt;
&lt;br /&gt;
* you need Perl for Win32.  Unless you will build on Cygwin, you will need ActiveState Perl, available from http://www.activestate.com/ActivePerl.&lt;br /&gt;
* one of the following C compilers:&lt;br /&gt;
** Visual C++&lt;br /&gt;
** Borland C&lt;br /&gt;
** GNU C (Cygwin or MinGW)&lt;br /&gt;
* Netwide Assembler, a.k.a. NASM, available from http://nasm.sourceforge.net/ is required if you intend to utilize assembler modules. Note that NASM is now the only supported assembler.&lt;br /&gt;
&lt;br /&gt;
==== W64 ====&lt;br /&gt;
&lt;br /&gt;
Read first the INSTALL.W64 documentation note containing some specific 64bits information.&lt;br /&gt;
See also INSTALL.W32 that still provides additonnal build information common to both the 64 and 32 bit versions.&lt;br /&gt;
&lt;br /&gt;
You may be surprised: the 64bit artefacts are indeed output in the out32* sub-directories and bear names ending *32.dll. Fact is the 64 bit compile target is so far an incremental change over the legacy 32bit windows target. Numerous compile flags are still labelled &amp;quot;32&amp;quot; although those do apply to both 32 and 64bit targets.&lt;br /&gt;
&lt;br /&gt;
The important pre-requisites are to have PERL available (for essential file processing so as to prepare sources and scripts for the target OS) and of course a C compiler like Microsoft Visual Studio for C/C++. Also note the procedure changed at OpenSSL 1.1.0 and is more streamlined. Also see [https://stackoverflow.com/q/39076244/608639 Why there is no ms\do_ms.bat after perl Configure VC-WIN64A] on Stack Overflow.&lt;br /&gt;
&lt;br /&gt;
=== OpenSSL 1.1.0 ===&lt;br /&gt;
&lt;br /&gt;
For OpenSSL 1.1.0 and above perform these steps:&lt;br /&gt;
&lt;br /&gt;
# Ensure you have perl installed on your machine (e.g. ActiveState or Strawberry), and available on your %PATH%&lt;br /&gt;
# Ensure you have NASM installed on your machine, and available on your %PATH%&lt;br /&gt;
# Extract the source files to your folder, here &amp;lt;code&amp;gt;cd c:\myPath\openssl&amp;lt;/code&amp;gt;&lt;br /&gt;
# Launch Visual Studio tool x64 Cross Tools Command prompt&lt;br /&gt;
# Goto your defined folder &amp;lt;code&amp;gt;cd c:\myPath\openssl&amp;lt;/code&amp;gt;&lt;br /&gt;
# Configure for the target OS with &amp;lt;code&amp;gt;perl Configure VC-WIN64A&amp;lt;/code&amp;gt; or other configurations to be found in the INSTALL file (e.g. UNIX targets). &lt;br /&gt;
## For instance: &amp;lt;code&amp;gt;perl Configure VC-WIN64A&amp;lt;/code&amp;gt;.&lt;br /&gt;
# (''Optional'') In case you compiled before on 32 or 64-bits, make sure you run &amp;lt;code&amp;gt;nmake clean&amp;lt;/code&amp;gt; to prevent trouble across 32 and 64-bits which share output folder.&lt;br /&gt;
# Now build with: &amp;lt;code&amp;gt;nmake&amp;lt;/code&amp;gt;&lt;br /&gt;
# Output can be found in the '''root''' of your folder as '''libcrypto-1_1x64.dll''' and '''libssl-1_1-x64.dll''' (with all the build additionals such as .pdb .lik or static .lib). You may check this is true 64bit code using the Visual Studio tool 'dumpbin'. For instance &amp;lt;code&amp;gt;dumpbin  /headers libcrypto-1_1x64.dll | more&amp;lt;/code&amp;gt;, and look at the FILE HEADER section.&lt;br /&gt;
# Test the code using the 'test' make target, by running &amp;lt;code&amp;gt;nmake test&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Reminder, clean your code to prevent issues the next time you compile for a different target. See step 7.&lt;br /&gt;
&lt;br /&gt;
==== Windows CE ====&lt;br /&gt;
'' Not specified ''&lt;br /&gt;
&lt;br /&gt;
=== OpenSSL 1.0.2 ===&lt;br /&gt;
&lt;br /&gt;
For OpenSSL 1.0.2 and earlier the procedure is as follows.&lt;br /&gt;
&lt;br /&gt;
# Ensure you have perl installed on your machine (e.g. ActiveState or Strawberry), and available on your %PATH%&lt;br /&gt;
# Ensure you have NASM installed on your machine, and available on your %PATH%&lt;br /&gt;
# launch a Visual Studio tool x64 Cross Tools Command prompt&lt;br /&gt;
# change to the directory where you have copied openssl sources &amp;lt;code&amp;gt;cd c:\myPath\openssl&amp;lt;/code&amp;gt;&lt;br /&gt;
# configure for the target OS with the command &amp;lt;code&amp;gt;perl Configure VC-WIN64A&amp;lt;/code&amp;gt;. You may also be interested to set more configuration options as documented in the general INSTALL note (for UNIX targets). For instance: &amp;lt;code&amp;gt;perl Configure VC-WIN64A&amp;lt;/code&amp;gt;.&lt;br /&gt;
# prepare the target environment with the command: &amp;lt;code&amp;gt;ms\do_win64a&amp;lt;/code&amp;gt;&lt;br /&gt;
# ensure you start afresh and notably without linkable products from a previous 32bit compile (as 32 and 64 bits compiling still share common directories) with the command: &amp;lt;code&amp;gt;nmake -f ms\ntdll.mak clean&amp;lt;/code&amp;gt; for the DLL target and &amp;lt;code&amp;gt;nmake -f ms\nt.mak clean&amp;lt;/code&amp;gt; for static libraries.&lt;br /&gt;
# build the code with: &amp;lt;code&amp;gt;nmake -f ms\ntdll.mak&amp;lt;/code&amp;gt; (respectively &amp;lt;code&amp;gt;nmake -f ms\nt.mak&amp;lt;/code&amp;gt; )&lt;br /&gt;
# the artefacts will be found in sub directories out32dll and out32dll.dbg (respectively out32 and out32.dbg for static libraries). The libcrypto and ssl libraries are still named libeay32.lib and ssleay32.lib, and associated includes in inc32 ! You may check this is true 64bit code using the Visual Studio tool 'dumpbin'. For instance &amp;lt;code&amp;gt;dumpbin  /headers out32dll/libeay32.lib | more&amp;lt;/code&amp;gt;, and look at the FILE HEADER section.&lt;br /&gt;
# test the code using the various *test.exe programs in out32dll. Use the 'test' make target to run all tests as in &amp;lt;code&amp;gt;nmake -f ms\ntdll.mak test&amp;lt;/code&amp;gt;&lt;br /&gt;
# we recommend that you move/copy needed includes and libraries from the &amp;quot;32&amp;quot; directories under a new explicit directory tree for 64bit applications from where you will import and link your target applications, similar to that explained in INSTALL.W32.&lt;br /&gt;
&lt;br /&gt;
==== Windows CE ====&lt;br /&gt;
&lt;br /&gt;
=== OS X ===&lt;br /&gt;
&lt;br /&gt;
The earlier discussion presented a lot of information (and some of it had OS X information). Here are the TLDR versions to configure, build and install the library.&lt;br /&gt;
&lt;br /&gt;
If configuring for 64-bit OS X, then use a command similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64&lt;br /&gt;
make depend&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If configuring for 32-bit OS X, then use a command similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./Configure darwin-i386-cc shared no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macosx-i386&lt;br /&gt;
make depend&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build a multiarch OpenSSL library, then see this answer on Stack Overflow: [http://stackoverflow.com/a/25531033/608639 Build Multiarch OpenSSL on OS X].&lt;br /&gt;
&lt;br /&gt;
=== iOS ===&lt;br /&gt;
&lt;br /&gt;
The following builds OpenSSL for iOS using the iPhoneOS SDK. The configuration avoids the dynamic library the DSO interface and engines.&lt;br /&gt;
&lt;br /&gt;
If you run &amp;lt;tt&amp;gt;make install&amp;lt;/tt&amp;gt;, then the headers will be installed in &amp;lt;tt&amp;gt;/usr/local/openssl-ios/include&amp;lt;/tt&amp;gt; and libraries will be installed in &amp;lt;tt&amp;gt;/usr/local/openssl-ios/lib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== 32-bit ====&lt;br /&gt;
&lt;br /&gt;
For OpenSSL 1.1.0 and above, a 32-bit iOS cross-compiles uses the &amp;lt;tt&amp;gt;ios-cross&amp;lt;/tt&amp;gt; target, and options similar to &amp;lt;tt&amp;gt;--prefix=/usr/local/openssl-ios&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export CC=clang;&lt;br /&gt;
$ export CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer&lt;br /&gt;
$ export CROSS_SDK=iPhoneOS.sdk&lt;br /&gt;
$ export PATH=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$ ./Configure ios-cross no-shared no-dso no-hw no-engine --prefix=/usr/local/openssl-ios&lt;br /&gt;
&lt;br /&gt;
Configuring OpenSSL version 1.1.1-dev (0x10101000L)&lt;br /&gt;
    no-afalgeng     [forced]   OPENSSL_NO_AFALGENG&lt;br /&gt;
    no-asan         [default]  OPENSSL_NO_ASAN&lt;br /&gt;
    no-dso          [option]&lt;br /&gt;
    no-dynamic-engine [forced]&lt;br /&gt;
    ...&lt;br /&gt;
    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS&lt;br /&gt;
    no-zlib         [default]&lt;br /&gt;
    no-zlib-dynamic [default]&lt;br /&gt;
Configuring for ios-cross&lt;br /&gt;
&lt;br /&gt;
PERL          =perl&lt;br /&gt;
PERLVERSION   =5.16.2 for darwin-thread-multi-2level&lt;br /&gt;
HASHBANGPERL  =/usr/bin/env perl&lt;br /&gt;
CC            =clang&lt;br /&gt;
CFLAG         =-O3 -D_REENTRANT -arch armv7 -mios-version-min=6.0.0 -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common&lt;br /&gt;
CXX           =c++&lt;br /&gt;
CXXFLAG       =-O3 -D_REENTRANT -arch armv7 -mios-version-min=6.0.0 -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common&lt;br /&gt;
DEFINES       =NDEBUG OPENSSL_THREADS OPENSSL_NO_DYNAMIC_ENGINE OPENSSL_PIC OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_GF2m SHA1_ASM SHA256_ASM SHA512_ASM AES_ASM BSAES_ASM GHASH_ASM ECP_NISTZ256_ASM POLY1305_ASM&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are working with OpenSSL 1.0.2 or below, then use the &amp;lt;tt&amp;gt;iphoneos-cross&amp;lt;/tt&amp;gt; target.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export CC=clang;&lt;br /&gt;
$ export CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer&lt;br /&gt;
$ export CROSS_SDK=iPhoneOS.sdk&lt;br /&gt;
$ export PATH=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$ ./Configure iphoneos-cross no-shared no-dso no-hw no-engine --prefix=/usr/local/openssl-ios&lt;br /&gt;
Configuring for iphoneos-cross&lt;br /&gt;
    no-dso          [option]&lt;br /&gt;
    no-engine       [option]   OPENSSL_NO_ENGINE (skip dir)&lt;br /&gt;
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)&lt;br /&gt;
    no-hw           [option]   OPENSSL_NO_HW&lt;br /&gt;
    ...&lt;br /&gt;
    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)&lt;br /&gt;
    no-zlib         [default]&lt;br /&gt;
    no-zlib-dynamic [default]&lt;br /&gt;
IsMK1MF=0&lt;br /&gt;
CC            =clang&lt;br /&gt;
CFLAG         =-DOPENSSL_THREADS -D_REENTRANT -O3 -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fomit-frame-pointer -fno-common&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 64-bit ====&lt;br /&gt;
&lt;br /&gt;
For OpenSSL 1.1.0 , a 64-bit iOS cross-compiles uses the &amp;lt;tt&amp;gt;ios64-cross&amp;lt;/tt&amp;gt; target, and &amp;lt;tt&amp;gt;--prefix=/usr/local/openssl-ios64&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;ios64-cross&amp;lt;/tt&amp;gt;. There is no built-in 64-bit iOS support for OpenSSL 1.0.2 or below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export CC=clang;&lt;br /&gt;
$ export CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer&lt;br /&gt;
$ export CROSS_SDK=iPhoneOS.sdk&lt;br /&gt;
$ export PATH=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$ ./Configure ios64-cross no-shared no-dso no-hw no-engine --prefix=/usr/local/openssl-ios64&lt;br /&gt;
&lt;br /&gt;
Configuring OpenSSL version 1.1.1-dev (0x10101000L)&lt;br /&gt;
    no-afalgeng     [forced]   OPENSSL_NO_AFALGENG&lt;br /&gt;
    no-asan         [default]  OPENSSL_NO_ASAN&lt;br /&gt;
    no-dso          [option]&lt;br /&gt;
    no-dynamic-engine [forced]&lt;br /&gt;
    ...&lt;br /&gt;
    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS&lt;br /&gt;
    no-zlib         [default]&lt;br /&gt;
    no-zlib-dynamic [default]&lt;br /&gt;
Configuring for ios64-cross&lt;br /&gt;
&lt;br /&gt;
PERL          =perl&lt;br /&gt;
PERLVERSION   =5.16.2 for darwin-thread-multi-2level&lt;br /&gt;
HASHBANGPERL  =/usr/bin/env perl&lt;br /&gt;
CC            =clang&lt;br /&gt;
CFLAG         =-O3 -D_REENTRANT -arch arm64 -mios-version-min=7.0.0 -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common&lt;br /&gt;
CXX           =c++&lt;br /&gt;
CXXFLAG       =-O3 -D_REENTRANT -arch arm64 -mios-version-min=7.0.0 -isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common&lt;br /&gt;
DEFINES       =NDEBUG OPENSSL_THREADS OPENSSL_NO_DYNAMIC_ENGINE OPENSSL_PIC OPENSSL_BN_ASM_MONT SHA1_ASM SHA256_ASM SHA512_ASM VPAES_ASM ECP_NISTZ256_ASM POLY1305_ASM&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
&lt;br /&gt;
Visit [[Android]] and [[FIPS Library and Android]].&lt;br /&gt;
&lt;br /&gt;
=== More ===&lt;br /&gt;
&lt;br /&gt;
==== VAX/VMS ====&lt;br /&gt;
&lt;br /&gt;
I you wonder what are files ending with .com like test/testca.com those are VAX/VMX scripts.&lt;br /&gt;
This code is still maintained.&lt;br /&gt;
&lt;br /&gt;
==== OS/2 ====&lt;br /&gt;
&lt;br /&gt;
==== NetWare ====&lt;br /&gt;
5.x 6.x&lt;br /&gt;
&lt;br /&gt;
==== HP-UX ====&lt;br /&gt;
[[HP-UX Itanium FIPS and OpenSSL build]]&lt;br /&gt;
&lt;br /&gt;
==Autoconf==&lt;br /&gt;
&lt;br /&gt;
OpenSSL uses its own configuration system, and does not use Autoconf. However, a number of popular projects use both OpenSSL and Autoconf, and it would be useful to detect either &amp;lt;tt&amp;gt;OPENSSL_init_ssl&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;SSL_library_init&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;libssl&amp;lt;/tt&amp;gt;. To craft a feature test for OpenSSL that recognizes both &amp;lt;tt&amp;gt;OPENSSL_init_ssl&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SSL_library_init&amp;lt;/tt&amp;gt;, you can use the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if test &amp;quot;$with_openssl&amp;quot; = yes ; then&lt;br /&gt;
  dnl Order matters!&lt;br /&gt;
  if test &amp;quot;$PORTNAME&amp;quot; != &amp;quot;win32&amp;quot;; then&lt;br /&gt;
     AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])&lt;br /&gt;
     FOUND_SSL_LIB=&amp;quot;no&amp;quot;&lt;br /&gt;
     AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB=&amp;quot;yes&amp;quot;])&lt;br /&gt;
     AC_CHECK_LIB(ssl, SSL_library_init, [FOUND_SSL_LIB=&amp;quot;yes&amp;quot;])&lt;br /&gt;
     AS_IF([test &amp;quot;x$FOUND_SSL_LIB&amp;quot; = xno], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])&lt;br /&gt;
  else&lt;br /&gt;
     AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])&lt;br /&gt;
     FOUND_SSL_LIB=&amp;quot;no&amp;quot;&lt;br /&gt;
     AC_SEARCH_LIBS(OPENSSL_init_ssl, ssleay32 ssl, [FOUND_SSL_LIB=&amp;quot;yes&amp;quot;])&lt;br /&gt;
     AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [FOUND_SSL_LIB=&amp;quot;yes&amp;quot;])&lt;br /&gt;
     AS_IF([test &amp;quot;x$FOUND_SSL_LIB&amp;quot; = xno], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])&lt;br /&gt;
  fi&lt;br /&gt;
fi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many thanks to the Postgres folks for donating part of their &amp;lt;tt&amp;gt;configure.in&amp;lt;/tt&amp;gt;. Also see [http://stackoverflow.com/q/39285733 How to tell Autoconf “require symbol A or B” from LIB?] on Stack Overflow.&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Compilation]]&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=How_to_Integrate_a_Symmetric_Cipher&amp;diff=3169</id>
		<title>How to Integrate a Symmetric Cipher</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=How_to_Integrate_a_Symmetric_Cipher&amp;diff=3169"/>
		<updated>2021-04-18T07:22:10Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Changes to Configure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves to provide a guideline on how to integrate a symmetric block cipher into OpenSSL 1.1.1. This integration procedure will cover all aspects of integration for both [[Libcrypto API|libcrypto]] and [[Libssl API|libssl]]. ARIA will be used as the example cipher throughout. ARIA is a basic C implementation without the extra complexity of assembly optimization and lacking support for some of the more complex chaining modes.&lt;br /&gt;
&lt;br /&gt;
== Create the Cipher ==&lt;br /&gt;
All cryptographic functions are stored within the crypto/ directory and this is where ARIA's cipher will be implemented. To begin, create the directory.&lt;br /&gt;
&lt;br /&gt;
 mkdir crypto/aria&lt;br /&gt;
&lt;br /&gt;
Now that the directory is created, the creation of the cipher can begin by opening:&lt;br /&gt;
&lt;br /&gt;
 vi crypto/aria/aria.c&lt;br /&gt;
&lt;br /&gt;
You need to define two functions to do the lowest level encryption and decryption, although for ARIA they are both the same and only the first was actually defined:&lt;br /&gt;
&lt;br /&gt;
 void ARIA_encrypt(const unsigned char *in, unsigned char *out,&lt;br /&gt;
                   const ARIA_KEY *key)&lt;br /&gt;
 void ARIA_decrypt(const unsigned char *in, unsigned char *out,&lt;br /&gt;
                   const ARIA_KEY *key)&lt;br /&gt;
&lt;br /&gt;
Secondly, in the case of ARIA, you must also provide functions to set the encryption and decryption keys:&lt;br /&gt;
&lt;br /&gt;
 int ARIA_set_encrypt_key(const unsigned char *userKey, const int bits,&lt;br /&gt;
                          ARIA_KEY *key)&lt;br /&gt;
 int ARIA_set_decrypt_key(const unsigned char *userKey, const int bits,&lt;br /&gt;
                          ARIA_KEY *key)&lt;br /&gt;
&lt;br /&gt;
To prototype these functions you may create an aria_locl.h within crypto/aria/, however, the current preferred method is to prototype these functions in crypto/include/internal/aria.h. The prototyped functions contained within crypto/include/internal/aria.h can then be included by:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;internal/aria.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The last step in ARIA's low level implementation is to create a build.info file. This tells the Configure file in the root directory of OpenSSL on how to compile the files in ARIA's directory and configure the OpenSSL's library Makefile. The following is a simple example:&lt;br /&gt;
&lt;br /&gt;
 LIBS=../../libcrypto&lt;br /&gt;
 SOURCE[../../libcrypto]=\&lt;br /&gt;
         aria.c&lt;br /&gt;
&lt;br /&gt;
In short, this tells Configure that the code contained within aria.c, relies on code contained within the rest of the [[Libcrypto API|libcrypto]] library and include ARIA in [[Libcrypto API|libcrypto]]. For further guidance on creating more complex build.info files please view the README file contained within the Configurations directory or view other cipher's implementations. For assembly optimized versions, there is a lot more involved and is beyond the scope of this guide. This impacts not only the cryptographic implementation but also the EVP layer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changes to the Configuration ==&lt;br /&gt;
At this point the low level interface for ARIA has been implemented but we still need to modify the config and Configure files. This is necessary to have Configure recognize the build.info file previously created and the ability to detect an enable-aria flag.&lt;br /&gt;
&lt;br /&gt;
=== Changes to config ===&lt;br /&gt;
The config file requires the ability to detect an enable-aria flag which is done by adding aria to the argument of a for loop:&lt;br /&gt;
&lt;br /&gt;
 for i in aes aria bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha&lt;br /&gt;
 do&lt;br /&gt;
   if [ ! -d $THERE/crypto/$i ]&lt;br /&gt;
   then&lt;br /&gt;
     options=&amp;quot;$options no-$i&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
=== Changes to Configure ===&lt;br /&gt;
The following will include ARIA when Configure searches for a build.info file.&lt;br /&gt;
&lt;br /&gt;
 $config{sdirs} = [&lt;br /&gt;
    &amp;quot;objects&amp;quot;,&lt;br /&gt;
    &amp;quot;md2&amp;quot;, &amp;quot;md4&amp;quot;, &amp;quot;md5&amp;quot;, &amp;quot;sha&amp;quot;, &amp;quot;mdc2&amp;quot;, &amp;quot;hmac&amp;quot;, &amp;quot;ripemd&amp;quot;, &amp;quot;whrlpool&amp;quot;, &amp;quot;poly1305&amp;quot;, &amp;quot;blake2&amp;quot;, &amp;quot;siphash&amp;quot;,&lt;br /&gt;
    &amp;quot;des&amp;quot;, &amp;quot;aes&amp;quot;, &amp;quot;rc2&amp;quot;, &amp;quot;rc4&amp;quot;, &amp;quot;rc5&amp;quot;, &amp;quot;idea&amp;quot;, &amp;quot;aria&amp;quot;, &amp;quot;bf&amp;quot;, &amp;quot;cast&amp;quot;, &amp;quot;camellia&amp;quot;, &amp;quot;seed&amp;quot;, &amp;quot;chacha&amp;quot;, &amp;quot;modes&amp;quot;,&lt;br /&gt;
    &amp;quot;bn&amp;quot;, &amp;quot;ec&amp;quot;, &amp;quot;rsa&amp;quot;, &amp;quot;dsa&amp;quot;, &amp;quot;dh&amp;quot;, &amp;quot;dso&amp;quot;, &amp;quot;engine&amp;quot;,&lt;br /&gt;
    &amp;quot;buffer&amp;quot;, &amp;quot;bio&amp;quot;, &amp;quot;stack&amp;quot;, &amp;quot;lhash&amp;quot;, &amp;quot;rand&amp;quot;, &amp;quot;err&amp;quot;,&lt;br /&gt;
    &amp;quot;evp&amp;quot;, &amp;quot;asn1&amp;quot;, &amp;quot;pem&amp;quot;, &amp;quot;x509&amp;quot;, &amp;quot;x509v3&amp;quot;, &amp;quot;conf&amp;quot;, &amp;quot;txt_db&amp;quot;, &amp;quot;pkcs7&amp;quot;, &amp;quot;pkcs12&amp;quot;, &amp;quot;comp&amp;quot;, &amp;quot;ocsp&amp;quot;, &amp;quot;ui&amp;quot;,&lt;br /&gt;
    &amp;quot;cms&amp;quot;, &amp;quot;ts&amp;quot;, &amp;quot;srp&amp;quot;, &amp;quot;cmac&amp;quot;, &amp;quot;ct&amp;quot;, &amp;quot;async&amp;quot;, &amp;quot;kdf&amp;quot;&lt;br /&gt;
    ];&lt;br /&gt;
&lt;br /&gt;
The following steps are optional if you would like to have the cipher be enabled or disabled, should someone compiling choose to do so. Start by including ARIA to the disablables table.&lt;br /&gt;
 &lt;br /&gt;
 my @disablables = (&lt;br /&gt;
    &amp;quot;afalgeng&amp;quot;,&lt;br /&gt;
    &amp;quot;aria&amp;quot;,&lt;br /&gt;
    &amp;quot;asan&amp;quot;,&lt;br /&gt;
    &amp;quot;asm&amp;quot;,&lt;br /&gt;
    &amp;quot;async&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
Then, have ARIA disabled by default:&lt;br /&gt;
 our %disabled = ( # &amp;quot;what&amp;quot;         =&amp;gt; &amp;quot;comment&amp;quot;&lt;br /&gt;
                  &amp;quot;aria&amp;quot;            =&amp;gt; &amp;quot;default&amp;quot;,&lt;br /&gt;
                  &amp;quot;asan&amp;quot;            =&amp;gt; &amp;quot;default&amp;quot;,&lt;br /&gt;
                  &amp;quot;crypto-mdebug&amp;quot;   =&amp;gt; &amp;quot;default&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
== EVP Interface Integration ==&lt;br /&gt;
In short, the [[EVP]] provides a programmer with a high level interface to easily interact with low level OpenSSL cryptographic functions. A crypto/evp/e_aria.c file must be created to branch the gap between the high level EVP and the newly created ARIA cipher. At the bare minimum the file will include:&lt;br /&gt;
* Key struct&lt;br /&gt;
* EVP_CIPHER struct&lt;br /&gt;
* Naming the EVP_CIPHER&lt;br /&gt;
* Key Initialization Function&lt;br /&gt;
* Cipher Initialization Function&lt;br /&gt;
&lt;br /&gt;
=== Key Structure ===&lt;br /&gt;
The structure of the key is up to the developer implementing the cipher. &lt;br /&gt;
 &lt;br /&gt;
 /* ARIA subkey Structure */&lt;br /&gt;
 typedef struct {&lt;br /&gt;
     ARIA_KEY ks;&lt;br /&gt;
 } EVP_ARIA_KEY;&lt;br /&gt;
&lt;br /&gt;
This is a very simple example but this structure will include all necessary key material for both the encrypt and decrypt functions. It is also possible to include a function pointer in this struct to control whether the key is being used for encryption or decryption. This will be further explained below. &lt;br /&gt;
&lt;br /&gt;
=== EVP_CIPHER struct ===&lt;br /&gt;
The following is the definition of an EVP_CIPHER struct found in crypto/crypto/include/internal/evp_int.h:&lt;br /&gt;
&lt;br /&gt;
 struct evp_cipher_st {&lt;br /&gt;
    int nid;&lt;br /&gt;
    int block_size;&lt;br /&gt;
    /* Default value for variable length ciphers */&lt;br /&gt;
    int key_len;&lt;br /&gt;
    int iv_len;&lt;br /&gt;
    /* Various flags */&lt;br /&gt;
    unsigned long flags;&lt;br /&gt;
    /* init key */&lt;br /&gt;
    int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,&lt;br /&gt;
                 const unsigned char *iv, int enc);&lt;br /&gt;
    /* encrypt/decrypt data */&lt;br /&gt;
    int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,&lt;br /&gt;
                      const unsigned char *in, size_t inl);&lt;br /&gt;
    /* cleanup ctx */&lt;br /&gt;
    int (*cleanup) (EVP_CIPHER_CTX *);&lt;br /&gt;
    /* how big ctx-&amp;gt;cipher_data needs to be */&lt;br /&gt;
    int ctx_size;&lt;br /&gt;
    /* Populate a ASN1_TYPE with parameters */&lt;br /&gt;
    int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);&lt;br /&gt;
    /* Get parameters from a ASN1_TYPE */&lt;br /&gt;
    int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);&lt;br /&gt;
    /* Miscellaneous operations */&lt;br /&gt;
    int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);&lt;br /&gt;
    /* Application data */&lt;br /&gt;
    void *app_data;&lt;br /&gt;
 } /* EVP_CIPHER */ ;&lt;br /&gt;
&lt;br /&gt;
The ARIA EVP_CIPHER struct uses C preprocessor techniques to dynamically create the EVP_CIPHER struct and is outside the scope of this guide. Instead, the RC4 EVP_CIPHER struct is much easier to follow and mimic.&lt;br /&gt;
&lt;br /&gt;
 static const EVP_CIPHER r4_cipher = {&lt;br /&gt;
    NID_rc4,&lt;br /&gt;
    1, EVP_RC4_KEY_SIZE, 0,&lt;br /&gt;
    EVP_CIPH_VARIABLE_LENGTH,&lt;br /&gt;
    rc4_init_key,&lt;br /&gt;
    rc4_cipher,&lt;br /&gt;
    NULL,&lt;br /&gt;
    sizeof(EVP_RC4_KEY),&lt;br /&gt;
    NULL,&lt;br /&gt;
    NULL,&lt;br /&gt;
    NULL,&lt;br /&gt;
    NULL&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Notice the function pointers rc4_init_key and rc4_cipher as these are the functions to create the key and run the cipher respectively.&lt;br /&gt;
&lt;br /&gt;
=== Naming the EVP_CIPHER ===&lt;br /&gt;
Again, since ARIA uses C preprocessor techniques to dynamically create the names of each of the modes of operation, we will take a look at RC4's implmentation as it is very easy to understand.&lt;br /&gt;
&lt;br /&gt;
 const EVP_CIPHER *EVP_rc4(void)&lt;br /&gt;
 {&lt;br /&gt;
    return (&amp;amp;r4_cipher);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice the name in this example is EVP_rc4() and r4_cipher is the name of the cipher initialization function.&lt;br /&gt;
&lt;br /&gt;
=== Key Initialization Function ===&lt;br /&gt;
&lt;br /&gt;
The following initializes the key for ARIA depending on the mode the user requests through the EVP interface.&lt;br /&gt;
&lt;br /&gt;
 static int aria_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,&lt;br /&gt;
                          const unsigned char *iv, int enc)&lt;br /&gt;
 {&lt;br /&gt;
    int ret;&lt;br /&gt;
    int mode = EVP_CIPHER_CTX_mode(ctx);&lt;br /&gt;
    if (mode==EVP_CIPH_CFB_MODE||mode==EVP_CIPH_OFB_MODE||enc)&lt;br /&gt;
        ret = ARIA_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,&lt;br /&gt;
                                   EVP_CIPHER_CTX_get_cipher_data(ctx));&lt;br /&gt;
    else&lt;br /&gt;
        ret = ARIA_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,&lt;br /&gt;
                                   EVP_CIPHER_CTX_get_cipher_data(ctx));&lt;br /&gt;
    if(ret &amp;lt; 0) {&lt;br /&gt;
        EVPerr(EVP_F_ARIA_INIT_KEY,EVP_R_ARIA_KEY_SETUP_FAILED);&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
    return 1; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
An alternative approach is to use the enc parameter to determine whether the key is being used for encryption or decryption. The value of 1 for enc is encryption and 0 for decryption.&lt;br /&gt;
&lt;br /&gt;
=== Cipher Initialization Function ===&lt;br /&gt;
Once the key has been created, the EVP will then call the cipher initialization function assigned in the EVP_CIPHER struct. This function will pass the parameters to the low level implementation of ARIA. &lt;br /&gt;
 &lt;br /&gt;
 static void aria_cbc_encrypt(const unsigned char *in, unsigned char *out,&lt;br /&gt;
                              size_t len, const ARIA_KEY *key,&lt;br /&gt;
                              unsigned char *ivec, const int enc)&lt;br /&gt;
 {&lt;br /&gt;
    if (enc)&lt;br /&gt;
        CRYPTO_cbc128_encrypt(in, out, len, key, ivec,&lt;br /&gt;
                              (block128_f) aria_encrypt);&lt;br /&gt;
    else&lt;br /&gt;
        CRYPTO_cbc128_decrypt(in, out, len, key, ivec,&lt;br /&gt;
                              (block128_f) aria_encrypt);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Another approach is to assign a function pointer in the creation of the key as to whether an encrypt or decrypt routine is about to happen using the enc parameter.  &lt;br /&gt;
&lt;br /&gt;
 /* EVP_CIPHER struct */&lt;br /&gt;
 typedef struct {&lt;br /&gt;
     MYKEY k;&lt;br /&gt;
     union {&lt;br /&gt;
         void (*cipher) (MYKEY *k, size_t len, const unsigned char *in,&lt;br /&gt;
                         unsigned char *out);&lt;br /&gt;
     } stream;&lt;br /&gt;
 } EVP_MYCIPHER_KEY;&lt;br /&gt;
&lt;br /&gt;
 /* Key Initialization Function */&lt;br /&gt;
 static int mycipher_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,&lt;br /&gt;
                              const unsigned char *iv, int enc)&lt;br /&gt;
 {&lt;br /&gt;
     enc ? mycipher_enc_set_key(&amp;amp;data(ctx)-&amp;gt;k) : &lt;br /&gt;
               mycipher_dec_set_key(&amp;amp;data(ctx)-&amp;gt;k);&lt;br /&gt;
     data(ctx)-&amp;gt;stream.cipher = enc ? encrypt_mycipher : decrypt_mycipher;&lt;br /&gt;
     return 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 /* Cipher Initialization Function */&lt;br /&gt;
 static int mycipher(EVP_CIPHER_CTX *ctx, unsigned char *out,&lt;br /&gt;
                     const unsigned char *in, size_t inl)&lt;br /&gt;
 {&lt;br /&gt;
     (*data(ctx)-&amp;gt;stream.cipher) (&amp;amp;data(ctx)-&amp;gt;k, inl, in, out);&lt;br /&gt;
     return 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once completed, add e_aria.c into crypto/evp's build.info file.&lt;br /&gt;
&lt;br /&gt;
 LIBS=../../libcrypto&lt;br /&gt;
 SOURCE[../../libcrypto]=\&lt;br /&gt;
        encode.c digest.c evp_enc.c evp_key.c evp_cnf.c \&lt;br /&gt;
        e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\&lt;br /&gt;
        e_rc4.c e_aes.c names.c e_seed.c e_aria.c \&lt;br /&gt;
&lt;br /&gt;
Now that e_aria.c has been built, we have to register it with the EVP subsystem. Modify crypto/evp/c_allc.c to register ARIA.&lt;br /&gt;
 &lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_ecb());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_cbc());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_cfb());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_cfb1());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_cfb8());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_ofb());&lt;br /&gt;
     EVP_add_cipher_alias(SN_aria_128_cbc, &amp;quot;ARIA128&amp;quot;);&lt;br /&gt;
     EVP_add_cipher_alias(SN_aria_128_cbc, &amp;quot;aria128&amp;quot;);&lt;br /&gt;
     EVP_add_cipher(EVP_aria_192_ecb());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_192_cbc());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_192_cfb());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_192_cfb1());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_192_cfb8());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_192_ofb());&lt;br /&gt;
     EVP_add_cipher_alias(SN_aria_192_cbc,&lt;br /&gt;
     EVP_add_cipher_alias(SN_aria_192_cbc,&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_ecb());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_cbc());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_cfb());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_cfb1());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_cfb8());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_ofb());&lt;br /&gt;
     EVP_add_cipher_alias(SN_aria_256_cbc,&lt;br /&gt;
     EVP_add_cipher_alias(SN_aria_256_cbc,&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
This adds all of the cipher chaining modes that were provided by the e_aria.c files except for CTR mode. It also includes some aliases for the CBC modes. &lt;br /&gt;
&lt;br /&gt;
=== Error/Reason Codes ===&lt;br /&gt;
&lt;br /&gt;
Error codes are handled dynamically in OpenSSL by using make update. make update will, in part, call make errors which will later execute util/mkerr.pl recursively on crypto/*.c, crypto/*/*.c, ssl/*.c, and apps/*.c.  This script will scan for error and function codes and automatically add them as error/reason codes in the library. Essentially, it will look for strings that &amp;quot;look like&amp;quot; function or reason codes: basically anything consisting of all upper case and numerics which has _F_ or _R_ in it and which has the name of an error library at the start. For example, EVP_F_ARIA_INIT_KEY and EVP_R_ARIA_KEY_SETUP_FAILED. For more detailed documentation please view crypto/err/README and util/mkerr.pl.&lt;br /&gt;
&lt;br /&gt;
== Crypto Objects ==&lt;br /&gt;
Crypto object IDs are used to map a name to a given ARIA cipher mode. To add object Ids for the ARIA suite, the crypto/objects/objects.txt file must be modified:&lt;br /&gt;
&lt;br /&gt;
 !Alias aria 1 2 410 200046 1 1&lt;br /&gt;
 aria 1                  : ARIA-128-ECB                  : aria-128-ecb&lt;br /&gt;
 aria 2                  : ARIA-128-CBC                  : aria-128-cbc&lt;br /&gt;
 !Cname aria-128-cfb128&lt;br /&gt;
 aria 3                  : ARIA-128-CFB                  : aria-128-cfb&lt;br /&gt;
 !Cname aria-128-ofb128&lt;br /&gt;
 aria 4                  : ARIA-128-OFB                  : aria-128-ofb&lt;br /&gt;
 aria 5                  : ARIA-128-CTR                  : aria-128-ctr&lt;br /&gt;
 &lt;br /&gt;
 aria 6                  : ARIA-192-ECB                  : aria-192-ecb&lt;br /&gt;
 aria 7                  : ARIA-192-CBC                  : aria-192-cbc&lt;br /&gt;
 !Cname aria-192-cfb128&lt;br /&gt;
 aria 8                  : ARIA-192-CFB                  : aria-192-cfb&lt;br /&gt;
 !Cname aria-192-ofb128&lt;br /&gt;
 aria 9                  : ARIA-192-OFB                  : aria-192-ofb&lt;br /&gt;
 aria 10                 : ARIA-192-CTR                  : aria-192-ctr &lt;br /&gt;
 &lt;br /&gt;
 aria 11                 : ARIA-256-ECB                  : aria-256-ecb&lt;br /&gt;
 aria 12                 : ARIA-256-CBC                  : aria-256-cbc&lt;br /&gt;
 !Cname aria-256-cfb128&lt;br /&gt;
 aria 13                 : ARIA-256-CFB                  : aria-256-cfb&lt;br /&gt;
 !Cname aria-256-ofb128&lt;br /&gt;
 aria 14                 : ARIA-256-OFB                  : aria-256-ofb&lt;br /&gt;
 aria 15                 : ARIA-256-CTR                  : aria-256-ctr&lt;br /&gt;
 &lt;br /&gt;
 # There are no OIDs for these ARIA modes...&lt;br /&gt;
                         : ARIA-128-CFB1                 : aria-128-cfb1&lt;br /&gt;
                         : ARIA-192-CFB1                 : aria-192-cfb1&lt;br /&gt;
                         : ARIA-256-CFB1                 : aria-256-cfb1&lt;br /&gt;
                         : ARIA-128-CFB8                 : aria-128-cfb8&lt;br /&gt;
                         : ARIA-192-CFB8                 : aria-192-cfb8&lt;br /&gt;
                         : ARIA-256-CFB8                 : aria-256-cfb8&lt;br /&gt;
&lt;br /&gt;
For more elaborate documentation inserting entries into crypto/objects/objects.txt, view the README file under crypto/objects/. Note that you must also run make update to automatically generate crypto/objects/obj_dat.h and crypto/objects/obj_mac.num. &lt;br /&gt;
&lt;br /&gt;
== Update Headers ==&lt;br /&gt;
=== evp.h ===&lt;br /&gt;
To begin, the include/openssl/evp.h header requires three changes. Firstly, ARIA's modes must be added:&lt;br /&gt;
 &lt;br /&gt;
 # ifndef OPENSSL_NO_ARIA&lt;br /&gt;
 const EVP_CIPHER *EVP_aria_128_ecb(void);&lt;br /&gt;
 const EVP_CIPHER *EVP_aria_128_cbc(void);&lt;br /&gt;
 const EVP_CIPHER *EVP_aria_128_cfb1(void);&lt;br /&gt;
 const EVP_CIPHER *EVP_aria_128_cfb8(void);&lt;br /&gt;
 const EVP_CIPHER *EVP_aria_128_cfb128(void);&lt;br /&gt;
 # define EVP_aria_128_cfb EVP_aria_128_cfb128&lt;br /&gt;
 const EVP_CIPHER *EVP_aria_128_ofb(void);&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 const EVP_CIPHER *EVP_aria_256_ofb(void);&lt;br /&gt;
 # endif&lt;br /&gt;
&lt;br /&gt;
This is the name of the EVP_CIPHER created in e_aria.c. Secondly, we must add in the optional but recommended failure and reason codes:&lt;br /&gt;
&lt;br /&gt;
 # define EVP_F_ARIA_INIT_KEY              168&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 # define EVP_R_ARIA_KEY_SETUP_FAILED      163&lt;br /&gt;
&lt;br /&gt;
== Utilities ==&lt;br /&gt;
In util/mkdir.pl ARIA must be added to the list of known_algorithms and the include path to the ARIA header file added (unless no_aria) is defined:&lt;br /&gt;
&lt;br /&gt;
 $crypto.=&amp;quot; include/openssl/aria.h&amp;quot; ; # unless $no_aria;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== TLS ==&lt;br /&gt;
&lt;br /&gt;
At this point the cipher has now been implemented into the OpenSSL library and the following TLS section is optional. This section is only necessary if the cipher must be implemented as a TLS ciphersuite. &lt;br /&gt;
&lt;br /&gt;
=== tls1.h ===&lt;br /&gt;
/include/openssl/tls1.h is where ARIA's cipher suite signatures will be defined. These come directly from RFC6209:&lt;br /&gt;
&lt;br /&gt;
 /* ARIA based ciphersuites from RFC6209 */&lt;br /&gt;
 # define TLS1_CK_RSA_WITH_ARIA_128_CBC_SHA256         0x0300C03C&lt;br /&gt;
 # define TLS1_CK_RSA_WITH_ARIA_256_CBC_SHA384         0x0300C03D&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 # define TLS1_CK_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384   0x0300C071&lt;br /&gt;
&lt;br /&gt;
It is important to note that this is where the key exchange, authentication, and MAC algorithms can be chosen by name and later implemented in s3_lib.c. Once the signatures are defined, the text representations need to be defined:&lt;br /&gt;
&lt;br /&gt;
 /* ARIA based ciphersuites from RFC6209 */&lt;br /&gt;
 # define TLS1_TXT_RSA_WITH_ARIA_128_CBC_SHA256       &amp;quot;ARIA128-CBC-SHA256&amp;quot; &lt;br /&gt;
 # define TLS1_TXT_RSA_WITH_ARIA_256_CBC_SHA384       &amp;quot;ARIA256-CBC-SHA384&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 # define TLS1_TXT_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 &amp;quot;ECDHE-PSK-ARIA256-CBC-SHA384&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== ssl.h ===&lt;br /&gt;
/include/openssl/ssl.h needs the string names to be later used in the ARIA cipher suites.&lt;br /&gt;
&lt;br /&gt;
 # define SSL_TXT_ARIA128        &amp;quot;ARIA128&amp;quot;&lt;br /&gt;
 # define SSL_TXT_ARIA256        &amp;quot;ARIA256&amp;quot;&lt;br /&gt;
 # define SSL_TXT_ARIA           &amp;quot;ARIA&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== s3_lib.c ===&lt;br /&gt;
To use ARIA with TLS, it is necessary to define the suite combinations that are legal as per the various standards. These are defined in the ssl/s3_lib.c file. In all cases the security level is considered high, the suite is not a default, and is supported only in TLS 1.2.&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
     {&lt;br /&gt;
      1,&lt;br /&gt;
      TLS1_TXT_RSA_WITH_ARIA_128_CBC_SHA256,&lt;br /&gt;
      TLS1_CK_RSA_WITH_ARIA_128_CBC_SHA256,&lt;br /&gt;
      SSL_kRSA,&lt;br /&gt;
      SSL_aRSA,&lt;br /&gt;
      SSL_ARIA128,&lt;br /&gt;
      SSL_SHA256,&lt;br /&gt;
      TLS1_2_VERSION, TLS1_2_VERSION,&lt;br /&gt;
      DTLS1_2_VERSION, DTLS1_2_VERSION,&lt;br /&gt;
      SSL_NOT_DEFAULT | SSL_HIGH,&lt;br /&gt;
      SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,&lt;br /&gt;
      128,&lt;br /&gt;
      128,&lt;br /&gt;
     },&lt;br /&gt;
     {&lt;br /&gt;
      1,&lt;br /&gt;
      TLS1_TXT_RSA_WITH_ARIA_256_CBC_SHA384,&lt;br /&gt;
      TLS1_CK_RSA_WITH_ARIA_256_CBC_SHA384,&lt;br /&gt;
      SSL_kRSA,&lt;br /&gt;
      SSL_aRSA,&lt;br /&gt;
      SSL_ARIA256,&lt;br /&gt;
      SSL_SHA384,&lt;br /&gt;
      TLS1_2_VERSION, TLS1_2_VERSION,&lt;br /&gt;
      DTLS1_2_VERSION, DTLS1_2_VERSION,&lt;br /&gt;
      SSL_NOT_DEFAULT | SSL_HIGH,&lt;br /&gt;
      SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,&lt;br /&gt;
      256,&lt;br /&gt;
      256,&lt;br /&gt;
     },&lt;br /&gt;
     &lt;br /&gt;
      ...&lt;br /&gt;
      &lt;br /&gt;
     {&lt;br /&gt;
      1,&lt;br /&gt;
      TLS1_TXT_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,&lt;br /&gt;
      TLS1_CK_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,&lt;br /&gt;
      SSL_kECDHEPSK,&lt;br /&gt;
      SSL_aPSK,&lt;br /&gt;
      SSL_ARIA256,&lt;br /&gt;
      SSL_SHA384,&lt;br /&gt;
      TLS1_2_VERSION, TLS1_2_VERSION,&lt;br /&gt;
      DTLS1_2_VERSION, DTLS1_2_VERSION,&lt;br /&gt;
      SSL_NOT_DEFAULT | SSL_HIGH,&lt;br /&gt;
      SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,&lt;br /&gt;
      256,&lt;br /&gt;
      256,&lt;br /&gt;
      },&lt;br /&gt;
 #  endif                        /* OPENSSL_NO_EC */&lt;br /&gt;
 # endif                         /* OPENSSL_NO_PSK */&lt;br /&gt;
 #endif                          /* OPENSSL_NO_ARIA */&lt;br /&gt;
&lt;br /&gt;
It is critical to note that if the cipher suite implementation uses eliptical curve (EC) for instance, that the cipher suite implementation is inside the OPENSSL_NO_EC preprocessor directives.&lt;br /&gt;
&lt;br /&gt;
=== ssl_ciph.c ===&lt;br /&gt;
The ssl/ssl_ciph.c file needs indices for the ARIA ciphers available from TLS. In the initial table of #defines:&lt;br /&gt;
&lt;br /&gt;
 #define SSL_ENC_ARIA128_IDX    20&lt;br /&gt;
 #define SSL_ENC_ARIA256_IDX    21&lt;br /&gt;
 #define SSL_ENC_NUM_IDX        22&lt;br /&gt;
&lt;br /&gt;
Later in the ssl_cipher_table_cipher table of NIDs for each cipher:&lt;br /&gt;
&lt;br /&gt;
 {SSL_ARIA128, NID_aria_128_cbc}, /* SSL_ENC_ARIA128_IDX 20 */&lt;br /&gt;
 {SSL_ARIA256, NID_aria_256_cbc} /* SSL_ENC_ARIA256_IDX 21 */&lt;br /&gt;
&lt;br /&gt;
This maps libssl's request of ARIA to ARIA's respective NID value which will later be looked up to dive into ARIA's implementation within libcrypto. This can be seen as bridging the gap between libssl and libcrypto. To continue, alias's must be created for the cipher suite:&lt;br /&gt;
&lt;br /&gt;
 {0, SSL_TXT_ARIA128, 0, 0, 0, SSL_ARIA128, 0, 0, 0, 0, 0, 0},&lt;br /&gt;
 {0, SSL_TXT_ARIA256, 0, 0, 0, SSL_ARIA256, 0, 0, 0, 0, 0, 0},&lt;br /&gt;
 {0, SSL_TXT_ARIA, 0, 0, 0, SSL_ARIA128 | SSL_ARIA256, 0, 0, 0, 0, 0, 0},&lt;br /&gt;
&lt;br /&gt;
Lastly, add ARIA's description into the switch statement within the SSL_CIPHER_description function:&lt;br /&gt;
&lt;br /&gt;
 case SSL_ARIA128:&lt;br /&gt;
     enc = &amp;quot;ARIA(128)&amp;quot;;&lt;br /&gt;
     break;&lt;br /&gt;
 case SSL_ARIA256:&lt;br /&gt;
     enc = &amp;quot;ARIA(256)&amp;quot;;&lt;br /&gt;
     break;&lt;br /&gt;
&lt;br /&gt;
=== ssl/ssl_init.c ===&lt;br /&gt;
The ssl/ssl_init.c function needs to conditionally register the ARIA ciphers and can be inserted along with the other ciphers:&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
     EVP_add_cipher(EVP_aria_128_cbc());&lt;br /&gt;
     EVP_add_cipher(EVP_aria_256_cbc());&lt;br /&gt;
 #endif&lt;br /&gt;
 #ifndef OPENSSL_NO_DES&lt;br /&gt;
    EVP_add_cipher(EVP_des_cbc());&lt;br /&gt;
    EVP_add_cipher(EVP_des_ede3_cbc());&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
=== ssl/ssl_locl.h ===&lt;br /&gt;
This file contains the bits for SSL_ARIA as well as the group definition:&lt;br /&gt;
&lt;br /&gt;
 # define SSL_ARIA128       0x00100000L&lt;br /&gt;
 # define SSL_ARIA256       0x00200000L&lt;br /&gt;
 # define SSL_ARIA          (SSL_ARIA128|SSL_ARIA256)&lt;br /&gt;
&lt;br /&gt;
=== ssl/t1_trce.c ===&lt;br /&gt;
Finally, the ssl/t1_trce.c file contains a table of the protocol numbers and text descriptions for all legal TLS protocols. If your cipher suites are not already present in this file, they should be added to it. This step proved unnecessary for ARIA because the required definitions were already present.&lt;br /&gt;
&lt;br /&gt;
== Unit Testing ==&lt;br /&gt;
OpenSSL has a built in test suite that can be leveraged for ARIA. The test/evptests.txt unit test vectors for ARIA need to be added:&lt;br /&gt;
&lt;br /&gt;
 # ARIA test vectors from RFC5794&lt;br /&gt;
 Cipher = ARIA-128-ECB&lt;br /&gt;
 Key = 000102030405060708090a0b0c0d0e0f&lt;br /&gt;
 Operation = ENCRYPT&lt;br /&gt;
 Plaintext = 00112233445566778899aabbccddeeff&lt;br /&gt;
 Ciphertext = d718fbd6ab644c739da95f3be6451778&lt;br /&gt;
 &lt;br /&gt;
 Cipher = ARIA-128-ECB&lt;br /&gt;
 Key = 000102030405060708090a0b0c0d0e0f&lt;br /&gt;
 Operation = DECRYPT&lt;br /&gt;
 Plaintext = 00112233445566778899aabbccddeeff&lt;br /&gt;
 Ciphertext = d718fbd6ab644c739da95f3be6451778&lt;br /&gt;
 &lt;br /&gt;
 Cipher = ARIA-192-ECB&lt;br /&gt;
 Key = 000102030405060708090a0b0c0d0e0f1011121314151617&lt;br /&gt;
 Operation = ENCRYPT&lt;br /&gt;
 Plaintext = 00112233445566778899aabbccddeeff&lt;br /&gt;
 Ciphertext = 26449c1805dbe7aa25a468ce263a9e79&lt;br /&gt;
 &lt;br /&gt;
 Cipher = ARIA-192-ECB&lt;br /&gt;
 Key = 000102030405060708090a0b0c0d0e0f1011121314151617&lt;br /&gt;
 Operation = DECRYPT&lt;br /&gt;
 Plaintext = 00112233445566778899aabbccddeeff&lt;br /&gt;
 Ciphertext = 26449c1805dbe7aa25a468ce263a9e79&lt;br /&gt;
 &lt;br /&gt;
 Cipher = ARIA-256-ECB&lt;br /&gt;
 Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f&lt;br /&gt;
 Operation = ENCRYPT&lt;br /&gt;
 Plaintext = 00112233445566778899aabbccddeeff&lt;br /&gt;
 Ciphertext = f92bd7c79fb72e2f2b8f80c1972d24fc&lt;br /&gt;
 &lt;br /&gt;
 Cipher = ARIA-256-ECB&lt;br /&gt;
 Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f&lt;br /&gt;
 Operation = DECRYPT&lt;br /&gt;
 Plaintext = 00112233445566778899aabbccddeeff&lt;br /&gt;
 Ciphertext = f92bd7c79fb72e2f2b8f80c1972d24fc&lt;br /&gt;
&lt;br /&gt;
These values are pulled from ARIA'a RFC and others can be added if desired. Once the integration is complete with the remaining steps below, the test suite can be ran with make test.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
The apps/openssl.c needs to be able to print that it does not support ARIA via the list_disabled function:&lt;br /&gt;
&lt;br /&gt;
 #ifdef OPENSSL_NO_ARIA&lt;br /&gt;
    BIO_puts(bio_out, &amp;quot;ARIA\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
The apps/progs.h needs the available cipher definitions included in the functions array:&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    { FT_cipher, &amp;quot;aria-128-cbc&amp;quot;, enc_main, enc_options },&lt;br /&gt;
 #endif&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    { FT_cipher, &amp;quot;aria-128-ecb&amp;quot;, enc_main, enc_options },&lt;br /&gt;
 #endif&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    { FT_cipher, &amp;quot;aria-192-cbc&amp;quot;, enc_main, enc_options },&lt;br /&gt;
 #endif&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    { FT_cipher, &amp;quot;aria-192-ecb&amp;quot;, enc_main, enc_options },&lt;br /&gt;
 #endif&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    { FT_cipher, &amp;quot;aria-256-cbc&amp;quot;, enc_main, enc_options },&lt;br /&gt;
 #endif&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    { FT_cipher, &amp;quot;aria-256-ecb&amp;quot;, enc_main, enc_options },&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
The apps/progs.pl program needs to know about the ARIA cipher:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;aria-128-cbc&amp;quot;, &amp;quot;aria-128-ecb&amp;quot;,&lt;br /&gt;
 &amp;quot;aria-192-cbc&amp;quot;, &amp;quot;aria-192-ecb&amp;quot;,&lt;br /&gt;
 &amp;quot;aria-256-cbc&amp;quot;, &amp;quot;aria-256-ecb&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
=== Speed Test ===&lt;br /&gt;
Just as it was explained in the TLS section, the speed test integration is optional and only needs to be implemented if desired. That being said, it is possible to natively integrate ARIA into OpenSSL's built in speed test, however, once a cipher is integrated into the EVP the speed test can access the cipher using the -evp flag. For completeness sake, the following steps are necessary to manually integrated ARIA into OpenSSL's speedtest.&lt;br /&gt;
&lt;br /&gt;
First the ARIA header file needs to be conditionally included:&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
 # include &amp;lt;openssl/aria.h&amp;gt;&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
The number of algorithms increased:&lt;br /&gt;
&lt;br /&gt;
 #define ALGOR_NUM       33&lt;br /&gt;
&lt;br /&gt;
The algorithms themselves defined in the names array:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;aria-128 cbc&amp;quot;, &amp;quot;aria-192 cbc&amp;quot;, &amp;quot;aria-256 cbc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The speed_options indicies defined:&lt;br /&gt;
&lt;br /&gt;
 #define D_CBC_128_ARIA  30&lt;br /&gt;
 #define D_CBC_192_ARIA  31&lt;br /&gt;
 #define D_CBC_256_ARIA  32&lt;br /&gt;
&lt;br /&gt;
The doit_choices text mapping defined:&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    {&amp;quot;aria-128-cbc&amp;quot;, D_CBC_128_ARIA},&lt;br /&gt;
    {&amp;quot;aria-192-cbc&amp;quot;, D_CBC_192_ARIA},&lt;br /&gt;
    {&amp;quot;aria-256-cbc&amp;quot;, D_CBC_256_ARIA},&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
The initialisation key vectors defined:&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    static const unsigned char akey24[24] = {&lt;br /&gt;
        0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0,&lt;br /&gt;
        0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12,&lt;br /&gt;
        0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34&lt;br /&gt;
    };&lt;br /&gt;
    static const unsigned char akey32[32] = {&lt;br /&gt;
        0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0,&lt;br /&gt;
        0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12,&lt;br /&gt;
        0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34,&lt;br /&gt;
        0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56&lt;br /&gt;
 };&lt;br /&gt;
    ARIA_KEY aria_ks1, aria_ks2, aria_ks3;&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
The command line processing adjusted:&lt;br /&gt;
&lt;br /&gt;
 # ifndef OPENSSL_NO_ARIA&lt;br /&gt;
        if (strcmp(*argv, &amp;quot;aria&amp;quot;) == 0) {&lt;br /&gt;
            doit[D_CBC_128_ARIA] = doit[D_CBC_192_ARIA] =&lt;br /&gt;
                doit[D_CBC_256_ARIA] = 1;&lt;br /&gt;
                continue; &lt;br /&gt;
        }&lt;br /&gt;
 # endif&lt;br /&gt;
&lt;br /&gt;
Keys are set:&lt;br /&gt;
&lt;br /&gt;
 # ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    ARIA_set_encrypt_key(key16, 128, &amp;amp;aria_ks1);&lt;br /&gt;
    ARIA_set_encrypt_key(akey24, 192, &amp;amp;aria_ks2);&lt;br /&gt;
    ARIA_set_encrypt_key(akey32, 256, &amp;amp;aria_ks3);&lt;br /&gt;
 # endif&lt;br /&gt;
&lt;br /&gt;
Counts initialized:&lt;br /&gt;
&lt;br /&gt;
 c[D_CBC_128_ARIA][0] = count;&lt;br /&gt;
 c[D_CBC_192_ARIA][0] = count;&lt;br /&gt;
 c[D_CBC_256_ARIA][0] = count;&lt;br /&gt;
&lt;br /&gt;
and adjusted:&lt;br /&gt;
&lt;br /&gt;
 c[D_CBC_128_ARIA][i] = c[D_CBC_128_ARIA][i - 1] * l0 / l1;&lt;br /&gt;
 c[D_CBC_192_ARIA][i] = c[D_CBC_192_ARIA][i - 1] * l0 / l1;&lt;br /&gt;
 c[D_CBC_256_ARIA][i] = c[D_CBC_256_ARIA][i - 1] * l0 / l1;&lt;br /&gt;
&lt;br /&gt;
Finally, the actual speed testing code:&lt;br /&gt;
&lt;br /&gt;
 #ifndef OPENSSL_NO_ARIA&lt;br /&gt;
    if (doit[D_CBC_128_ARIA]) {&lt;br /&gt;
        if (async_jobs &amp;gt; 0) {&lt;br /&gt;
            BIO_printf(bio_err, &amp;quot;Async mode is not supported with %s\n&amp;quot;,&lt;br /&gt;
                       names[D_CBC_128_ARIA]);&lt;br /&gt;
            doit[D_CBC_128_ARIA] = 0;&lt;br /&gt;
        }&lt;br /&gt;
        for (testnum = 0; testnum &amp;lt; SIZE_NUM&amp;amp;&amp;amp;async_init == 0; testnum++) {&lt;br /&gt;
            print_message(names[D_CBC_128_ARIA], c[D_CBC_128_ARIA][testnum],&lt;br /&gt;
                          lengths[testnum]);&lt;br /&gt;
            Time_F(START);&lt;br /&gt;
            for (count = 0, run = 1; COND(c[D_CBC_128_ARIA][testnum]); count++)&lt;br /&gt;
                ARIA_cbc_encrypt(loopargs[0].buf, loopargs[0].buf,&lt;br /&gt;
                                 (size_t)lengths[testnum], &amp;amp;aria_ks1,&lt;br /&gt;
                                 iv, ARIA_ENCRYPT);&lt;br /&gt;
            d = Time_F(STOP);&lt;br /&gt;
            print_result(D_CBC_128_ARIA, testnum, count, d);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    if (doit[D_CBC_192_ARIA]) {&lt;br /&gt;
        if (async_jobs &amp;gt; 0) {&lt;br /&gt;
            BIO_printf(bio_err, &amp;quot;Async mode is not supported with %s\n&amp;quot;,&lt;br /&gt;
                       names[D_CBC_192_ARIA]);&lt;br /&gt;
            doit[D_CBC_192_ARIA] = 0;&lt;br /&gt;
        }&lt;br /&gt;
        for (testnum = 0; testnum &amp;lt; SIZE_NUM&amp;amp;&amp;amp;async_init == 0; testnum++) {&lt;br /&gt;
            print_message(names[D_CBC_192_ARIA], c[D_CBC_192_ARIA][testnum],&lt;br /&gt;
                          lengths[testnum]);&lt;br /&gt;
            if (async_jobs &amp;gt; 0) {&lt;br /&gt;
                BIO_printf(bio_err, &amp;quot;Async mode is not supported, exiting...&amp;quot;);&lt;br /&gt;
                exit(1);&lt;br /&gt;
            }&lt;br /&gt;
            Time_F(START);&lt;br /&gt;
            for (count = 0, run = 1; COND(c[D_CBC_192_ARIA][testnum]); count++)&lt;br /&gt;
                ARIA_cbc_encrypt(loopargs[0].buf, loopargs[0].buf,&lt;br /&gt;
                                 (size_t)lengths[testnum], &amp;amp;aria_ks2,&lt;br /&gt;
                                 iv, ARIA_ENCRYPT);&lt;br /&gt;
            d = Time_F(STOP);&lt;br /&gt;
            print_result(D_CBC_192_ARIA, testnum, count, d);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    if (doit[D_CBC_256_ARIA]) {&lt;br /&gt;
        if (async_jobs &amp;gt; 0) {&lt;br /&gt;
            BIO_printf(bio_err, &amp;quot;Async mode is not supported with %s\n&amp;quot;,&lt;br /&gt;
                       names[D_CBC_256_ARIA]);&lt;br /&gt;
            doit[D_CBC_256_ARIA] = 0;&lt;br /&gt;
        }&lt;br /&gt;
        for (testnum = 0; testnum &amp;lt; SIZE_NUM&amp;amp;&amp;amp;async_init == 0; testnum++) {&lt;br /&gt;
            print_message(names[D_CBC_256_ARIA], c[D_CBC_256_ARIA][testnum],&lt;br /&gt;
                          lengths[testnum]);&lt;br /&gt;
            Time_F(START);&lt;br /&gt;
            for (count = 0, run = 1; COND(c[D_CBC_256_ARIA][testnum]); count++)&lt;br /&gt;
                ARIA_cbc_encrypt(loopargs[0].buf, loopargs[0].buf,&lt;br /&gt;
                                 (size_t)lengths[testnum], &amp;amp;aria_ks3,&lt;br /&gt;
                                 iv, ARIA_ENCRYPT);&lt;br /&gt;
            d = Time_F(STOP);&lt;br /&gt;
            print_result(D_CBC_256_ARIA, testnum, count, d);&lt;br /&gt;
 &lt;br /&gt;
        } &lt;br /&gt;
    }&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
== Manual Pages ==&lt;br /&gt;
OpenSSL has the strong philosophy of containing documentation and manual pages for all code. The relevant manual pages require updating because they will gain automatic support for ARIA. Many of these pages require the same automatic change. These are doc/man1/dsa.pod, doc/man1/gendsa.pod, doc/man1/genrsa.pod and doc/man1/rsa.pod. The new command line options need to be added to the documentation:&lt;br /&gt;
&lt;br /&gt;
 [B&amp;lt;-aria128&amp;gt;]&lt;br /&gt;
 [B&amp;lt;-aria192&amp;gt;]&lt;br /&gt;
 [B&amp;lt;-aria256&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
and updating the brief description line:&lt;br /&gt;
&lt;br /&gt;
 =item B&amp;lt;-aes128|-aes192|-aes256|-aria128|-aria192|-aria256|-camellia128|- camellia192|-camellia256|-des|-des3|-idea&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The doc/man1/pkcs12.pod requires that the new ciphers are added to the command line options:&lt;br /&gt;
&lt;br /&gt;
 [B&amp;lt;-des | -des3 | -idea | -aes128 | -aes192 | -aes256 | -aria128 | -aria192 | -aria256 | -camellia128 | -camellia192 | -camellia256 | -nodes&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
and a description is added in the body of the text:&lt;br /&gt;
&lt;br /&gt;
 =item B&amp;lt;-aria128&amp;gt;, B&amp;lt;-aria192&amp;gt;, B&amp;lt;-aria256&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 use ARIA to encrypt private keys before outputting.&lt;br /&gt;
&lt;br /&gt;
The doc/man1/ciphers.pod file requires a section describing the new cipher:&lt;br /&gt;
&lt;br /&gt;
 =item B&amp;lt;ARIA128&amp;gt;, B&amp;lt;ARIA256&amp;gt;, B&amp;lt;ARIA&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 cipher suites using 128 bit ARIA, 256 bit ARIA or either 128 or 256 bit ARIA.&lt;br /&gt;
&lt;br /&gt;
And an update to the cipher suites that are supported:&lt;br /&gt;
&lt;br /&gt;
 =head2 ARIA cipher suites from RFC6209, extending TLS v1.2&lt;br /&gt;
 &lt;br /&gt;
 TLS_RSA_WITH_ARIA_128_CBC_SHA256          ARIA128-CBC-SHA256&lt;br /&gt;
 TLS_RSA_WITH_ARIA_256_CBC_SHA384          ARIA256-CBC-SHA384&lt;br /&gt;
 TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256      DHE-DSS-ARIA128-CBC-SHA256&lt;br /&gt;
 TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384      DHE-DSS-ARIA256-CBC-SHA384&lt;br /&gt;
 TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256      DHE-RSA-ARIA128-CBC-SHA256&lt;br /&gt;
 TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384      DHE-RSA-ARIA256-CBC-SHA384&lt;br /&gt;
 TLS_DH_anon_WITH_ARIA_128_CBC_SHA256      DH-anon-ARIA128-CBC-SHA256&lt;br /&gt;
 TLS_DH_anon_WITH_ARIA_256_CBC_SHA384      DH-anon-ARIA256-CBC-SHA384&lt;br /&gt;
 TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256  ECDHE-ECDSA-ARIA128-CBC-SHA256&lt;br /&gt;
 TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384  ECDHE-ECDSA-ARIA256-CBC-SHA384&lt;br /&gt;
 TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256    ECDHE-RSA-ARIA128-CBC-SHA256&lt;br /&gt;
 TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384    ECDHE-RSA-ARIA256-CBC-SHA384&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
There are a number of commands to build and test everything. Note the enable-aria to include it in the building of OpenSSL:&lt;br /&gt;
&lt;br /&gt;
 ./config enable-aria &amp;amp;&amp;amp;&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make update &amp;amp;&amp;amp;&lt;br /&gt;
 make test &amp;amp;&amp;amp;&lt;br /&gt;
 LD_LIBRARY_PATH=. apps/openssl speed aria&lt;br /&gt;
&lt;br /&gt;
Also try a build with aria disabled:&lt;br /&gt;
&lt;br /&gt;
 ./config no-aria &amp;amp;&amp;amp;&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make test &amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
Both sequences should work and the tests should all pass.&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Diffie_Hellman&amp;diff=3126</id>
		<title>Diffie Hellman</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Diffie_Hellman&amp;diff=3126"/>
		<updated>2020-10-09T03:42:37Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Diffie-Hellman Standards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Diffie-Hellman algorithm provides the capability for two communicating parties to agree upon a shared secret between them. Its an agreement scheme because both parties add material used to derive the key (as opposed to transport, where one party selects the key). The shared secret can then be used as the basis for some encryption key to be used for further communication.&lt;br /&gt;
&lt;br /&gt;
If Alice and Bob wish to communicate with each other, they first agree between them a large prime number p, and a generator (or base) g (where 0 &amp;lt; g &amp;lt; p).&lt;br /&gt;
&lt;br /&gt;
Alice chooses a secret integer a (her private key) and then calculates g&amp;lt;sup&amp;gt;a&amp;lt;/sup&amp;gt; mod p (which is her public key).&lt;br /&gt;
Bob chooses his private key b, and calculates his public key in the same way.&lt;br /&gt;
&lt;br /&gt;
Alice and Bob then send each other their public keys. Alice now knows a and Bob's public key g&amp;lt;sup&amp;gt;b&amp;lt;/sup&amp;gt; mod p. She is not able to calculate the value b from Bob's public key as this is a hard mathematical problem (known as the discrete logarithm problem). She can however calculate (g&amp;lt;sup&amp;gt;b&amp;lt;/sup&amp;gt;)&amp;lt;sup&amp;gt;a&amp;lt;/sup&amp;gt; mod p = g&amp;lt;sup&amp;gt;ab&amp;lt;/sup&amp;gt; mod p.&lt;br /&gt;
&lt;br /&gt;
Bob knows b and g&amp;lt;sup&amp;gt;a&amp;lt;/sup&amp;gt;, so he can calculate (g&amp;lt;sup&amp;gt;a&amp;lt;/sup&amp;gt;)&amp;lt;sup&amp;gt;b&amp;lt;/sup&amp;gt; mod p = g&amp;lt;sup&amp;gt;ab&amp;lt;/sup&amp;gt; mod p. Therefore both Alice and Bob know a shared secret g&amp;lt;sup&amp;gt;ab&amp;lt;/sup&amp;gt; mod p. Eve who was listening in on the communication knows p, g, Alice's public key (g&amp;lt;sup&amp;gt;a&amp;lt;/sup&amp;gt; mod p) and Bob's public key (g&amp;lt;sup&amp;gt;b&amp;lt;/sup&amp;gt; mod p). She is unable to calculate the shared secret from these values.&lt;br /&gt;
&lt;br /&gt;
In static-static mode both Alice and Bob retain their private/public keys over multiple communications. Therefore the resulting shared secret will be the same every time. In ephemeral-static mode one party will generate a new private/public key every time, thus a new shared secret will be generated.&lt;br /&gt;
&lt;br /&gt;
==Diffie-Hellman Standards==&lt;br /&gt;
&lt;br /&gt;
There are a number of standards relevant to Diffie-Hellman key agreement. Some of the key ones are:&lt;br /&gt;
&lt;br /&gt;
* [ftp://ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-3.asc PKCS 3] defines the basic algorithm and  data formats to be used.&lt;br /&gt;
* ANSI X9.42 is a later standard than PKCS 3 and provides further guidance on its use (note OpenSSL does not support ANSI X9.42 in the released versions - support is available in the as yet unreleased 1.0.2 and 1.1.0)&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc2631.txt RFC 2631] summarizes the key points of ANSI X9.42&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc5114.txt RFC 5114] defines 3 standard sets of parameters for use with Diffie-Hellman (OpenSSL will have built-in support for these parameters from OpenSSL 1.0.2 - not yet released) &lt;br /&gt;
* [http://csrc.nist.gov/publications/nistpubs/800-56A/SP800-56A_Revision1_Mar08-2007.pdf NIST SP 800-56A] is a NIST publication that provides recommendations on the implementation of X9.42&lt;br /&gt;
&lt;br /&gt;
==Diffie-Hellman in SSL/TLS==&lt;br /&gt;
&lt;br /&gt;
There are three versions of Diffie-Hellman used in SSL/TLS.&lt;br /&gt;
&lt;br /&gt;
* Anonymous Diffie-Hellman&lt;br /&gt;
* Fixed Diffie-Hellman&lt;br /&gt;
* Ephemeral Diffie-Hellman&lt;br /&gt;
&lt;br /&gt;
'''Anonymous Diffie-Hellman''' uses Diffie-Hellman, but without authentication. Because the keys used in the exchange are not authenticated, the protocol is susceptible to Man-in-the-Middle attacks. Note: if you use this scheme, a call to &amp;lt;tt&amp;gt;SSL_get_peer_certificate&amp;lt;/tt&amp;gt; will return &amp;lt;tt&amp;gt;NULL&amp;lt;/tt&amp;gt; because you have selected an anonymous protocol. This is the only time &amp;lt;tt&amp;gt;SSL_get_peer_certificate&amp;lt;/tt&amp;gt; is allowed to return &amp;lt;tt&amp;gt;NULL&amp;lt;/tt&amp;gt; under normal circumstances.&lt;br /&gt;
&lt;br /&gt;
You should not use Anonymous Diffie-Hellman. You can prohibit its use in your code by using &amp;lt;tt&amp;gt;&amp;quot;!ADH&amp;quot;&amp;lt;/tt&amp;gt; in your call to &amp;lt;tt&amp;gt;SSL_set_cipher_list&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Fixed Diffie-Hellman''' embeds the server's public parameter in the certificate, and the CA then signs the certificate. That is, the certificate contains the Diffie-Hellman public-key parameters, and those parameters never change.&lt;br /&gt;
&lt;br /&gt;
'''Ephemeral Diffie-Hellman''' uses temporary, public keys. Each instance or run of the protocol uses a different public key. The authenticity of the server's temporary key can be verified by checking the signature on the key. Because the public keys are temporary, a compromise of the server's long term signing key ''does not'' jeopardize the privacy of past sessions. This is known as ''Perfect Forward Secrecy (PFS)''.&lt;br /&gt;
&lt;br /&gt;
You should always use Ephemeral Diffie-Hellman because it provides PFS. You can specify ephemeral methods by providing &amp;lt;tt&amp;gt;&amp;quot;kEECDH:kEDH&amp;quot;&amp;lt;/tt&amp;gt; in your call to &amp;lt;tt&amp;gt;SSL_set_cipher_list&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Working with Parameters and Generating Keys==&lt;br /&gt;
&lt;br /&gt;
The first step with the Diffie-Hellman algorithm is to ensure that both parties are using the same set of parameters (i.e. the same values for p and g). Since parameter generation can be an expensive process this is normally done once in advance and then the same set of parameters are used over many key exchanges. A new set of parameters can be generated by OpenSSL, or alternatively there is support for built-in standard sets of parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Use built-in parameters */&lt;br /&gt;
if(NULL == (params = EVP_PKEY_new())) handleErrors();&lt;br /&gt;
if(1 != EVP_PKEY_set1_DH(params,DH_get_2048_256())) handleErrors();&lt;br /&gt;
&lt;br /&gt;
/* Create context for the key generation */&lt;br /&gt;
if(!(kctx = EVP_PKEY_CTX_new(params, NULL))) handleErrors();&lt;br /&gt;
&lt;br /&gt;
/* Generate a new key */&lt;br /&gt;
if(1 != EVP_PKEY_keygen_init(kctx)) handleErrors();&lt;br /&gt;
if(1 != EVP_PKEY_keygen(kctx, &amp;amp;dhkey)) handleErrors();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To generate your own parameters refer to [[EVP Key and Parameter Generation]].&lt;br /&gt;
&lt;br /&gt;
Note: The function &amp;lt;code&amp;gt;DH_get_2048_256&amp;lt;/code&amp;gt; is scheduled for release in OpenSSL 1.0.2; it is not available in 1.0.1e or earlier.&lt;br /&gt;
&lt;br /&gt;
==Generating a Shared Secret==&lt;br /&gt;
&lt;br /&gt;
Having obtained a private/public key pair you need to also obtain the public key of the other communicating party. Refer to [[EVP Key Agreement]] for information on how to agree a shared secret.&lt;br /&gt;
&lt;br /&gt;
==Using the Low Level APIs==&lt;br /&gt;
&lt;br /&gt;
Users of the OpenSSL library are expected to normally use the EVP method for working with Diffie Hellman as described above and on the [[EVP Key Agreement]] page. The EVP api is implemented by a lower level Diffie Hellman API. In some circumstances, expert users may need to use the low level api. '''This is not recommended for most users'''. However, if you need to use this then an example of use is shown below. The manual page for the low level API is available here: [[Manual:dh(3)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;DH *privkey;&lt;br /&gt;
int codes;&lt;br /&gt;
int secret_size;&lt;br /&gt;
&lt;br /&gt;
/* Generate the parameters to be used */&lt;br /&gt;
if(NULL == (privkey = DH_new())) handleErrors();&lt;br /&gt;
if(1 != DH_generate_parameters_ex(privkey, 2048, DH_GENERATOR_2, NULL)) handleErrors();&lt;br /&gt;
&lt;br /&gt;
if(1 != DH_check(privkey, &amp;amp;codes)) handleErrors();&lt;br /&gt;
if(codes != 0)&lt;br /&gt;
{&lt;br /&gt;
    /* Problems have been found with the generated parameters */&lt;br /&gt;
    /* Handle these here - we'll just abort for this example */&lt;br /&gt;
    printf(&amp;quot;DH_check failed\n&amp;quot;);&lt;br /&gt;
    abort();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Generate the public and private key pair */&lt;br /&gt;
if(1 != DH_generate_key(privkey)) handleErrors();&lt;br /&gt;
&lt;br /&gt;
/* Send the public key to the peer.&lt;br /&gt;
 * How this occurs will be specific to your situation (see main text below) */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Receive the public key from the peer. In this example we're just hard coding a value */&lt;br /&gt;
BIGNUM *pubkey = NULL;&lt;br /&gt;
if(0 == (BN_dec2bn(&amp;amp;pubkey, &amp;quot;01234567890123456789012345678901234567890123456789&amp;quot;))) handleErrors();&lt;br /&gt;
&lt;br /&gt;
/* Compute the shared secret */&lt;br /&gt;
unsigned char *secret;&lt;br /&gt;
if(NULL == (secret = OPENSSL_malloc(sizeof(unsigned char) * (DH_size(privkey))))) handleErrors();&lt;br /&gt;
&lt;br /&gt;
if(0 &amp;gt; (secret_size = DH_compute_key(secret, pubkey, privkey))) handleErrors();&lt;br /&gt;
&lt;br /&gt;
/* Do something with the shared secret */&lt;br /&gt;
/* Note secret_size may be less than DH_size(privkey) */&lt;br /&gt;
printf(&amp;quot;The shared secret is:\n&amp;quot;);&lt;br /&gt;
BIO_dump_fp(stdout, secret, secret_size);&lt;br /&gt;
&lt;br /&gt;
/* Clean up */&lt;br /&gt;
OPENSSL_free(secret);&lt;br /&gt;
BN_free(pubkey);&lt;br /&gt;
DH_free(privkey);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are (currently) no DH_ level routines to read and write&lt;br /&gt;
a public OR private key, but the generic PUBKEY and&lt;br /&gt;
PrivateKey routines do so as an X.509 SubjectPublickKeyInfo structure (aka SPKI or PKCS#8). This includes the parameters plus the public key (and the private key for the PrivateKey routines) (see [[Manual:Pem(3)]]).&lt;br /&gt;
&lt;br /&gt;
There are three possible cases:&lt;br /&gt;
* ephemeral parameters: A must send new parameters AND the public key to the peer (B), who needs to send back only their public key (although it may be convenient to embed it in an SPKI structure)&lt;br /&gt;
* static but undistributed parameters: effectively the same&lt;br /&gt;
* pre-distributed parameters: A only needs to send their public key, but may embed in an SPKI structure; B doesn't need to wait for A to get parameters but may wait anyway, and only needs to send B's public key but may embed it in an SPKI structure.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[EVP Key Agreement]]&lt;br /&gt;
* [[Elliptic Curve Diffie Hellman]]&lt;br /&gt;
* [[EVP]]&lt;br /&gt;
* [[Libcrypto API]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Algorithm]]&lt;br /&gt;
[[Category:C level]]&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Public Key Algorithm]]&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3070</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=3070"/>
		<updated>2020-05-05T03:38:39Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Installation and Compilation of OpenSSL 3.0 */&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 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.&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>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3069</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=3069"/>
		<updated>2020-05-05T03:37:56Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Installation and Compilation of OpenSSL 3.0 */&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:&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 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.&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>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=3068</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=3068"/>
		<updated>2020-05-05T03:33:51Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Installation and Compilation of OpenSSL 3.0 */&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:&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 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.&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>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2999</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=2999"/>
		<updated>2020-04-22T08:48:11Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Known issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
* OSSL_STORE currently has no provider support&lt;br /&gt;
&lt;br /&gt;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_Digest{Sign,Verify}Init() does not handle no default digest (see [https://github.com/openssl/openssl/pull/11571 github #11571] and [https://github.com/openssl/openssl/pull/11576 github #11576])&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;
=== 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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || 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-128                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 90%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2998</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=2998"/>
		<updated>2020-04-22T08:41:57Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_Digest{Sign,Verify}Init() does not handle no default digest (see [https://github.com/openssl/openssl/pull/11571 github #11571] and [https://github.com/openssl/openssl/pull/11576 github #11576])&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;
=== 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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || 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-128                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 90%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2997</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=2997"/>
		<updated>2020-04-22T08:41:29Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP_Digest{Sign,Verify}Init() does not handle no default digest (see [https://github.com/openssl/openssl/pull/11571 github #11571] and [https://github.com/openssl/openssl/pull/11576 github #11576])&lt;br /&gt;
&lt;br /&gt;
* EVP_set_default_properties() does not work (see [https://github.com/openssl/openssl/issues/11594])&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || 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-128                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 90%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2996</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=2996"/>
		<updated>2020-04-22T08:32:32Z</updated>

		<summary type="html">&lt;p&gt;Levitte: Give us heading numbering!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NUMBEREDHEADINGS__ &amp;lt;!-- https://www.mediawiki.org/wiki/Extension:NumberedHeadings --&amp;gt;&lt;br /&gt;
THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP: EVP_Digest{Sign,Verify}Init() does not handle no default digest (see [https://github.com/openssl/openssl/pull/11571 github #11571] and [https://github.com/openssl/openssl/pull/11576 github #11576])&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || 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-128                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 90%                || 100%                        || There are hacks in place that downgrade a key to legacy in some situations&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2992</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=2992"/>
		<updated>2020-04-22T07:47:51Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Known issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
==== Programming ====&lt;br /&gt;
&lt;br /&gt;
* EVP: EVP_Digest{Sign,Verify}Init() does not handle no default digest (see [https://github.com/openssl/openssl/pull/11571 github #11571] and [https://github.com/openssl/openssl/pull/11576 github #11576])&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2989</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=2989"/>
		<updated>2020-04-22T07:40:10Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Platforms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
* 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;
=== 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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2988</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=2988"/>
		<updated>2020-04-22T07:39:35Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Known issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
* 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;
=== 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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2987</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=2987"/>
		<updated>2020-04-22T07:38:45Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Known issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
* Doesn't build and test on all platforms on our watch list.  See [[#Platforms]]&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;
=== 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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2986</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=2986"/>
		<updated>2020-04-22T07:37:41Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Known issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
* Doesn't build and test on all platforms on our watch list.  See [[Platforms]]&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;
=== 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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2985</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=2985"/>
		<updated>2020-04-22T07:37:02Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Known issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
* Doesn't build and test on all platforms on our watch list.  See [[Platforms]]&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;
=== 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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2984</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=2984"/>
		<updated>2020-04-22T07:10:42Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Serializers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2983</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=2983"/>
		<updated>2020-04-22T07:10:20Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Serializers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
===== Serializers =====&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2982</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=2982"/>
		<updated>2020-04-22T07:09:19Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Serializers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
| 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;
===== Serializers =====&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2979</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=2979"/>
		<updated>2020-04-22T06:58:18Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented OSSL_STORE URI schemes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
TO BE ADDED&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;
| BLAKE2BMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| BLAKE2SMAC                                  || default  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| CMAC                                  || default, FIPS  || 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-128                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&lt;br /&gt;
|-&lt;br /&gt;
| KMAC-256                                  || default, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 100%               || ?? || Not scheduled for FIPS validation&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, FIPS  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2976</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=2976"/>
		<updated>2020-04-22T06:51:36Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented OSSL_STORE URI schemes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
TO BE ADDED&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;
&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, FIPS  || 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, FIPS  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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 dedserializers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2975</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=2975"/>
		<updated>2020-04-22T06:51:05Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented OSSL_STORE URI schemes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
TO BE ADDED&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;
&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, FIPS  || 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, FIPS  || 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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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%                 || ??                          || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2972</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=2972"/>
		<updated>2020-04-22T06:49:26Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* STATUS of current development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, 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;
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 approved algorithms match against the property query &amp;quot;fips=yes&amp;quot;. The FIPS module also has some non-approved algorithms contained within it (currently X25519, X448, Ed25519 and Ed448). These algorithms do not have the &amp;quot;fips=yes&amp;quot; property defined for them. 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;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&lt;br /&gt;
&lt;br /&gt;
=== Using the FIPS module in SSL/TLS ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&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;
TO BE ADDED&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   ||  Mostly&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 FIPS, only SHAKE-256, not SHAKE-128. SHAKE-256 will not be undergoing FIPS validation.&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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ?? || These cannot yet be FIPS 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, RSAES-OAEP                      || default, FIPS  || 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%               || ?? || These cannot yet be FIPS validated.&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%               || ?? || These cannot yet be FIPS validated.&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2960</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=2960"/>
		<updated>2020-04-21T12:15:17Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Platforms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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   ||  Mostly&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2959</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=2959"/>
		<updated>2020-04-21T12:14:54Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Platforms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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     !! Comments&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   ||  Mostly&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2958</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=2958"/>
		<updated>2020-04-21T06:48:26Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented asymmetric key types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2957</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=2957"/>
		<updated>2020-04-21T06:46:14Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented key exchange */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2956</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=2956"/>
		<updated>2020-04-21T06:45:16Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implementation support in other OpenSSL APIs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2955</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=2955"/>
		<updated>2020-04-21T06:44:34Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implementation support in other OpenSSL APIs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| 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                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&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;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2954</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=2954"/>
		<updated>2020-04-21T06:43:23Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implementation support in other OpenSSL APIs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| PKCS#7                               || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2953</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=2953"/>
		<updated>2020-04-21T06:41:24Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented digests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2952</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=2952"/>
		<updated>2020-04-21T06:40:43Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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;
TO BE ADDED&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 FIPS, only SHAKE-256, 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2951</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=2951"/>
		<updated>2020-04-21T06:23:31Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented serializers / deserializers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 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;
| 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&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;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2950</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=2950"/>
		<updated>2020-04-21T06:23:17Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Serializers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 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;
| 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
===== Serializers =====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED &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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2949</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=2949"/>
		<updated>2020-04-21T04:51:07Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 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;
| 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;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&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;    || ??&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;
&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, RSAES-OAEP                      || default, FIPS  || 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%               || ??&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  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| ECDH                                 || default, FIPS  || 100%               || ??&lt;br /&gt;
|-&lt;br /&gt;
| X25519, X448                         || default, FIPS  || 100%               || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;
&lt;br /&gt;
===== Serializers =====&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;
TO BE ADDED&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;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2948</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=2948"/>
		<updated>2020-04-21T04:33:49Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 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;
| 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;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&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;    || ??&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;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2947</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=2947"/>
		<updated>2020-04-21T04:18:22Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Provider implemented digests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! 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;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=OpenSSL_3.0&amp;diff=2946</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=2946"/>
		<updated>2020-04-20T21:00:32Z</updated>

		<summary type="html">&lt;p&gt;Levitte: Start on a STATUS section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS A WORK IN PROGRESS&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;
== 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;
=== 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\fips.dll' on Windows. (Drafting note: need to check the locations are correct!)&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;
&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 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. 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 maybe 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. It can be useful in some situations where you want to avoid the automatic loading of the default provider.&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;
        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;
    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;
    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;
&lt;br /&gt;
DISCUSSION HERE ABOUT DEFAULT PROPERTY QUERIES AND HOW TO CONFIGURE THEM&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.&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, etc)&lt;br /&gt;
&lt;br /&gt;
=== Loading the FIPS module at the same time as other providers ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT PROPERTY QUERIES&lt;br /&gt;
&lt;br /&gt;
=== Programmatically loading the FIPS module (non-default library context) ===&lt;br /&gt;
&lt;br /&gt;
DISCUSSION HERE ABOUT USING OPENSSL_CTX ETC&lt;br /&gt;
&lt;br /&gt;
=== Using Serializers with the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE&lt;br /&gt;
&lt;br /&gt;
=== Non-approved alogrithms available in the FIPS module ===&lt;br /&gt;
&lt;br /&gt;
STUFF HERE (X25519, X448, ED25519, ED448)&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;
=== 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&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 x86 / x86_64                 ||  Yes   ||  Yes&lt;br /&gt;
|-&lt;br /&gt;
| MacOS X                              ||  Yes   ||  Mostly&lt;br /&gt;
|-&lt;br /&gt;
| OpenVMS Alpha / Itanium              ||  No    ||  Unknown&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 digests ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operation type                       !! 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%               || ??&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;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented MACs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented KDFs ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric key types ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented asymmetric ciphers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented signature ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented key exchange ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented serializers / deserializers ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
==== Provider implemented OSSL_STORE URI schemes ====&lt;br /&gt;
&lt;br /&gt;
TO BE ADDED&lt;br /&gt;
&lt;br /&gt;
=== 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;
| CMS                                  || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| CMP                                  || ??                 || ??&lt;br /&gt;
|-&lt;br /&gt;
| CRMF                                 || 5%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| OSSL_STORE                           || 0%                 || 0%&lt;br /&gt;
|-&lt;br /&gt;
| SSL / TLS                            || 50%                || ??&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Configuration_%22packages%22&amp;diff=2908</id>
		<title>Configuration &quot;packages&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Configuration_%22packages%22&amp;diff=2908"/>
		<updated>2020-04-07T04:00:13Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Files to add */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you're missing a configuration for you platform, you may find a &amp;quot;package&amp;quot; here, which may be drop in files just as well as suggestions on what to change in the OpenSSL source to accommodate it.&lt;br /&gt;
&lt;br /&gt;
== z/OS [OpenSSL 1.1.1] ==&lt;br /&gt;
&lt;br /&gt;
OpenSSL 1.1.1 isn't supported on z/OS.&lt;br /&gt;
&lt;br /&gt;
However, if you want to build OpenSSL on z/OS anyway, here are a few hints on how to do that. Though these hints are intended to be helpful, they might not work for you at all, depending on your build environment.&lt;br /&gt;
&lt;br /&gt;
=== Files to add ===&lt;br /&gt;
&lt;br /&gt;
These files can be added in the OpenSSL source tree, in &amp;lt;tt&amp;gt;Configurations/&amp;lt;/tt&amp;gt; or in a separate directory.  In the latter case, set the environment variable &amp;lt;tt&amp;gt;OPENSSL_LOCAL_CONFIG_DIR&amp;lt;/tt&amp;gt; to that directory's name to tell OpenSSL's Configure where they are.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;00-base-zos.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 # Feel free to experiment by uncommenting&lt;br /&gt;
 zos_asm =&amp;gt; {&lt;br /&gt;
     template             =&amp;gt; 1,&lt;br /&gt;
     # cpuid_asm_src      =&amp;gt; &amp;quot;s390xcap.c # s390xcpuid.s&amp;quot;,&lt;br /&gt;
     bn_asm_src           =&amp;gt; &amp;quot;bn_asm.c&amp;quot;, # s390x-gf2m.s&lt;br /&gt;
     # ec_asm_src         =&amp;gt; &amp;quot;ecp_s390x_nistp.c&amp;quot;,&lt;br /&gt;
     # aes_asm_src        =&amp;gt; &amp;quot;aes-s390x.s aes-ctr.fake aes-xts.fake&amp;quot;,&lt;br /&gt;
     # sha1_asm_src       =&amp;gt; &amp;quot;sha1-s390x.s sha256-s390x.s sha512-s390x.s&amp;quot;,&lt;br /&gt;
     # rc4_asm_src        =&amp;gt; &amp;quot;rc4-s390x.s&amp;quot;,&lt;br /&gt;
     # modes_asm_src      =&amp;gt; &amp;quot;ghash-s390x.s&amp;quot;,&lt;br /&gt;
     # chacha_asm_src     =&amp;gt; &amp;quot;chacha-s390x.s&amp;quot;,&lt;br /&gt;
     # poly1305_asm_src   =&amp;gt; &amp;quot;poly1305-s390x.s&amp;quot;,&lt;br /&gt;
     # keccak1600_asm_src =&amp;gt; &amp;quot;keccak1600-s390x.s&amp;quot;,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;zos-unix.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &amp;quot;OS390-Unix&amp;quot; =&amp;gt; {&lt;br /&gt;
     inherit_from     =&amp;gt; [ &amp;quot;BASE_unix&amp;quot;, asm(&amp;quot;zos_asm&amp;quot;) ],&lt;br /&gt;
     cc               =&amp;gt; &amp;quot;/PATH/TO/c99.sh&amp;quot;,&lt;br /&gt;
     cflags           =&amp;gt; &amp;quot;-O -Wc,dll,XPLINK,exportall,hgpr,lp64 -Wa,'GOFF,SYSPARM(USE_XPLINK)' -qlongname -qlanglvl=extc99 -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE -D_OPEN_THREADS=2 -D_POSIX_SOURCE  -D_OPEN_MSGQ_EXT&amp;quot;,&lt;br /&gt;
     module_ldflags   =&amp;gt; &amp;quot;-Wl,XPLINK,LP64&amp;quot;,&lt;br /&gt;
     shared_ldflags   =&amp;gt; &amp;quot;-Wl,dll,XPLINK,LP64&amp;quot;,&lt;br /&gt;
     bn_ops           =&amp;gt; &amp;quot;THIRTY_TWO_BIT RC4_CHAR&amp;quot;,&lt;br /&gt;
     thread_scheme    =&amp;gt; &amp;quot;(unknown)&amp;quot;,&lt;br /&gt;
     perlasm_scheme   =&amp;gt; &amp;quot;zOS64&amp;quot;,&lt;br /&gt;
 },&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/PATH/TO/c99.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
 #!/bin/sh -k&lt;br /&gt;
 #&lt;br /&gt;
 # Re-order arguments so that -L comes first.&lt;br /&gt;
 #&lt;br /&gt;
 opts=&amp;quot;&amp;quot;&lt;br /&gt;
 lopts=&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 for arg in $* ; do&lt;br /&gt;
   case $arg in&lt;br /&gt;
     -L*) lopts=&amp;quot;$lopts $arg&amp;quot; ;;&lt;br /&gt;
     *) opts=&amp;quot;$opts $arg&amp;quot; ;;&lt;br /&gt;
   esac&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 c99 -Wl,dll $lopts $opts&lt;br /&gt;
&lt;br /&gt;
Note that if you add &amp;lt;tt&amp;gt;c99.sh&amp;lt;/tt&amp;gt; in OpenSSL's &amp;lt;tt&amp;gt;util/&amp;lt;/tt&amp;gt; directory, you can set the following in &amp;lt;tt&amp;gt;zos-unix.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
     cc               =&amp;gt; &amp;quot;\$(SRCDIR)/util/c99.sh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
=== Building OpenSSL 1.1.1 ===&lt;br /&gt;
&lt;br /&gt;
(with xplink linkage, 64 bit, from EBCDIC sources)&lt;br /&gt;
&lt;br /&gt;
# get a working EBCDIC perl version.&lt;br /&gt;
# gunzip the .tar file.&lt;br /&gt;
# use pax to extract from .tar. Example: &amp;lt;tt&amp;gt;pax -ofrom=ISO8859-1,to=IBM-1047 -rvf openssl-1.1.1e.tar&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Configure: &amp;lt;tt&amp;gt;./Configure OS390-Unix&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Build: &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Configuration_%22packages%22&amp;diff=2907</id>
		<title>Configuration &quot;packages&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Configuration_%22packages%22&amp;diff=2907"/>
		<updated>2020-04-06T12:59:26Z</updated>

		<summary type="html">&lt;p&gt;Levitte: First attempt at a Configuration &amp;quot;package&amp;quot;, inspired by https://github.com/openssl/openssl/pull/11262&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you're missing a configuration for you platform, you may find a &amp;quot;package&amp;quot; here, which may be drop in files just as well as suggestions on what to change in the OpenSSL source to accommodate it.&lt;br /&gt;
&lt;br /&gt;
== z/OS [OpenSSL 1.1.1] ==&lt;br /&gt;
&lt;br /&gt;
OpenSSL 1.1.1 isn't supported on z/OS.&lt;br /&gt;
&lt;br /&gt;
However, if you want to build OpenSSL on z/OS anyway, here are a few hints on how to do that. Though these hints are intended to be helpful, they might not work for you at all, depending on your build environment.&lt;br /&gt;
&lt;br /&gt;
=== Files to add ===&lt;br /&gt;
&lt;br /&gt;
These files can be added in the OpenSSL source tree, in &amp;lt;tt&amp;gt;Configurations/&amp;lt;/tt&amp;gt; or in a separate directory.  In the latter case, set the environment variable &amp;lt;tt&amp;gt;OPENSSL_LOCAL_CONFIG_DIR&amp;lt;/tt&amp;gt; to that directory's name to tell OpenSSL's Configure where they are.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;00-base-zos.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 # Feel free to experiment by uncommenting&lt;br /&gt;
 zos_asm =&amp;gt; {&lt;br /&gt;
     template             =&amp;gt; 1,&lt;br /&gt;
     # cpuid_asm_src      =&amp;gt; &amp;quot;s390xcap.c # s390xcpuid.s&amp;quot;,&lt;br /&gt;
     bn_asm_src           =&amp;gt; &amp;quot;bn_asm.c&amp;quot;, # s390x-gf2m.s&lt;br /&gt;
     # ec_asm_src         =&amp;gt; &amp;quot;ecp_s390x_nistp.c&amp;quot;,&lt;br /&gt;
     # aes_asm_src        =&amp;gt; &amp;quot;aes-s390x.s aes-ctr.fake aes-xts.fake&amp;quot;,&lt;br /&gt;
     # sha1_asm_src       =&amp;gt; &amp;quot;sha1-s390x.s sha256-s390x.s sha512-s390x.s&amp;quot;,&lt;br /&gt;
     # rc4_asm_src        =&amp;gt; &amp;quot;rc4-s390x.s&amp;quot;,&lt;br /&gt;
     # modes_asm_src      =&amp;gt; &amp;quot;ghash-s390x.s&amp;quot;,&lt;br /&gt;
     # chacha_asm_src     =&amp;gt; &amp;quot;chacha-s390x.s&amp;quot;,&lt;br /&gt;
     # poly1305_asm_src   =&amp;gt; &amp;quot;poly1305-s390x.s&amp;quot;,&lt;br /&gt;
     # keccak1600_asm_src =&amp;gt; &amp;quot;keccak1600-s390x.s&amp;quot;,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;zos-unix.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &amp;quot;OS390-Unix&amp;quot; =&amp;gt; {&lt;br /&gt;
     inherit_from     =&amp;gt; [ &amp;quot;BASE_unix&amp;quot;, asm(&amp;quot;zos_asm&amp;quot;) ],&lt;br /&gt;
     cc               =&amp;gt; &amp;quot;/PATH/TO/c99.sh&amp;quot;,&lt;br /&gt;
     cflags           =&amp;gt; &amp;quot;-O -Wc,dll,XPLINK,exportall,hgpr,lp64 -Wa,'GOFF,SYSPARM(USE_XPLINK)' -qlongname -qlanglvl=extc99 -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE -D_OPEN_THREADS=2 -D_POSIX_SOURCE  -D_OPEN_MSGQ_EXT&amp;quot;,&lt;br /&gt;
     module_ldflags   =&amp;gt; &amp;quot;-Wl,XPLINK,LP64&amp;quot;,&lt;br /&gt;
     shared_ldflags   =&amp;gt; &amp;quot;-Wl,dll,XPLINK,LP64&amp;quot;,&lt;br /&gt;
     bn_ops           =&amp;gt; &amp;quot;THIRTY_TWO_BIT RC4_CHAR&amp;quot;,&lt;br /&gt;
     thread_scheme    =&amp;gt; &amp;quot;(unknown)&amp;quot;,&lt;br /&gt;
     perlasm_scheme   =&amp;gt; &amp;quot;zOS64&amp;quot;,&lt;br /&gt;
 },&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/PATH/TO/c99.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
 #!/bin/sh -k&lt;br /&gt;
 #&lt;br /&gt;
 # Re-order arguments so that -L comes first.&lt;br /&gt;
 #&lt;br /&gt;
 opts=&amp;quot;&amp;quot;&lt;br /&gt;
 lopts=&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 for arg in $* ; do&lt;br /&gt;
   case $arg in&lt;br /&gt;
     -L*) lopts=&amp;quot;$lopts $arg&amp;quot; ;;&lt;br /&gt;
     *) opts=&amp;quot;$opts $arg&amp;quot; ;;&lt;br /&gt;
   esac&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 c99 -Wl,dll $lopts $opts&lt;br /&gt;
&lt;br /&gt;
Note that if you add &amp;lt;tt&amp;gt;c99.sh&amp;lt;/tt&amp;gt; in OpenSSL's &amp;lt;tt&amp;gt;util/&amp;lt;/tt&amp;gt; directory, you can set the following in &amp;lt;tt&amp;gt;zoss-unix.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
     cc               =&amp;gt; &amp;quot;\$(SRCDIR)/util/c99.sh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
=== Building OpenSSL 1.1.1 ===&lt;br /&gt;
&lt;br /&gt;
(with xplink linkage, 64 bit, from EBCDIC sources)&lt;br /&gt;
&lt;br /&gt;
# get a working EBCDIC perl version.&lt;br /&gt;
# gunzip the .tar file.&lt;br /&gt;
# use pax to extract from .tar. Example: &amp;lt;tt&amp;gt;pax -ofrom=ISO8859-1,to=IBM-1047 -rvf openssl-1.1.1e.tar&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Configure: &amp;lt;tt&amp;gt;./Configure OS390-Unix&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Build: &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=2906</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=2906"/>
		<updated>2020-04-06T12:32:28Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* OpenSSL Quick Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the OpenSSL wiki.  The main site is https://www.openssl.org . If this is your first visit or to get an account please see the [[Welcome]] page. Your participation and [[Contributions]] are valued.&lt;br /&gt;
&lt;br /&gt;
This wiki is intended as a place for collecting, organizing, and refining useful information about OpenSSL that is currently strewn among multiple locations and formats.&lt;br /&gt;
&lt;br /&gt;
== OpenSSL Quick Links ==&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;TABLE border=0&amp;gt;&lt;br /&gt;
     &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[OpenSSL Overview]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Compilation and Installation]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Configuration &amp;quot;packages&amp;quot;]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Internals]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[libcrypto API]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[libssl API]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Examples]] &amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Documentation Index|Index of all API functions]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[License]] &amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Command Line Utilities]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Related Links]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Binaries]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[SSL and TLS Protocols]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[1.1 API Changes]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[FIPS modules]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[TLS1.3]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Mailing Lists]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
  &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Administrivia ==&lt;br /&gt;
Site guidelines, legal and admininstrative issues.&lt;br /&gt;
:* [[Basic rules]], [[Commercial Product Disclaimer]], [[Contributions]], [[Copyright]], [[License]]&lt;br /&gt;
:* Using This Wiki&lt;br /&gt;
:: [http://meta.wikimedia.org/wiki/Help:Contents Wiki User's Guide], [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list], [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ], [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki Mailing List]&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
This section contains the automagically generated man pages from the OpenSSL git repository, and similar &amp;quot;man&amp;quot; style reference documentation. The man pages are automatically imported from the OpenSSL git repository and local wiki modifications are submitted as patches.&lt;br /&gt;
:* [https://www.openssl.org/docs/manpages.html OpenSSL Manual Pages]&lt;br /&gt;
:* [[API]], [[Libcrypto API]], [[Libssl API]]&lt;br /&gt;
:* [[FIPS mode()]], [[FIPS_mode_set()]]&lt;br /&gt;
&lt;br /&gt;
== Usage and Programming ==&lt;br /&gt;
This section has discussions of practical issues in using OpenSSL&lt;br /&gt;
:* Building from Source&lt;br /&gt;
:: Where to find it, the different versions, how to build and install it.&lt;br /&gt;
:* [[OpenSSL Overview]]&lt;br /&gt;
:* [[Versioning]]&lt;br /&gt;
:* [[Compilation and Installation]]&lt;br /&gt;
:* [[EVP]]&lt;br /&gt;
:: Programming techniques and example code&lt;br /&gt;
:: Use of EVP is preferred for most applications and circumstances&lt;br /&gt;
::* [[EVP Asymmetric Encryption and Decryption of an Envelope]]&lt;br /&gt;
::* [[EVP Authenticated Encryption and Decryption]]&lt;br /&gt;
::* [[EVP Symmetric Encryption and Decryption]]&lt;br /&gt;
::* [[EVP Key and Parameter Generation]]&lt;br /&gt;
::* [[EVP Key Agreement]]&lt;br /&gt;
::* [[EVP Message Digests]]&lt;br /&gt;
::* [[EVP Key Derivation]]&lt;br /&gt;
::* [[EVP Signing and Verifying|EVP Signing and Verifying (including MAC codes)]]&lt;br /&gt;
:* [[STACK API]]&lt;br /&gt;
:* [[List of SSL OP Flags]]&lt;br /&gt;
:* Low Level APIs&lt;br /&gt;
::[[Creating an OpenSSL Engine to use indigenous ECDH ECDSA and HASH Algorithms]]&lt;br /&gt;
:: More specialized non-EVP usage&lt;br /&gt;
::* [[Diffie-Hellman parameters]]&lt;br /&gt;
:* [[FIPS Mode]]&lt;br /&gt;
:* [[Simple TLS Server]]&lt;br /&gt;
&lt;br /&gt;
== Concepts and Theory ==&lt;br /&gt;
Discussions of basic cryptographic theory and concepts&lt;br /&gt;
Discussions of common operational issues&lt;br /&gt;
:* [[Base64]]&lt;br /&gt;
:* [http://wiki.openssl.org/index.php/Category:FIPS_140 FIPS 140-2]&lt;br /&gt;
:* [[Random Numbers]]&lt;br /&gt;
:* [[Diffie Hellman]]&lt;br /&gt;
:* [[Elliptic Curve Diffie Hellman]]&lt;br /&gt;
:* [[Elliptic Curve Cryptography]]&lt;br /&gt;
&lt;br /&gt;
== Security Advisories ==&lt;br /&gt;
:* [https://www.openssl.org/policies/secpolicy.html OpenSSL Security Policy]&lt;br /&gt;
:* [https://www.openssl.org/news/vulnerabilities.html OpenSSL Vulnerabilities List]&lt;br /&gt;
:* [[Security_Advisories|Security Advisories Additional Information]]&lt;br /&gt;
&lt;br /&gt;
== Feedback and Contributions ==&lt;br /&gt;
:* [https://www.openssl.org/news/vulnerabilities.html How to notify us of suspected security vulnerabilities]&lt;br /&gt;
:* [https://www.openssl.org/community/#bugs How to report bugs, other than for suspected vulnerabilities]&lt;br /&gt;
:* [[Contributions|General background on source and documentation contributions - '''must read''']]&lt;br /&gt;
:* Contributing code fixes, other than for suspected vulnerabilities, as well as fixes and other improvements to manual pages:&lt;br /&gt;
::* If you are unsure as to whether a feature will be useful for the general OpenSSL community please discuss it on the [https://www.openssl.org/community/ openssl-users mailing list] first.  Someone may be already working on the same thing or there may be a good reason as to why that feature isn't implemented.&lt;br /&gt;
::* Follow the [[Use of Git#Use_of_Git_with_OpenSSL_source_tree|instructions for accessing source code]] in the appropriate branches. Note that manual pages and the FAQ are maintained with the source code.&lt;br /&gt;
::* Submit a pull request for each separate fix (also documented [[Use of Git#Use_of_Git_with_OpenSSL_source_tree|there]])&lt;br /&gt;
::* Submit a bug report (see second bullet, above) and reference the pull request. Or you can attach the patch to the ticket.&lt;br /&gt;
:* Contributing fixes and other improvements to the web site&lt;br /&gt;
::* Follow the [[Use_of_Git#Use_of_Git_with_the_OpenSSL_web_site|instructions for accessing web site sources]]&lt;br /&gt;
::* Create a patch (also documented [[Use_of_Git#Use_of_Git_with_the_OpenSSL_web_site|there]])&lt;br /&gt;
::* Submit a bug report and add the patch as an attachment&lt;br /&gt;
:* [[Developing For OpenSSL]]&lt;br /&gt;
:* [[KnownPatches|Known patches not part of OpenSSL]]&lt;br /&gt;
:* [[Welcome|Contributing to this wiki]]&lt;br /&gt;
&lt;br /&gt;
== Internals and Development ==&lt;br /&gt;
This section is for internal details of primary interest to OpenSSL maintainers and power users&lt;br /&gt;
:* [[Code reformatting]]&lt;br /&gt;
&lt;br /&gt;
:* [[Internals]]&lt;br /&gt;
:* [[Code Quality]]&lt;br /&gt;
:* [[Static and Dynamic Analysis]]&lt;br /&gt;
:* [[OCB|OCB Licence details]]&lt;br /&gt;
:* [[Defect and Feature Review Process]]&lt;br /&gt;
:* [[Unit Testing]] (includes other automated testing information)&lt;br /&gt;
:* [[How to Integrate a Symmetric Cipher]]&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2905</id>
		<title>Talk:OpenSSL 1.1.0 Changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2905"/>
		<updated>2020-03-27T06:51:14Z</updated>

		<summary type="html">&lt;p&gt;Levitte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Converting code to be compatible with both OpenSSL 1.0.x and 1.1.x ==&lt;br /&gt;
&lt;br /&gt;
Small correction to the example at [[1.1_API_Changes#Adding_forward-compatible_code_to_older_versions]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;HMAC_CTX_reset&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;EVP_MD_CTX_free&amp;lt;/tt&amp;gt; are OpenSSL 1.1 APIs themselves so their use should be avoided in the &amp;lt;tt&amp;gt;#if&amp;lt;/tt&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
Suggested example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 static HMAC_CTX *HMAC_CTX_new(void)&lt;br /&gt;
 {&lt;br /&gt;
    HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));&lt;br /&gt;
    if (ctx != NULL)&lt;br /&gt;
        HMAC_CTX_init(ctx);&lt;br /&gt;
    return ctx;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void HMAC_CTX_free(HMAC_CTX *ctx)&lt;br /&gt;
 {&lt;br /&gt;
    if (ctx != NULL) {&lt;br /&gt;
        HMAC_CTX_cleanup(ctx);&lt;br /&gt;
        OPENSSL_free(ctx);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly examples for other APIs that I encountered:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define EVP_MD_CTX_new EVP_MD_CTX_create&lt;br /&gt;
 #define EVP_MD_CTX_free EVP_MD_CTX_destroy&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
--[[User:Edwintorok|Edwintorok]] ([[User talk:Edwintorok|talk]]) 13:30, 23 September 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Please update the &amp;quot;No longer works&amp;quot; section ==&lt;br /&gt;
&lt;br /&gt;
That section is ''seriously'' outdated.&lt;br /&gt;
&lt;br /&gt;
--[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 06:51, 27 March 2020 (UTC)&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:Compilation_and_Installation&amp;diff=2892</id>
		<title>Talk:Compilation and Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:Compilation_and_Installation&amp;diff=2892"/>
		<updated>2019-10-05T10:45:06Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* Page has grown too large */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Page has grown too large ==&lt;br /&gt;
&lt;br /&gt;
Hi Everyone. I think this page has grown too large and should be separated into separate pages. It has become messy and hard to organize the information.&lt;br /&gt;
&lt;br /&gt;
Painting with a broad brush, leave &amp;quot;Compilation and Installation&amp;quot; as the main landing page. Always refer to it from external places, like Stack Overflow. At &amp;quot;Compilation and Installation&amp;quot; include the basic information, like intro discussion of various platforms and the Unix/Linux options. Then, create separate subpages for specific platforms, like Linux, OS X, Windows, Windows CE, etc. &amp;quot;Compilation and Installation&amp;quot; provides a link to each subpage.&lt;br /&gt;
&lt;br /&gt;
Does anyone have any thoughts?&lt;br /&gt;
&lt;br /&gt;
[[User:Jwalton|Jwalton]] ([[User talk:Jwalton|talk]]) 23:31, 4 October 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Good idea. Are you willing to start on that? &lt;br /&gt;
:&lt;br /&gt;
: --[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 10:45, 5 October 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=User_talk:Matt&amp;diff=2886</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=User_talk:Matt&amp;diff=2886"/>
		<updated>2019-10-04T14:32:02Z</updated>

		<summary type="html">&lt;p&gt;Levitte: Created page with &amp;quot;You might want to update your page ;-)  --~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You might want to update your page ;-)&lt;br /&gt;
&lt;br /&gt;
--[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 14:32, 4 October 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:EVP_Key_Derivation&amp;diff=2884</id>
		<title>Talk:EVP Key Derivation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:EVP_Key_Derivation&amp;diff=2884"/>
		<updated>2019-09-15T07:23:16Z</updated>

		<summary type="html">&lt;p&gt;Levitte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== About this page ==&lt;br /&gt;
&lt;br /&gt;
It should be noted that ever since this page got filled in with examples and all that, it strictly talks about upcoming functionality. The '''EVP_KDF''' API doesn't exist in any current release (and hasn't reached its final form yet), but will be part of the upcoming 3.0 release. It's therefore to be expected that the example shown on this page will change as the API evolves.&lt;br /&gt;
&lt;br /&gt;
--[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 04:13, 15 September 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
: This is the gist of my direct comment.  The ctrl APIs were transient, we're migrating to OSSL_PARAM based ones globally -- it's just going to take a while.&lt;br /&gt;
:&lt;br /&gt;
: --[[User:Pauli|Pauli]] ([[User talk:Pauli|talk]])&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=User_talk:Pauli&amp;diff=2882</id>
		<title>User talk:Pauli</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=User_talk:Pauli&amp;diff=2882"/>
		<updated>2019-09-15T04:16:18Z</updated>

		<summary type="html">&lt;p&gt;Levitte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KDF Changes ==&lt;br /&gt;
I think the [modified] KDF example may be too new for most users of OpenSSL. For example, it appears OSSL_PARAM is part of an upcoming release: https://www.openssl.org/docs/manmaster/man3/OSSL_PARAM.html .&lt;br /&gt;
&lt;br /&gt;
I think the new example is going to cause confusion for most users rather than helping them. Also, answers on Stack Overflow a pointing back to the wiki and the old example.&lt;br /&gt;
&lt;br /&gt;
Perhaps you can add the new example as a distinct second example, and clearly state it is part of the OpenSSL 3.0 API.&lt;br /&gt;
&lt;br /&gt;
[[User:Jwalton|Jwalton]] ([[User talk:Jwalton|talk]]) 00:14, 15 September 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Shouldn't this be discussed on the discussion tab of the page that was changed? That would probably make it a little easier for the rest of us to understand what's going on, rather than this random discussion added to a user page that doesn't even exist... &lt;br /&gt;
: --[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 03:57, 15 September 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Yeah, I was trying to have a sidebar to encourage an edit. Sorry about that.&lt;br /&gt;
::&lt;br /&gt;
:: [[User:Jwalton|Jwalton]] ([[User talk:Jwalton|talk]]) 04:00, 15 September 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I have added a note on the &amp;quot;offending page's&amp;quot; discussion tab, to clarify the hows and the whys for changes happening there. Hope that helps. &lt;br /&gt;
::: --[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 04:16, 15 September 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:EVP_Key_Derivation&amp;diff=2881</id>
		<title>Talk:EVP Key Derivation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:EVP_Key_Derivation&amp;diff=2881"/>
		<updated>2019-09-15T04:13:47Z</updated>

		<summary type="html">&lt;p&gt;Levitte: Created page with &amp;quot; == About this page ==  It should be noted that ever since this page got filled in with examples and all that, it strictly talks about upcoming functionality. The '''EVP_KDF''...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== About this page ==&lt;br /&gt;
&lt;br /&gt;
It should be noted that ever since this page got filled in with examples and all that, it strictly talks about upcoming functionality. The '''EVP_KDF''' API doesn't exist in any current release (and hasn't reached its final form yet), but will be part of the upcoming 3.0 release. It's therefore to be expected that the example shown on this page will change as the API evolves.&lt;br /&gt;
&lt;br /&gt;
--[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 04:13, 15 September 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=User_talk:Pauli&amp;diff=2879</id>
		<title>User talk:Pauli</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=User_talk:Pauli&amp;diff=2879"/>
		<updated>2019-09-15T03:57:49Z</updated>

		<summary type="html">&lt;p&gt;Levitte: /* KDF Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KDF Changes ==&lt;br /&gt;
I think the [modified] KDF example may be too new for most users of OpenSSL. For example, it appears OSSL_PARAM is part of an upcoming release: https://www.openssl.org/docs/manmaster/man3/OSSL_PARAM.html .&lt;br /&gt;
&lt;br /&gt;
I think the new example is going to cause confusion for most users rather than helping them. Also, answers on Stack Overflow a pointing back to the wiki and the old example.&lt;br /&gt;
&lt;br /&gt;
Perhaps you can add the new example as a distinct second example, and clearly state it is part of the OpenSSL 3.0 API.&lt;br /&gt;
&lt;br /&gt;
[[User:Jwalton|Jwalton]] ([[User talk:Jwalton|talk]]) 00:14, 15 September 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Shouldn't this be discussed on the discussion tab of the page that was changed? That would probably make it a little easier for the rest of us to understand what's going on, rather than this random discussion added to a user page that doesn't even exist... &lt;br /&gt;
: --[[User:Levitte|Levitte]] ([[User talk:Levitte|talk]]) 03:57, 15 September 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Libssl_API&amp;diff=2788</id>
		<title>Libssl API</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Libssl_API&amp;diff=2788"/>
		<updated>2019-07-10T09:11:18Z</updated>

		<summary type="html">&lt;p&gt;Levitte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;libssl is the portion of OpenSSL which supports TLS ( [[SSL and TLS Protocols]] ), and depends on [[Libcrypto API|libcrypto]].&lt;br /&gt;
&lt;br /&gt;
This is a '''C''' api. To use it you need to include (at least) '''openssl/ssl.h''' and to link your program with libssl library.&lt;br /&gt;
&lt;br /&gt;
* [[Diffie-Hellman parameters]]&lt;br /&gt;
* [[Hostname validation]]&lt;br /&gt;
&lt;br /&gt;
== How to get libssl API to compile with it ==&lt;br /&gt;
&lt;br /&gt;
on Debian base ( debian, ubuntu, ... ) you would need libssl-dev  : apt-get install libssl-dev.&lt;br /&gt;
&lt;br /&gt;
on Redhat base ( RedHat, Fedora, ... ) you would need openssl-devel : yum install openssl-devel&lt;br /&gt;
&lt;br /&gt;
You can get sources directly too to compile statically over it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ssl API]]&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=2731</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=2731"/>
		<updated>2018-10-08T05:03:10Z</updated>

		<summary type="html">&lt;p&gt;Levitte: Style fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can obtain an incomplete help message by using an invalid option, eg. '''-help'''. &lt;br /&gt;
&lt;br /&gt;
===Cipher alogorithms===&lt;br /&gt;
&lt;br /&gt;
To get a list of available ciphers you can use the '''list-cipher-algorithms''' command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-cipher-algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output gives you a list of ciphers with its variations in [[key size]] and [[mode of operation]]. For example '''AES-256-CBC''' for [[AES]] with key size 256 bits in [[CBC|CBC-mode]]. Some ciphers also have short names, for example the one just mentioned is also known as '''aes256'''. These names are case insensitive. In addition '''none''' is a valid ciphername. This algorithms does nothing at all.&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
;-in ''filename''&lt;br /&gt;
:This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
;-out ''filename''&lt;br /&gt;
:This specifies the output file. It will be created or overwritten if it already exists.&lt;br /&gt;
&lt;br /&gt;
;-e or -d&lt;br /&gt;
: This specifies whether to encrypt ('''-e''') or to decrypt ('''-d'''). Encryption is the default. Of course you have to get all the other options right in order for it to function properly. In particular it is necessary to give the correct cipher-name as well as '''-a''', '''-A''' or '''-z''' options.&lt;br /&gt;
&lt;br /&gt;
;-a, -A, -base64&lt;br /&gt;
: These flags tell OpenSSL to apply [[Base64]]-encoding before or after the cryptographic operation. The '''-a''' and '''-base64''' are equivalent. If you want to decode a base64 file it is necessary to use the '''-d''' option. By default the encoded file has a line break every 64 characters. To suppress this you can use ''in addition'' to '''-base64''' the '''-A''' flag. This will produce a file with no line breaks at all. You can use these flags just for [[#Base64 Encoding|encoding Base64]] without any ciphers involved.&lt;br /&gt;
&lt;br /&gt;
;-bufsize ''n''&lt;br /&gt;
: Specify the buffer size. This concerns only internal buffers. It has nothing to do with the cryptographic algorithms in question.&lt;br /&gt;
&lt;br /&gt;
;-debug&lt;br /&gt;
: Enable debugging output. This does not include any sensitive information. See also '''-P'''.&lt;br /&gt;
&lt;br /&gt;
;-engine ''id''&lt;br /&gt;
: Specify an [[engine]] for example to use special hardware.&lt;br /&gt;
&lt;br /&gt;
;-iv ''IV''&lt;br /&gt;
: This specifies the [[initialization vector]] ''IV'' as hexadecimal number. If not explicitly given it will be derived from the password. See key derivation for details.&lt;br /&gt;
&lt;br /&gt;
;-k ''password'',  -kfile ''filename''&lt;br /&gt;
: Both option are used to specify a password or a file containing the password which is used for key derivation. However '''they are deprecated'''. You should use the ''-pass'' option instead. The equivalents are '''-pass pass:'''''password'' and '''-pass: file:'''''filename'' respectively. &lt;br /&gt;
&lt;br /&gt;
;-K ''key''&lt;br /&gt;
: This option allows you to set the ''key'' used for encryption or decryption. This is the key directly used by the cipher algorithm. If no key is given OpenSSL will derive it from a password. This process is described in PKCS5#5 (RFC-2898).&lt;br /&gt;
&lt;br /&gt;
;-md ''messagedigest''&lt;br /&gt;
: This specifies the message digest which is used for key derivation. It can take one of the values '''md2''', '''md5''', '''sha''' or '''sha1'''.&lt;br /&gt;
&lt;br /&gt;
;-nopad&lt;br /&gt;
: This disables standard padding.&lt;br /&gt;
&lt;br /&gt;
;-salt, -nosalt, -S ''salt''&lt;br /&gt;
: These options allow to switch [[Salt|salting]] on or off. With '''-S''' ''salt'' it is possible to explicitly give its value (in hexadecimal).   &lt;br /&gt;
&lt;br /&gt;
;-p, -P&lt;br /&gt;
: Additionally to any encryption tasks, this prints the key, initialization vector and salt value (if used). If '''-P''' is used just these values are printed, no encryption will take place.&lt;br /&gt;
&lt;br /&gt;
;-pass ''arg''&lt;br /&gt;
: This specifies the password source. Possible values for ''arg'' are '''pass:'''''password'' or '''file:'''''filename'', where ''password'' is your password and ''filename'' file containing the password.&lt;br /&gt;
&lt;br /&gt;
;-z&lt;br /&gt;
: Use this flag to enable [http://www.zlib.net/ zlib-compression]. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Base64 Encoding====&lt;br /&gt;
To encode a file ''text.plain'' you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -base64 -in text.plain -out text.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To decode a file the the decrypt option ('''-d''') has to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -d -base64 -in text.base64 -out text.plain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Encryption====&lt;br /&gt;
&lt;br /&gt;
=====Basic Usage=====&lt;br /&gt;
The most basic way to encrypt a file is this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -aes256 -base64 -in some.secret -out some.secret.enc&lt;br /&gt;
enter aes-256-cbc encryption password :&lt;br /&gt;
Verifying - enter aes-256-cbc encryption password :&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will encrypt the file ''some.secret'' using the [[AES|AES-cipher]] in [[CBC|CBC-mode]]. The result will be Base64 encoded and written to ''some.secret.enc''. OpenSSL will ask for password which is used to derive a key as well the initialization vector.&lt;br /&gt;
Since encryption is the default, it is not necessary to use the '''-e''' option.&lt;br /&gt;
&lt;br /&gt;
=====Use a given Key=====&lt;br /&gt;
&lt;br /&gt;
It also possible to specify the key directly. For most [[modes of operations]] (i.e. all non-ECB modes) it is then necessary to specify an initialization vector. Usually it is derived together with the key form a password. And as there is no password, also all salting options are obsolete.&lt;br /&gt;
&lt;br /&gt;
The key and the IV are given in hex. Their length depending on the cipher and key size in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -des-ecb -K e0e0e0e0f1f1f1f1 -in mesg.plain -out mesg.enc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key above is one of 16 [http://en.wikipedia.org/wiki/Weak_key weak DES keys]. It should not be used in practice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;/div&gt;</summary>
		<author><name>Levitte</name></author>
	</entry>
</feed>