Lines Matching +full:non +full:- +full:default
5 fips_module - OpenSSL fips module guide
18 L<https://github.com/openssl/openssl/blob/master/README-FIPS.md>.
44 All of the above APIs are deprecated in OpenSSL 3.0 - so a simple rule is to
45 avoid using all deprecated functions. See L<ossl-guide-migration(7)> for a list of
48 =head2 Making all applications use the FIPS module by default
51 use the FIPS module for cryptographic algorithms by default.
55 default config file or its settings then they can automatically start using the
58 To do this the default OpenSSL config file will have to be modified. The
63 $ openssl version -d
66 Caution: Many Operating Systems install OpenSSL by default. It is a common error
70 $ openssl version -v
71 OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)
73 The B<OPENSSLDIR> value above gives the directory name for where the default
74 config file is stored. So in this case the default config file will be called
100 See L<https://github.com/openssl/openssl/blob/master/README-FIPS.md>.
103 enabled to prevent accidental use of non-FIPS validated algorithms via broken
108 explicit steps to avoid this default behaviour. Note that this configuration
129 If applications take explicit steps to not load the default config file or
137 that are available in the default OpenSSL Provider.
150 =head2 Selectively making applications use the FIPS module by default
153 application basis. The default OpenSSL config file depends on the compiled in
157 application to be executed with a non-standard config file location:
168 =head2 Programmatically loading the FIPS module (default library context)
177 L</Making all applications use the FIPS module by default> above, but edit the
213 loaded, then the default provider will be automatically loaded. If you then
215 default provider loaded at the same time. It is unspecified which implementation
221 This loads a sub-set of algorithms that are also available in the default
222 provider - specifically non cryptographic ones which may be used in conjunction
224 decoding keys. If you decide not to load the default provider then you
227 In this example we are using the "default" library context. OpenSSL functions
229 explicitly specified then the default library context is used. For further
235 default provider) all loaded at the same time into the same library context. You
244 sha256 = EVP_MD_fetch(NULL, "SHA2-256", "fips=yes");
251 default provider:
255 sha256 = EVP_MD_fetch(NULL, "SHA2-256", "provider=default");
257 It is also possible to set a default property query string. The following
258 example sets the default property query of C<fips=yes> for all fetches within
259 the default library context:
264 default property query is defined then the two queries are merged together and
265 both apply. The local property query overrides the default properties if the
268 There are two important built-in properties that you should be aware of:
271 implementation to be fetched from, e.g. C<provider=default> or C<provider=fips>.
275 property query C<fips=yes>. There are also some non-cryptographic algorithms
276 available in the default and base providers that also have the C<fips=yes>
282 It is possible to specify default properties within a config file. For example
283 the following config file automatically loads the default and FIPS providers and
284 sets the default property value to be C<fips=yes>. Note that this config file
286 are also in "default", so it is unnecessary in this case:
299 default = default_sect
312 called F<openssl-fips.cnf> that automatically loads and configures the FIPS and
313 base providers. The other library context will just use the default provider.
322 * one for non-fips usage
329 /* Prevent anything from using the default library context */
337 if (!OSSL_LIB_CTX_load_config(fips_libctx, "openssl-fips.cnf"))
341 * Set the default property query on the FIPS library context to
342 * ensure that only FIPS algorithms can be used. There are a few non-FIPS
349 * We don't need to do anything special to load the default
353 * nonfips_libctx it will just use the default config file.
359 fipssha256 = EVP_MD_fetch(fips_libctx, "SHA2-256", NULL);
363 /* Get a non-FIPS validated digest */
364 nonfipssha256 = EVP_MD_fetch(nonfips_libctx, "SHA2-256", NULL);
383 into the default library context. We could have chosen to use the default
385 for other usages - or vice versa. However if code has not been converted to use
386 library contexts then the default library context will be automatically used.
391 provider into the default library context. Because a provider has been
392 explicitly loaded, the default provider will not automatically load. This means
393 code using the default context by accident will fail because no algorithms will
396 See L<ossl-guide-migration(7)/Library Context> for additional information about the
409 the key or parameter object. The built-in OpenSSL encoders and decoders are
410 implemented in both the default and base providers and are not in the FIPS
414 You should ensure that either the default or base provider is loaded into the
421 properties and the default library context to specify usage of FIPS validated
439 * We assume that a nondefault library context with the default
450 * as well as encoders from the default provider that are allowed
452 * default library context.
477 FIPS 140-3 requires indicators to be used if the FIPS provider allows non
479 such as minimum key size. By default an error will occur if any check fails.
487 (e.g. "fips-indicator").
488 An example of an algorithm context setter is "key-check"
489 in L<EVP_KDF-HKDF(7)/Supported parameters>.
491 The following algorithms use "fips-indicator" to query if the algorithm
499 See L<EVP_PKEY-DSA(7)/DSA parameters>
504 See L<EVP_SIGNATURE-DSA(7)/Signature Parameters>
508 See L<EVP_SIGNATURE-ECDSA(7)/ECDSA Signature Parameters>
512 See L<EVP_PKEY-EC(7)/Common EC parameters>
518 See L<EVP_ASYM_CIPHER-RSA(7)/RSA Asymmetric Cipher parameters> and
519 L<EVP_KEM-RSA(7)/RSA KEM parameters>
523 See L<EVP_SIGNATURE-RSA(7)/Signature Parameters>
527 See L<EVP_RAND-HASH-DRBG(7)/Supported parameters> and
528 EVP_RAND-HMAC-DRBG(7)/Supported parameters>
532 Triple-DES is not longer approved for encryption.
533 See L<EVP_CIPHER-DES(7)/Parameters>
537 See L<EVP_KEYEXCH-DH(7)/DH and DHX key exchange parameters>
541 See L<EVP_KEYEXCH-ECDH(7)/ECDH Key Exchange parameters>
545 See relevant KDF documentation e.g. L<EVP_KDF-HKDF(7)/Supported parameters>
549 See L<EVP_MAC-CMAC(7)/Supported parameters> and
550 L<EVP_MAC-KMAC(7)/Supported parameters>
554 The following FIPS algorithms are unapproved and use the "fips-indicator".
558 =item RAND-TEST-RAND
560 See L<EVP_RAND-TEST-RAND(7)/Supported parameters>
562 internally for non security purposes.
568 The unapproved (non FIPS validated) algorithms have a property query value of
576 =item AES-GCM ciphers support the indicator "iv-generated"
580 =item ECDSA and RSA Signatures support the indicator "verify-message".
582 See L<EVP_SIGNATURE-ECDSA(7)/ECDSA Signature Parameters> and
583 L<EVP_SIGNATURE-RSA(7)/Signature Parameters> /for further information.
593 require FIPS-approved functionality, it is essential to build your FIPS
600 As the FIPS provider still supports non-FIPS validated algorithms,
606 L<ossl-guide-migration(7)>, L<crypto(7)>, L<fips_config(5)>,
617 Copyright 2021-2025 The OpenSSL Project Authors. All Rights Reserved.