Add ACVP fips module tests
authorShane Lontis <shane.lontis@oracle.com>
Wed, 17 Jun 2020 01:33:16 +0000 (11:33 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Wed, 17 Jun 2020 01:33:16 +0000 (11:33 +1000)
commit4f2271d58a36b2aee125062ffb9626c6208fa394
tree122e6de930647c37a35b5f457448a031e51969b8
parent5a147abd790075cdc97b36ff5084e2eb1d779b95
Add ACVP fips module tests

For FIPS validation purposes - Automated Cryptographic Validation Protocol (ACVP) tests need to be
performed. (See https://github.com/usnistgov/ACVP). These tests are very similiar to the old CAVS tests.

This PR uses a hardwired subset of these test vectors to perform similiar operations,
to show the usage and prove that the API's are able to perform the required operations.
It may also help with communication with the lab (i.e- The lab could add a test here to show
a unworking use case - which we can then address).

The EVP layer performs these tests instead of calling lower level API's
as was done in the old FOM.
Some of these tests require access to internals that are not normally allowed/required.

The config option 'acvp_tests' (enabled by default) has been added so that this
access may be removed.

The mechanism has been implemented as additional OSSL_PARAM values that can be set and get.
A callback mechanism did not seem to add any additional benefit.
These params will not be added to the gettables lists.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11572)
39 files changed:
Configure
INSTALL.md
crypto/dh/dh_check.c
crypto/dh/dh_gen.c
crypto/dh/dh_pmeth.c
crypto/dsa/dsa_check.c
crypto/dsa/dsa_gen.c
crypto/dsa/dsa_pmeth.c
crypto/ffc/ffc_backend.c
crypto/ffc/ffc_params.c
crypto/ffc/ffc_params_generate.c
crypto/ffc/ffc_params_validate.c
crypto/rsa/build.info
crypto/rsa/rsa_acvp_test_params.c [new file with mode: 0644]
crypto/rsa/rsa_backend.c
crypto/rsa/rsa_gen.c
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_local.h
crypto/rsa/rsa_sp800_56b_gen.c
doc/man7/EVP_PKEY-RSA.pod
include/crypto/dh.h
include/crypto/dsa.h
include/crypto/rsa.h
include/internal/ffc.h
include/openssl/core_names.h
providers/implementations/keymgmt/dh_kmgmt.c
providers/implementations/keymgmt/dsa_kmgmt.c
providers/implementations/keymgmt/ec_kmgmt.c
providers/implementations/keymgmt/rsa_kmgmt.c
providers/implementations/signature/build.info
providers/implementations/signature/dsa.c
providers/implementations/signature/ecdsa.c
providers/implementations/signature/rsa.c
test/acvp_test.c [new file with mode: 0644]
test/acvp_test.inc [new file with mode: 0644]
test/build.info
test/ffc_internal_test.c
test/recipes/30-test_acvp.t [new file with mode: 0644]
test/rsa_sp800_56b_test.c