Coder Social home page Coder Social logo

cisco / libacvp Goto Github PK

View Code? Open in Web Editor NEW
65.0 27.0 66.0 14.97 MB

The libacvp library is a client-side implementation of the draft ACVP protocol (github.com/usnistgov/ACVP).

License: Apache License 2.0

Shell 6.64% Makefile 7.20% C 85.46% Batchfile 0.05% M4 0.54% Dockerfile 0.11%

libacvp's Introduction

         __       __   ______        ___       ______ ____    ____  ______
        |  |     |  | |   _  \      /   \     /      |\   \  /   / |   _  \
        |  |     |  | |  |_)  |    /  ^  \   |  ,----' \   \/   /  |  |_)  |
        |  |     |  | |   _  <    /  /_\  \  |  |       \      /   |   ___/
        |  `----.|  | |  |_)  |  /  _____  \ |  `----.   \    /    |  |
        |_______||__| |______/  /__/     \__\ \______|    \__/     | _|   

           A library that implements the client-side of the ACVP protocol.
      The ACVP specification can be found at https://github.com/usnistgov/ACVP

License

Libacvp is licensed under the Apache License 2.0, which means that you are free to get and use it for commercial and non-commercial purposes as long as you fulfill its conditions. See the LICENSE file for details.

Recent Changes

Libacvp has been updated to 2.0.0! The included acvp_app now supports OpenSSL 3.0. Various new algorithms are supported and tested on top of multiple other new features and improvements. Please see the release notes for more details. Support for OpenSSL 1.0.2 has been removed.

Overview

Libacvp is a client-side ACVP library implementation, and also includes an example application (acvp_app) which utilizes the library.

libacvp will login and then register with the ACVP server (advertising capabilities). The server will respond with a list of vector set identifiers that need to be processed. libacvp will download each vector set, process the vectors, and send the results back to the server. This is performed in real-time by default. The user can also use "offline" mode for non-realtime processing.

The app/ directory contains a sample application which uses libacvp. This app provides the glue between the crypto module DUT and the library itself. Depending upon the DUT, the crypto backend API, and other factors, the user may need to enhance the reference application, or create a new one from scratch.

The application within app/ demonstrates how to use libacvp to interface with a crypto module on top of providing a broad testing harness for OpenSSL.

This application includes support for FIPS testing OpenSSL 3.X. Historically, support was included for FIPS testing OpenSSL's FIPS module for 1.0.2; this is end of life and support has been removed. Some artifacts have been left behind in case users have need to test a similar FOM structure for OpenSSL 1.1.1 (OpenSSL does not support this themselves). For OpenSSL 3.X, testing the FIPS provider or the default provider is managed at runtime. If you are testing a different provider, you will need to modify the application code to fetch those algorithms accordingly. For previous versions, a build time argument providing a path to the FIPS module being tested was required.

The certs/ directory contains the certificates used to establish a TLS session with well-known ACVP servers. If the ACVP server uses a self-signed certificate, then the proper CA file must be specified. libacvp also requires a client certificate and key pair, which the ACVP server uses to identify the client. You will need to contact NIST to register your client certificate with their server.

The murl directory contains experimental code to replace the Curl dependency. This may be useful for target platforms that don't support Curl, such as Android or iOS. Murl is a "minimal" Curl implementation. It implements a handful of the Curl API entry points used by libacvp. The Murl code is currently in an experimental stage and is not supported or maintained as part of libacvp and should not be used in any production environment.

Dependencies

  • autotools
  • gcc
  • make
  • curl (or substitution)
  • openssl (or substitution)
  • libcriterion (for unit tests only)
  • doxygen (for building documentation only)

Curl is used for sending REST calls to the ACVP server.

Openssl is used for TLS transport by libcurl.

Parson is used to parse and generate JSON data for the REST calls. The parson code is included and compiled as part of libacvp.

libcurl, libssl and libcrypto are not included, and must be installed separately on your build/target host, including the header files.

Dealing with system-default dependencies

This codebase uses features in OpenSSL >= 1.1.1. If the system-default install does not meet this requirement, you will need to download, compile and install at least OpenSSL 1.1.1 on your system. The new OpenSSL resources should typically be installed into /usr/local/ssl to avoid overwriting the default OpenSSL that comes with your distro.

Version 1.1.1 of OpenSSL reaches end of life officially on September 11, 2023. Updating to OpenSSL 3.X is highly recommended when possible. All previous versions have reached end of life status.

A potential source of issues is the default libcurl on the Linux distro, which may be linked against the previously mentioned default OpenSSL. This could result in linker failures when trying to use the system default libcurl with the new OpenSSL install (due to missing symbols). Therefore, you SHOULD download the Curl source, compile it against the "new" OpenSSL header files, and link libcurl against the "new" OpenSSL. libacvp uses compile time macro logic to address differences in the APIs of different OpenSSL versions; therefore, it is important that you ensure libacvp is linking to the correct openSSL versions at run time as well.

Libacvp is designed to work with curl version 7.80.0 or newer. Some operating systems may ship with older versions of Curl which are missing certain features that libacvp depends on. In this case you should either acquire a newer version through your OS package manager if possible or build a newer version from source. While it is possible some older versions may work, they are not tested or supported.

Building

The instructions below indicate how to build libacvp for OpenSSL 3.X testing. The process is the same for building 1.1.1 without FIPS. If you have a FIPS module for 1.1.1, we are unable to officially support it as OpenSSL does not have a FIPS for 1.1.1 and there is no standard format to follow. However, some support for building with a FOM (such as that included with 1.0.2) remains; for more details, see the README included with versions prior to 2.0. It will be up to the user to maintain an application capable of testing your implementation.

--prefix<path to install dir> can be used with any configure options to specify where you would like the library and application to install to.

To build app and library for supported algorithm testing

./configure --with-ssl-dir=<path to ssl dir> --with-libcurl-dir=<path to curl dir>
make clean
make
make install

Building libacvp without the application code.

Use the following ./configure command line option and only the library will be built and installed.

--disable-app

Note that this option is not useful when building for offline testing since the application is needed. Using this option, only a libcurl installation dir needs to be provided.

Building acvp_app only without the library code

Use the following ./configure command line option and only the app will be built. Note that it depends on libacvp having already been built. The libacvp directory can be provided using --with-libacvp-dir= Otherwise, it will look in the default build directory in the root folder for libacvp.

--disable-lib

Other build options

More info about all available configure options can be found by using ./configure --help. Some important ones include: --enable-offline : Removes the Curl dependency and builds a version of libacvp that can only work offline. In current versions of libacvp, this does not affect if libraries are linked statically or dynamically. --disable-kdf : Will disable kdf registration and processing in the application, in cases where the given crypto implementation does not support it (E.g. all OpenSSL prior to 3.0) --disable-lib-check : This will disable autoconf's attempts to automatically detect prerequisite libraries before building libacvp. This may be useful in some edge cases where the libraries exist but autoconf cannot detect them; however, it will give more cryptic error messages in the make stage if there are issues --enable-force-static-linking : This will force a build of acvp_app to attempt to link to every dependency library, including libc, statically.

Libacvp will attempt to link a shared library for a given dependency if it exists, and will use a static library if a shared one is not found. Statically linking the OpenSSL FIPS provider is not supported at this time as OpenSSL does not support static building of the FIPS provider.

Cross Compiling

Requires options --build and --host. Your $PATH must contain a path the gcc.

export CROSS_COMPILE=powerpc-buildroot-linux-uclibc
./configure --build=<local target prefix> --host=<gcc prefix of target host> --with-ssl-dir=<path to ssl dir> --with-libcurl-dir=<path to curl dir>

Example with build and host information:

./configure --build=localx86_64-unknown-linux-gnu --host=mips64-octeon-linux-gnu --with-ssl-dir=<path to ssl dir> --with-libcurl-dir=<path to curl dir>`

All dependent libraries must have been built with the same cross compile.

If using murl for cross compiles use the same CROSS_COMPILE and HOSTCC used with openssl, for example:

CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc

Windows

The Visual Studio projects for acvp_app and libacvp are set to use 2017 tools and are designed to be easily updated to use the latest versions of Microsoft build tools while being backwards compatible with Visual Studio 2017 and some older Windows 10 SDK versions.

Prerequisites: This system assumes all dependency library paths have /include folders containing all the headers needed to properly link. This can be altered in the scripts if needed.

For these steps, use the Visual Studio Command Prompt for your platform (x64, x86, x86_64, or x64_86)

Steps: 1.) Edit and run ms\config_windows.bat -Add all of the directories for your dependencies -Change any needed settings 2.) Open libacvp.sln and acvp_app.sln in Visual Studio and allow the dialog to update the projects' versions of MSVC and windows SDK to the latest installed (May be unnecessary if versions match) 3.) run ms/make_lib.bat 4.) run ms/make_app.bat

The library files and app files will be placed in the ms/build/ directory.

Notes: Windows will only search specific paths for shared libraries, and will not check the locations you specify in config_windows.bat by default unless they are in your path. This results in acvp_app not being able to run. An alternative to altering your path or moving libraries to system folders is moving/copying any needed .dll files to the same directory as acvp_app.

If you are building statically, it is assumed for acvp_app that you have built Curl with OpenSSL, and that you are linking acvp_app to the exact same version of OpenSSL that Curl is linked to. Other configurations are not supported, untested, and may not work. Libacvp itself is indifferent to which crypto and SSL libraries Curl uses, but any applications using libacvp statically need to link to those libraries.

Murl is not supported in windows at this time.

Running

  1. export LD_LIBRARY_PATH="<path to ssl lib;path to curl lib>"
  2. Modify scripts/nist_setup.sh and run source scripts/nist_setup.sh
  3. ./app/acvp_app --<options>

Use ./app/acvp_app --help for more information on available options.

libacvp generates a file containing information that can be used to resume or check the results of a session. By default, this is usually placed in the folder of the executable utilizing libacvp, though this can be different on some OS. The name, by default, is testSession_(ID number).json. The path and prefix can be controlled using ACV_SESSION_SAVE_PATH and ACV_SESSION_SAVE_PREFIX in your environment, respectively.

FIPS and OpenSSL 3.X

For OpenSSL 3.X, FIPS mode is determined by the acvp_app at runtime instead of build time. Acvp_app will attempt to utilize the OpenSSL FIPS provider by default; a runtime argument can be provided to not fetch FIPS crypto (CERTIFICATIONS MUST NOT BE PERFORMED THIS WAY).

We cannot advise specifically how to configure OpenSSL 3.X as that will vary on a platform-specific basis. Generally, the OpenSSL config file must include the fipsmodule.cnf file, must explicitly include the fips section, and must explicitly activate the FIPS provider. When the FIPS provider is explicitly activated, the default provider is no longer implicitly activated and must also be explicitly activated in some cases. In our testing, offline sessions can be run without explicitly activating the default provider (since all the crypto tests seek the FIPS provider), but Curl (and thus any online sessions or requests) requires the default provider to be activated to function properly.

acvp_app will perform a quick operation at startup using the FIPS provider to determine if FIPS crypto is working properly. If it fails, it will return an error; in this case please review your OpenSSL install, libacvp build steps, and especially your OpenSSL configuration before contacting the libacvp team.

How to test offline

  1. Download vectors on network accessible device: ./app/acvp_app --<algs of choice or all_algs> --vector_req <filename1>
  • where <filename1> is the file you are saving the tests to.
  1. Copy vectors and acvp_app to target: ./app/acvp_app --all_algs --vector_req <filename1> --vector_rsp <filename2>
  • where <filename1> is the file the tests are saved in, and <filename2> is the file you want to save your results to.
  1. Copy responses(filename2) to network accessible device: ./app/acvp_app --all_algs --vector_upload <filename2>
  • where <filename2> is the file containing the results of the tests.

Note: If the target in Step 2 does not have the standard libraries used by libacvp you may configure and build a special app used only for Step 2. This can be done by using --enable-offline when running ./configure which will help minimize library dependencies. By using --disable-shared at configure time, libacvp can be linked to acvp_app statically as well; acvp_app will link to other dependencies as described above under other build options.

Testing

Move to the test/ directory and see the README.md there. The tests depend upon a C test framework called Criterion, found here: https://github.com/Snaipe/Criterion

Contributing

Before opening a pull request on libacvp, please ensure that all unit tests are passing. Additionally, new tests should be added for new library features.

We also run the uncrustify tool as a linter to keep code-style consistent throughout the library. That can be found in the uncrustify/ directory.

Any and all new API functions must also be added to ms\resources\source.def.

FAQ

I get "unable to process test vectors" for certain algorithms. Why? This usually indicates that you have requested to test certain algorithms or features within algorithms that cannot be tested with the given version of OpenSSL as built.

I get some sort of hard crash while processing vector sets - why? It is probable that acvp_app is linking to a different version of a dependency than the one it was configured and built with. libacvp/acvp_app depend on library versions in enabling or disabling certain features at build time, so please make sure libacvp and acvp_app are built and run with the same versions of each library.

Can I redownload vector sets from a previously created session? Yes. running acvp_app with the --resume_session AND --vector_req options will redownload those vector sets to the given file without processing or uploading anything. See the app help section for more details about these commands.

I have been getting retry messages for X amount of time. Is this normal? Yes; the server actively sends retry messages when it is still in the process of generating tests or waiting to generate tests. This period of time can vary wildly if the server is under intense load, anywhere from a few seconds to a few days. If there is an issue and the connection is lost or the server experiences an error, the library output will indicate it.

I received a vector set from somewhere other than libacvp, such as a lab. How can I process it? Libacvp expects vector set json files to have a specific formatting. It is possible to manually modify the JSON file to make it work though we do not officially support or endorse this process. We plan to add support for this usage soon.

Moving your vector set into a json array, and putting this as the json object before the vector set should allow libacvp to process it using the offline testing process described above; you would also need to remove these entries from the output file.

{
    "jwt": "NA",
    "url": "NA",
    "isSample": false,
    "vectorSetUrls": [
        "NA"
    ]
}

Note that this file will not be able to be submitted using libacvp unless you manually input all of the correct information in the above object; we do not recommend this and you should instead try to submit via wherever you originally got the vector set from.

Credits

This package was initially written by John Foley of Cisco Systems. Contributors include (non-exhaustive): Barry Fussell (Cisco Systems) Andrew Karcher (Cisco Systems)

Supported Algorithms

Algorithm Type Library Support App Support (Open SSL 1.1.1) App Support (OpenSSL 3.X)
Block Cipher Modes
AES-CBC Y Y Y
AES-CFB1 Y Y Y
AES-CFB8 Y Y Y
AES-CFB128 Y Y Y
AES-CTR Y Y Y
AES-ECB Y Y Y
AES-GCM Y Y Y
AES-GCM-SIV Y Y Y
AES-KW Y Y Y
AES-KWP Y Y Y
AES-OFB Y Y Y
AES-XPN N N Y
AES-XTS Y Y Y
AES-FF1 N N N
AES-FF3-1 N N N
TDES-CBC Y Y Y
TDES-CBCI N N N
TDES-CFBP1 N N N
TDES-CFBP8 N N N
TDES-CFBP64 N N N
TDES-CTR Y Y N
TDES-ECB Y Y Y
TDES-KW Y N N
TDES-OFB Y Y N
TDES-OFBI N N N
Secure Hash
SHA-1 Y Y Y
SHA-224 Y Y Y
SHA-256 Y Y Y
SHA-384 Y Y Y
SHA-512 Y Y Y
SHA-512/224 Y Y Y
SHA-512/256 Y Y Y
SHA3-224 Y Y Y
SHA3-256 Y Y Y
SHA3-384 Y Y Y
SHA3-512 Y Y Y
SHAKE-128 Y Y Y
SHAKE-256 Y Y Y
XOFs
cSHAKE-128 N N N
cSHAKE-256 N N N
KMAC-128 Y N Y
KMAC-256 Y N Y
ParallelHash-128 N N N
ParallelHash-256 N N N
TupleHash-128 N N N
TupleHash-256 N N N
Message Authentication
AES-GMAC Y Y Y
AES-CCM Y Y Y
CMAC-AES Y Y Y
CMAC-TDES Y Y N
HMAC-SHA-1 Y Y Y
HMAC-SHA2-224 Y Y Y
HMAC-SHA2-256 Y Y Y
HMAC-SHA2-384 Y Y Y
HMAC-SHA2-512 Y Y Y
HMAC-SHA2-512/224 Y Y Y
HMAC-SHA2-512/256 Y Y Y
HMAC-SHA3-224 Y Y Y
HMAC-SHA3-256 Y Y Y
HMAC-SHA3-384 Y Y Y
HMAC-SHA3-512 Y Y Y
DRBG
ctrDRBG-AES-128 Y N Y
ctrDRBG-AES-192 Y N Y
ctrDRBG-AES-256 Y N Y
ctrDRBG-TDES N N N
HASH DRBG Y N Y
HMAC DRBG Y N Y
Digital Signature
RSA mode: keyGen Y N Y
RSA mode: sigGen Y N Y
RSA mode: sigVer Y N Y
RSA mode: signatureComponent Y N Y
RSA mode: decryptionComponent Y N N
RSA mode: legacySigVer N N N
ECDSA mode: sigGenComponent Y N Y
ECDSA mode: keyGen Y N Y
ECDSA mode: keyVer Y N Y
ECDSA mode: sigGen Y N Y
ECDSA mode: sigVer Y N Y
DSA mode: keyGen Y N Y
DSA mode: sigVer Y N Y
DSA mode: sigGen Y N Y
DSA mode: pqgGen Y N Y
DSA mode: pqgVer Y N Y
EDDSA mode: keyGen Y N Y
EDDSA mode: keyVer N N N
EDDSA mode: sigGen Y N Y
EDDSA mode: sigVer Y N Y
LMS mode: keyGen Y N N
LMS mode: sigGen Y N N
LMS mode: sigVer Y N N
Key Agreement
KAS ECC ephemeralUnified Y N N
KAS ECC SSC ephemeralUnified Y N Y
KAS ECC fullMqv N N N
KAS ECC fullUnified N N N
KAS ECC onePassDh N N N
KAS ECC onePassMqv N N N
KAS ECC OnePassUnified N N N
KAS ECC staticUnified N N N
KAS ECC CDH-Component Y N Y
KAS FFC dhHybrid1 N N N
KAS FFC mqv2 N N N
KAS FFC dhEphem Y N N
KAS FFC SSC dhEphem Y N Y
KAS FFC dhHybridOneFlow N N N
KAS FFC mqv1 N N N
KAS FFC dhOneFlow N N N
KAS FFC dhStatic N N N
KAS IFC SSC KAS1 Y N Y
KAS IFC SSC KAS2 Y N Y
KAS IFC KAS1-basic N N N
KAS IFC KAS1-Party_V-confirmation N N N
KAS IFC KAS2-basic N N N
KAS IFC KAS2-bilateral-confirmation N N N
KAS IFC KAS2-Party_U-confirmation N N N
KAS IFC KAS2-Party_V-confirmation N N N
KTS IFC KTS-OAEP-basic Y N Y
KTS IFC KTS-OAEP-Party_V-confirmation N N N
KDA HKDF Y N Y
KDA ONESTEP Y N Y
KDA TWOSTEP Y N Y
KDFs
Counter KDF Y N Y
Feedback KDF Y N Y
Double Pipeline Iterator KDF Y N N
KMAC KDF Y N N
IKEv1 Y N N
IKEv2 Y N N
SNMP Y N N
SRTP Y N N
SSH Y N Y
TLS 1.2 Y N Y
TLS 1.3 Y N Y
TPM N N N
ANSX9.63 Y N Y
ANSX9.42 Y N Y
PBKDF Y N Y
Safe Primes
SafePrimes KeyGen Y N Y
SafePrimes KeyVer Y N Y

libacvp's People

Contributors

0140454 avatar abkarcher avatar ashman-p avatar bfussell avatar elliemdaw avatar fliphil avatar fluffy avatar hbooth avatar jfigus avatar kritner avatar nayrpg avatar randallsteck avatar sam1689 avatar samuel40791765 avatar thinqsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libacvp's Issues

Compilation warnings under clang

I wanted to raise that there are compilation warnings under clang. Thanks!

gcc  -g -O0 -fPIC -Wall -c acvp_transport.c -o acvp_transport.o
acvp_transport.c:371:12: warning: comparison of constant 200 with expression of type 'ACVP_RESULT'
      (aka 'enum acvp_result') is always true [-Wtautological-constant-out-of-range-compare]
    if (rv != 200) {
        ~~ ^  ~~~
acvp_transport.c:401:12: warning: comparison of constant 200 with expression of type 'ACVP_RESULT'
      (aka 'enum acvp_result') is always true [-Wtautological-constant-out-of-range-compare]
    if (rv != 200) {
        ~~ ^  ~~~
acvp_transport.c:434:12: warning: comparison of constant 200 with expression of type 'ACVP_RESULT'
      (aka 'enum acvp_result') is always true [-Wtautological-constant-out-of-range-compare]
    if (rv != 200) {
        ~~ ^  ~~~
3 warnings generated.


bos-mppbj:libacvp jbonci$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Invalid vendorId error

Invalid vendor id error is returned, when the following command was issued,
./app/acvp_app --verbose --rsa --vector_upload rsa_keygen_rsp.json --fips_validation metadata/validation.json

***ACVP [ERR][find_vendor:328]--> Invalid 'id' (11532)
***ACVP [ERR][acvp_oe_ingest_metadata:3356]--> Failed to parse 'modules' from metadata JSON
Failed to read validation_metadata_file

But, when we check the following (demo env):
./app/acvp_app --get /acvp/v1/vendors/11532,
vendor information is returned properly.

In addition to the vendor Id, so far we have also posted address, person, oe, and module, and gotten approved Ids for them from the NIST demo environment.
What could be causing the invalid vendor Id? vendorId is defined as an attribute in the 'modules' block in validation.json. 'id' field in the 'modules' block is left as 1.

Unable to login -- 403 "Forbidden" Error

Hi,

While connecting to the NIST demo server using libacvp acvp_app, I get the 403 error. The session log is listed below.

$ ./app/acvp_app --aes --verbose

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE:    /Users/yeongk/imprivata/stash/libacvp/certs/mozzila_trust_anchors.pem
ACV_CERT_FILE:  /Users/yeongk/imprivata/dev/nist/demo.cer
ACV_KEY_FILE:   /Users/yeongk/imprivata/dev/nist/private_key.pem

***ACVP [STATUS][acvp_login:2320]--> Logging in...
***ACVP [INFO][acvp_http_user_agent_handler:477]--> HTTP User-Agent: libacvp/1.0;Darwin;18.7.0;x86_64;Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz;GCC/4.2.1

***ACVP [INFO][log_network_status:1439]--> POST Login...
Status: 403
Url: https://demo.acvts.nist.gov:443/acvp/v1/login
Resp: Recieved

***ACVP [ERR][log_network_status:1466]--> 403 error received from server. Message:
***ACVP [ERR][log_network_status:1467]--> <title>Error</title>Forbidden
***ACVP [STATUS][acvp_login:2332]--> Login Send Failed
***ACVP [ERR][acvp_run:2969]--> Failed to login with ACVP server

My env setting is as follows:
$ set | grep ACV
ACV_API_CONTEXT=acvp/
ACV_CA_FILE=/Users/yeongk/imprivata/stash/libacvp/certs/mozzila_trust_anchors.pem
ACV_CERT_FILE=/Users/yeongk/imprivata/dev/nist/demo.cer
ACV_KEY_FILE=/Users/yeongk/imprivata/dev/nist/private_key.pem
ACV_SERVER=demo.acvts.nist.gov
ACV_TOTP_SEED=YyWJflb70CJ7l135LM/4Jog0visDgmkEqWFFeEmQfeG6KzWt0Nyl3XmN2okwnOVc8/9xLM12 <== obfuscated

Any help would be greatly appreciated.

Thanks

KAT dispatch error: crypto module failed the operation

After obtaining rsa_keygen_req.json via ./app/acvp_app --rsa --vector_req, rsa_keygen_req.json was processed locally against a target crypto module to produce rsa_keygen_rsp.json.
When the following command was issued, however, an error shows up, "KAT dispatch error -- crypto module failed the operation" as follows:

$ ./app/acvp_app --rsa --vector_req rsa_keygen_req.json --vector_rsp rsa_keygen_rsp.json --verbose

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE:    /Users/yeongk/imprivata/stash/libacvp/certs/mozzila_trust_anchors.pem        
ACV_CERT_FILE:  /Users/yeongk/imprivata/dev/nist/Imprivata_Yeong_Kim_Demo.pem
ACV_KEY_FILE:   /Users/yeongk/imprivata/dev/nist/onesign_private_key.pem

***ACVP [STATUS][acvp_run_vectors_from_file:864]--> Beginning offline processing of vector sets...
***ACVP [INFO][acvp_run_vectors_from_file:923]--> Received vsid_url=/acvp/v1/testSessions/83110/vectorSets/198701
***ACVP [STATUS][acvp_dispatch_vector_set:2501]--> Processing vector set: 198701
***ACVP [STATUS][acvp_dispatch_vector_set:2502]--> Algorithm: RSA
***ACVP [INFO][acvp_rsa_keygen_kat_handler:496]--> Test group: 0
***ACVP [INFO][acvp_rsa_keygen_kat_handler:497]--> infoGenByServer: true
***ACVP [INFO][acvp_rsa_keygen_kat_handler:498]--> pubExpMode: fixed
***ACVP [INFO][acvp_rsa_keygen_kat_handler:499]--> keyFormat: standard
***ACVP [INFO][acvp_rsa_keygen_kat_handler:500]--> modulo: 2048
***ACVP [INFO][acvp_rsa_keygen_kat_handler:506]--> Found new RSA test vector...
***ACVP [INFO][acvp_rsa_keygen_kat_handler:511]--> Test case: 0
***ACVP [INFO][acvp_rsa_keygen_kat_handler:512]--> tcId: 1
***ACVP [ERR][acvp_rsa_keygen_kat_handler:585]--> ERROR: crypto module failed the operation
***ACVP [ERR][acvp_run_vectors_from_file:945]--> KAT dispatch error

Tracing the libacvp code, looks like the error was triggered by (cap->crypto_handler)(&tc) returning a value of 1. At that time, I see cap->crypto_handler shows the following value:
0x0000000100009760 (acvp_app`app_rsa_keygen_handler at app_rsa.c:303)

Any insight on why this crypto module failure error shows up?

Thanks

libacvp cant accsee to demo server

I am test libacvp. Please help me to check the log that I run the app of libacvp to access to demo server . Do you have any opinion to slove this problem

**root@hexiang-VirtualBox:/work/lib/libacvp# ./acvp_app

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: acvp/home
ACV_CA_FILE:    certs/acvp.nist.gov.crt
ACV_CERT_FILE:  kevin.micciche_hpe_server.cer
ACV_KEY_FILE:   myserver.key

POST [
{
"acvVersion": "0.4"
},
{
"password": "49464120"
}
]
***ACVP [ERR][acvp_curl_http_post:265]--> Curl failed with code 58 (Problem with the local SSL certificate)

***ACVP [ERR][acvp_curl_http_post:281]--> HTTP response: 0

***ACVP [ERR][acvp_send_login:568]--> Unable to register with ACVP server. curl rv=0

***ACVP [STATUS][acvp_register:994]--> Login Response Failed (null)
*ACVP [STATUS][acvp_register:997]--> Login Send Failed
Failed to register with ACVP server (rv=3)

Peer certificate cannot be authenticated: Failed to register with ACVP server

This is the error I'm seeing when I try ti connect to ACVP server. When I use "acvp.nist.gov" for ACV_SERVER I get "Couldn't resolve host name" error which is why I'm using demo server.

amritha@thorath-vm:~/cavp_tool/libacvp-master$ ./app/acvp_app

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: acvp
ACV_CA_FILE:    certs/demo.server.crt
ACV_CERT_FILE:  certs/CSR_athorath-corsec.cer
ACV_KEY_FILE:   certs/privateKey.pem

POST [
{
"acvVersion": "0.4"
},
{
"password": "38026102"
}
]
***ACVP [ERR][acvp_curl_http_post:267]--> Curl failed with code 60 (Peer certificate cannot be authenticated with given CA certificates)

***ACVP [ERR][acvp_curl_http_post:283]--> HTTP response: 0

***ACVP [ERR][acvp_send_login:616]--> Unable to register with ACVP server. curl rv=0

***ACVP [STATUS][acvp_register:1069]--> Login Response Failed (null)
***ACVP [STATUS][acvp_register:1072]--> Login Send Failed
Failed to register with ACVP server (rv=3)

All the certificates and keys are under certs folder:

amritha@thorath-vm:~/cavp_tool/libacvp-master$ ls -l certs/
total 284
-rw-rw-r-- 1 amritha amritha 1566 Oct 15 15:10 acvp.nist.gov.crt
-rw-rw-r-- 1 amritha amritha 1398 Oct 15 15:11 CSR_athorath-corsec.cer
-rw-rw-r-- 1 amritha amritha 2256 Oct 22 13:07 demo.server.crt
-rw-rw-r-- 1 amritha amritha 274340 Oct 15 15:10 mozzila_trust_anchors.pem
-r--r----- 1 amritha amritha 1704 Oct 15 15:11 privateKey.pem

Any help is appreciated!

nist_setup parameters not sticking

Hey there,

Hoping this is an error on my part but I am trying out the newest code to simply show acvp working on Openssl but have hit a snag.

I successfully built acvp_app using the steps shown on the main page, updated my scripts/nist_setup.sh with the info I had from the last time I ran it (back in Sept/Oct), ran it (./scripts/nist_setup.sh) and then tried running ./app/acvp_app but I'm seeing this:

Using the following parameters:

ACV_SERVER:     127.0.0.1
ACV_PORT:       443
ACV_URI_PREFIX:
ACV_CA_FILE:    certs/acvp-private-root-ca.crt.pem
ACV_CERT_FILE:  certs/my-client-cert.pem
ACV_KEY_FILE:   certs/my-client-key.pem

Failed to get TOTP seed

POST [
{
"acvVersion": "0.5"
},
{
"password": ""
}
]
***ACVP [ERR][acvp_curl_http_post:270]--> Curl failed with code 7 (Couldn't connect to server)

***ACVP [ERR][acvp_curl_http_post:286]--> HTTP response: 0

***ACVP [ERR][acvp_send_internal:512]--> Unable to register |https://127.0.0.1:443/login| with ACVP server. curl rv=0

(null)***ACVP [STATUS][acvp_register:1202]--> Login Send Failed (null)
Failed to register with ACVP server (rv=3)

Which is odd because in my scripts/nist_setup.sh file I have the CA_FILE, CERT_FILE and KEY_FILE all a different names to what is shown above (which looks like defaults, or do they get renamed?) Is this intentional? Also, since it's been a while since I last successfully ran the demo, would I need to poke NIST again for a new TOTP seed? Or should the one I have suffice?

Thanks so much!

Unable to login to demo.acvts.nist.gov; 401 error received

Hello

We are facing a issue which states : 401 error received from server and the message is "The supplied one time password could not be verified". Can you please help us on how we can proceed further ?

Additional details:

Steps:
git pull
configure, make

Script file details:
$cat scripts/nist_setup.sh
export ACV_URI_PREFIX=/acvp/v1/
export ACV_API_CONTEXT=acvp/
export ACV_CA_FILE=certs/acvp.nist.gov.crt
export ACV_KEY_FILE=<path_of_key_file/key_file>
export ACV_CERT_FILE=<path_of_certs_file/certificate_file>
export ACV_TOTP_SEED="A30YEfyjqh/QWvaFltvujukj5ujNQxhUzXd7xF5I7Oc=" <Note: this is not actual seed obtained>
export ACV_PORT=443
export ACV_SERVER=demo.acvts.nist.gov

command executed:
./app/acvp_app --sample --aes

output:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE:    certs/acvp.nist.gov.crt
ACV_CERT_FILE:  <path_of_certs_file/certificate_file>
ACV_KEY_FILE:  <path_of_key_file/key_file>

***ACVP [STATUS][acvp_login:2320]--> Logging in...
***ACVP [WARN][acvp_http_user_agent_check_env_for_var:210]--> Unable to collect info for HTTP user-agent - please define ACV_OE_OSNAME (32 char max.)
***ACVP [WARN][acvp_http_user_agent_check_env_for_var:210]--> Unable to collect info for HTTP user-agent - please define ACV_OE_OSVERSION (64 char max.)
***ACVP [WARN][acvp_http_user_agent_check_env_for_var:210]--> Unable to collect info for HTTP user-agent - please define ACV_OE_ARCHITECTURE (16 char max.)
***ACVP [WARN][acvp_http_user_agent_check_env_for_var:210]--> Unable to collect info for HTTP user-agent - please define ACV_OE_PROCESSOR (64 char max.)
***ACVP [ERR][log_network_status:1466]--> 401 error received from server. Message:
***ACVP [ERR][log_network_status:1467]--> {
"acvVersion" : "1.0",
"error" : "The supplied one time password could not be verified"
}
***ACVP [STATUS][acvp_login:2332]--> Login Send Failed
***ACVP [ERR][acvp_run:2964]--> Failed to login with ACVP server

Time sync'd with time-b-b.nist.gov using NTP and current time in system is:

Mon Apr 13 14:08:56 CDT 2020

Other system Environment:
AIX 7.2 on Power 7
gcc (GCC) 8.3.0
openssl 1.0.2t version

We further checked with Jason Arnold regarding the cert and TOTP seed, he collected the relevant files from us and confirmed that it is working in his environment. So, clearly we are missing something in our client environment which does not satisfy demo server. Can you please provide your inputs ?
Thanks

RSA verify tests all fail the verification

I don't think this is an environment issue because all other RSA tests work.
However, before spending time on this I recommend testing in your environment
as well as a working jenkins job,

CMAC crashes

Haven't dug in too much, but appears CMAC AES seg faults in the latest code.
CMAC-TDES has the same issue. Could be my environment, but appears to be
stack corruption.

invalid chunk

Hello

I want to validate my test vectors for an aes on dev server thanks to this command:
./app/acvp_app --aes --vector_upload ./test_rsp.json --fips_validation ./metadata/validation.json --verbose
and I have this error message
***ACVP [STATUS][acvp_upload_vectors_from_file:1016]--> Uploading vectors from response file... ***ACVP [INFO][acvp_upload_vectors_from_file:1087]--> Received vsid_url=/acvp/v1/testSessions/76834/vectorSets/169553 malloc_consolidate(): invalid chunk size
I don't understand my error because I use the default validation.json

Can you help me please ?

Best regards

Errors building on Ubuntu

I have openssl 1.0.2, and libcurl installed and configured. When I run the Makefile I end up with this output...

acvp_app-app_aes.o: In function `app_aes_handler':
/home/ubuntu/Documents/libacvp/app/app_aes.c:48: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ubuntu/Documents/libacvp/app/app_aes.c:236: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ubuntu/Documents/libacvp/app/app_aes.c:263: undefined reference to `EVP_CIPHER_CTX_reset'
acvp_app-app_aes.o: In function `app_aes_keywrap_handler':
/home/ubuntu/Documents/libacvp/app/app_aes.c:289: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ubuntu/Documents/libacvp/app/app_aes.c:296: undefined reference to `EVP_aes_128_wrap'
/home/ubuntu/Documents/libacvp/app/app_aes.c:302: undefined reference to `EVP_aes_256_wrap'
/home/ubuntu/Documents/libacvp/app/app_aes.c:299: undefined reference to `EVP_aes_192_wrap'
acvp_app-app_aes.o: In function `app_aes_handler_aead':
/home/ubuntu/Documents/libacvp/app/app_aes.c:382: undefined reference to `EVP_CIPHER_CTX_reset'
acvp_app-app_des.o: In function `app_des_handler':
/home/ubuntu/Documents/libacvp/app/app_des.c:171: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ubuntu/Documents/libacvp/app/app_des.c:103: undefined reference to `EVP_CIPHER_CTX_iv'
/home/ubuntu/Documents/libacvp/app/app_des.c:143: undefined reference to `EVP_CIPHER_CTX_reset'
acvp_app-app_hmac.o: In function `app_hmac_handler':
/home/ubuntu/Documents/libacvp/app/app_hmac.c:61: undefined reference to `HMAC_CTX_new'
/home/ubuntu/Documents/libacvp/app/app_hmac.c:86: undefined reference to `HMAC_CTX_free'
acvp_app-app_sha.o: In function `app_sha_handler':
/home/ubuntu/Documents/libacvp/app/app_sha.c:65: undefined reference to `EVP_shake128'
/home/ubuntu/Documents/libacvp/app/app_sha.c:82: undefined reference to `EVP_MD_CTX_new'
/home/ubuntu/Documents/libacvp/app/app_sha.c:135: undefined reference to `EVP_DigestFinalXOF'
/home/ubuntu/Documents/libacvp/app/app_sha.c:154: undefined reference to `EVP_MD_CTX_free'
/home/ubuntu/Documents/libacvp/app/app_sha.c:69: undefined reference to `EVP_shake256'
/home/ubuntu/Documents/libacvp/app/app_sha.c:49: undefined reference to `EVP_sha3_224'
/home/ubuntu/Documents/libacvp/app/app_sha.c:53: undefined reference to `EVP_sha3_256'
/home/ubuntu/Documents/libacvp/app/app_sha.c:57: undefined reference to `EVP_sha3_384'
/home/ubuntu/Documents/libacvp/app/app_sha.c:61: undefined reference to `EVP_sha3_512'
acvp_app-app_utils.o: In function `hmac_totp':
/home/ubuntu/Documents/libacvp/app/app_utils.c:124: undefined reference to `HMAC_CTX_new'
/home/ubuntu/Documents/libacvp/app/app_utils.c:137: undefined reference to `HMAC_CTX_free'
collect2: error: ld returned 1 exit status
make[1]: *** [acvp_app] Error 1

This is from the current version of master. Do you have any idea if this is on my side? Or how to debug?

HTTP body doesn't contain top-level JSON object

Hello,

I'm having troubles on running the libacvp app on a Debian x86-64 PC.

Here's the output I have from my PC:

$ ./app/acvp_app 
Requires at least 1 Algorithm Test Suite

Invalid usage...
[...]

So, I tried to test at least one algorithm:

$ ./app/acvp_app --aes

Using the following parameters:

    ACV_SERVER:     demo.acvts.nist.gov
    ACV_PORT:       443
    ACV_URI_PREFIX: acvp/home/
    ACV_CA_FILE:    certs/acvp.nist.gov.crt
    ACV_CERT_FILE:  <certificate received from NIST>
    ACV_KEY_FILE:  <private key related to the certificate>

***ACVP [ERR][inspect_http_code:610]--> HTTP body doesn't contain top-level JSON object
***ACVP [STATUS][log_network_status:818]--> POST Login...
	Status: 401
	Url: https://demo.acvts.nist.gov:443/acvp/home/login
	Resp:
<html><head><title>JBWEB000065: HTTP Status 401 - JBWEB000010: Cannot authenticate with the provided credentials</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 401 - JBWEB000010: Cannot authenticate with the provided credentials</h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u>JBWEB000010: Cannot authenticate with the provided credentials</u></p><p><b>JBWEB000069: description</b> <u>JBWEB000121: This request requires HTTP authentication.</u></p><HR size="1" noshade="noshade"></body></html>

***ACVP [STATUS][acvp_register:1064]--> Login Send Failed
***ACVP [ERR][acvp_run:1738]--> Failed to register with ACVP server

I am not able to get where the issue is, since I'm using all the stuff provided by NIST (certificate and TOTP seed)... Any support on this is very appreciated!

Thanks in advance

Make error with EVP_CIPHER_CTX_FLAG_UNWRAP_WITHPAD undeclared

I am running 64 bit Ubuntu 18.04. Calling make exits with this error:

app_main.c: In function ‘app_aes_keywrap_handler’:
app_main.c:2969:50: error: ‘EVP_CIPHER_CTX_FLAG_UNWRAP_WITHPAD’ undeclared (first use in this function); did you mean ‘EVP_CIPHER_CTX_FLAG_WRAP_ALLOW’?
EVP_CIPHER_CTX_set_flags(cipher_ctx, EVP_CIPHER_CTX_FLAG_UNWRAP_WITHPAD);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EVP_CIPHER_CTX_FLAG_WRAP_ALLOW
app_main.c:2969:50: note: each undeclared identifier is reported only once for each function it appears in
At top level:
app_main.c:5402:19: warning: ‘base64en’ defined but not used [-Wunused-const-variable=]
static const char base64en[] = {
^~~~~~~~
Makefile:401: recipe for target 'app_main.o' failed
make[1]: *** [app_main.o] Error 1
make[1]: Leaving directory '/home/my_name/libacvp/app'
Makefile:387: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

And then make install subsequently also fails and acvp_app is not built. gcc also returns this error on Centos7. Ubuntu has openssl 1.1.0 and Centos7 has openssl 1.0.2. Taking the compiler's suggestion and replacing EVP_CIPHER_CTX_FLAG_UNWRAP_WITHPAD with EVP_CIPHER_CTX_FLAG_WRAP_ALLOW works and allows me to connect to the demo server on both Ubuntu and Centos7. Although the substitution works they do not seem interchangeable- I would be interested to know if others can replicate this error on their setup.

Error running the configure script

Excerpt from config.log

/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_get_error@OPENSSL_1.0.0'

/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_get_certificate@OPENSSL_1.0.0'

/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcurl.so: undefined reference to `UI_method_get_reader@OPENSSL_1.0.0'

...
...
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcurl.so: undefined reference to `X509_LOOKUP_file@OPENSSL_1.0.0'

/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_set_fd@OPENSSL_1.0.0'

/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcurl.so: undefined reference to `ENGINE_get_id@OPENSSL_1.0.0'

collect2: error: ld returned 1 exit status

My settings/paths to libs are shown below:

amritha@thorath-vm:~/cavp_tool$ set | grep LIBRARY
LD_LIBRARY_PATH=/home/amritha/ssl/lib

amritha@thorath-vm:~/cavp_tool$ curl -V
curl 7.59.0 (x86_64-pc-linux-gnu) libcurl/7.59.0 OpenSSL/1.0.2j zlib/1.2.8
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

amritha@thorath-vm:~/cavp_tool$ ls /home/amritha/ssl/
aes des ecdh fipsalgtest.pl fips.c fipsld fips_premain.c fips_test_suite.c include mkfipsscr.pl sha utl
bin dh ecdsa fips_auth.h fips_canister.c fips_locl.h fips_premain.c.sha1 fips_utl.h lib rand ssl
cmac dsa fips fips_auth.in fips.h fips_post.c fipssyms.h hmac Makefile rsa tools

amritha@thorath-vm:~/cavp_tool$ ls /home/amritha/ssl/lib/
engines fipscanister.o.sha1 fips_premain.c.sha1 libcrypto.so libssl.a libssl.so.1.0.0
fipscanister.o fips_premain.c libcrypto.a libcrypto.so.1.0.0 libssl.so pkgconfig

amritha@thorath-vm:~/cavp_tool/libacvp-master$ ./configure --with-ssl-dir=/home/amritha/ssl --with-libcurl-dir=/home/amritha/cavp_tool/curl-7.59.0
...
...
configure: error: in /home/amritha/cavp_tool/libacvp-master': configure: error: --with-libcurl was given, but test for libcurl failed See config.log' for more details

CROSS_COMPILE issue

./configure --host=arm-linux --with-ssl-dir=$(OPENSSL_DIR)/$(OBJDIR) --with-libcurl-dir=$(ARUBA_SRC)/utils/curl-7.52.1/arubainstall/$(OBJDIR)

Cross compile the libacvp failed . What is other parameter that need to be setted when I cross compile the libacvp.

HTTP response: 401

Hey guys, I'm hoping you have an idea of what I could be missing.

I generated my RSA key pair along with the CSR and sent it off to NIST. Got my TOTP seed and certificate back from them so thought I would be good to go. I am using a Centos 7 machine as my client, openssl 1.0.2k-fips, TLSv1.2 and curl is installed and working.

My nist_setup.sh file looks like this:
#!/bin/bash
export ACV_URI_PREFIX=acvp/
export ACV_CA_FILE=certs/demo_cert_ACVP.crt <- Grabbed using "openssl s_client"
export ACV_KEY_FILE=certs/acvp.key <- RSA private key used for the CSR
export ACV_CERT_FILE=certs/demo.cer <- NIST certificate returned to me
export ACV_TOTP_SEED=(long string of text) <- Contents of my seed.txt from NIST
export ACV_PORT=443
export ACV_SERVER=demo.acvts.nist.gov

But when I run "./acvp_app -info" I get the following:
./acvp_app -info
Using the following parameters:
ACV_SERVER: demo.acvts.nist.gov
ACV_PORT: 443
ACV_URI_PREFIX: acvp/
ACV_CA_FILE: certs/demo_cert_ACVP.crt
ACV_CERT_FILE: certs/demo.cer
ACV_KEY_FILE: certs/acvp.key
POST [
{
"acvVersion": "0.4"
},
{
"password": (digits)
}
]
***ACVP [INFO][acvp_curl_log_peer_cert:84]--> TLS peer presented the following 0 certificates...
***ACVP [ERR][acvp_curl_http_post:280]--> HTTP response: 401
***ACVP [ERR][acvp_send_login:541]--> Unable to register with ACVP server. curl rv=401
***ACVP [STATUS][acvp_register:5142]--> Login Response Failed {
"acv_version" : "0.4",
"error" : "The supplied one time password could not be verified"
}
***ACVP [STATUS][acvp_register:5145]--> Login Send Failed
Failed to register with ACVP server (rv=3)

And I'm a bit confused. Any idea what could possibly be causing the password to not be verified? Tried a few changes, but otherwise I should have everything I need.

Thanks so much! Any help is very appreciated :)

Questions about performing fips validation for specific modes

Hello,

I have some questions about performing a fips validation for a specific algorithm using libacvp:

Say I wanted to perform a fips validation for only AES CBC and ECB modes. Currently when I download aes vectors using the command:

./app/acvp_app --aes --vector_req ./vectors

I receive vector sets for all AES algorithms.
After processing only AES and CBC vector sets and performing a fips validation using commands:

./app/acvp_app --post ./metadata/person.json
./app/acvp_app --aes --vector_upload JSONresponses --fips_validation ./metadata/validation.json --verbose

I get the following error:

***ACVP [ERR][acvp_get_result_test_session:2618]--> Missing submissions for one or more vector sets. Please submit responses for all vector sets.
***ACVP [ERR][acvp_validate_test_session:2801]--> This testSession cannot be certified. Required disposition == 'pass'.

  1. How can I use libacvp to download only the vectorsets that correspond to specific modes such as ECB and CBC? If this is possible, where in the app source code would I make this modification?

Support for KDF108 - requiresEmptyIv?

I noticed "typedef enum acvp_kdf108_param" doesn't currently have a param of:

ACVP_KDF108_REQUIRES_EMPTY_IV

in support of the below JSON value:

https://usnistgov.github.io/ACVP/artifacts/acvp_sub_kdf108.html#rfc.section.2.4
"requiresEmptyIv | Whether the IUT requires an empty IV for Feedback KDF. | boolean | true/false"

Feature was mentioned from the below github post:
usnistgov/ACVP#729

Was this going to be added eventually, or should I not look to support it on my ACVP client?

A couple of questions while using Cisco runtime libacvp

Hello,

Currently, I am able to talk with ACVP demo server by using Cisco Runtime libacvp app and successfully perform AES, TDES, CMAC, SHA and HMAC tests (the Crypto Module is OpenSSL 1.1.1). How ever, I ran into a couple questions about how to find out the vendorID and how to create a new testSession.

Question 1: Regarding how to find out the newly created VendorID, below is the details of what I did:

  1. Went to /libacvp/metadata# path and modified original vendor.json file to match the new vendor information and saved the edits.
  2. Ran command './app/acvp_app --post ./metadata/vendor.json /acvp/v1/vendors' to ask for creating a new vendor at ACVP demo server.
  3. Obtained the response as below.
    "acvVersion" : "1.0"
    }, {
    "url" : "/acvp/v1/requests/1484",
    "status" : "initial"
    } ]

(My understanding is that the number 1484 is the new Vendor Request ID. Please correct me if i am wrong.)
4. Issued the command './app/acvp_app --get /acvp/v1/vendors/1484' to check if the new vendor information that was edited in the vendor.json file has been accepted by ACVP server.
5. However, I got the following response:
***ACVP [STATUS][log_network_status:1362]--> GET...
Status: 200
Url: https://demo.acvts.nist.gov:443/acvp/v1/vendors/1484
Resp:
[ {
"acvVersion" : "1.0"
}, {
"url" : "/acvp/v1/vendors/1484",
"name" : "INTEGRITY Security Services",
"website" : "www.ghs.com",
"emails" : [ ],
"phoneNumbers" : [ ],
"contactsUrl" : "/acvp/v1/vendors/1484/contacts",
"addresses" : [ {
"url" : "/acvp/v1/vendors/1484/addresses/1484",
"street1" : "7585 Irvine Center Dr.",
"street2" : "Suite 250",
"street3" : null,
"locality" : "Irvine",
"region" : "CA",
"country" : "USA",
"postalCode" : "92618"
} ]
} ]

It looks like the vendor information displayed after command '--get /acvp/v1/vendors/1484' is not the one that i edited in my vendor.json. Any suggestions?

Question 2: To create a New testSession intended for a demo server certificate, can you please provide me with an example command? I used command '--post testSessions', but it reported an error. Please see below.

root@acvp1:~/richard-libacvp/libacvp# ./app/acvp_app --post testSessions

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE:    /root/libacvp-master/certs/acvp.nist.gov.crt
ACV_CERT_FILE:  /root/libacvp-master/GSS-ACVP.cer
ACV_KEY_FILE:   /root/libacvp-master/GSS-ACVP.pem

***ACVP [STATUS][log_network_status:1397]--> POST Login...
Status: 200
Url: https://demo.acvts.nist.gov:443/acvp/v1/login
Resp:
[ {
"acvVersion" : "1.0"
}, {
"accessToken" : "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjNDI5NWYwMC1jZGJjLTRkYTYtYWJjNy0xMjJmNTlmYzYyZDMiLCJpYXQiOjE1NzU3NTE2MDQsInN1YiI6IjEuMi44NDAuMTEzNTQ5LjEuOS4xPSMxNjE4NDU2NDRkNmY3MjcyNjk3MzQwNDc2ZjczNzM2MTZkNjU3MjUzNjU2MzJlNjM2ZjZkLENOPU5WTEFQIExhYiBDb2RlIDIwMDk5Ny0wLE9VPUNTVEwsTz1Hb3NzYW1lcixMPUNhdG9uc3ZpbGxlLFNUPU1hcnlsYW5kLEM9VVMiLCJpc3MiOiJOSVNUIEFDVlRTIiwiZXhwIjoxNTc1NzUzNDA0fQ.BVgMfjhDPov8DXU2KfPMbYVLeoH4YNYdgmfFNc8Mzcc",
"largeEndpointRequired" : true,
"sizeConstraint" : 4194304
} ]

***ACVP [STATUS][acvp_parse_login:1713]--> JWT: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjNDI5NWYwMC1jZGJjLTRkYTYtYWJjNy0xMjJmNTlmYzYyZDMiLCJpYXQiOjE1NzU3NTE2MDQsInN1YiI6IjEuMi44NDAuMTEzNTQ5LjEuOS4xPSMxNjE4NDU2NDRkNmY3MjcyNjk3MzQwNDc2ZjczNzM2MTZkNjU3MjUzNjU2MzJlNjM2ZjZkLENOPU5WTEFQIExhYiBDb2RlIDIwMDk5Ny0wLE9VPUNTVEwsTz1Hb3NzYW1lcixMPUNhdG9uc3ZpbGxlLFNUPU1hcnlsYW5kLEM9VVMiLCJpc3MiOiJOSVNUIEFDVlRTIiwiZXhwIjoxNTc1NzUzNDA0fQ.BVgMfjhDPov8DXU2KfPMbYVLeoH4YNYdgmfFNc8Mzcc
***ACVP [ERR][acvp_post_data:2480]--> JSON val parse error
root@acvp1:~/richard-libacvp/libacvp#

It would be very appreciated for any suggestions.

Thanks!

ACVP_NO_RUNTIME

I dont understand the mean of ACVP_NO_RUNTIME.
What is effect to acvp when i define ACVP_NO_RUNTIME

Validation error on JSON payload when requesting Vectors for KDF108 DPI

I'm having trouble requesting vectors for KDF108 Mode DPI with any arrangement of parameters. This isn't through the libacvp sample app, but through my own application which uses the libacvp library.

Counter and Feedback modes work fine. Below is the output of two different attempts.
I've viewed the ACVP_CTX *ctx structure in memory after calling acvp_cap_kdf108_set_parm() and it loads the DPI variables correctly. I've reviewed the acvp_build_kdf108_register_cap() definition code, and couldn't find anything odd on how the json object is getting built for DPI. I have not tried this request with the sample app.

***ACVP [STATUS][acvp_login:2340]--> Login successful

***ACVP [STATUS][acvp_register:1854]--> Building registration of capabilities...

***ACVP [STATUS][acvp_register:1860]--> Sending registration of capabilities...

***ACVP [INFO][acvp_register:1861]--> [{"acvVersion":"1.0"},{"algorithms":[{"algorithm":"KDF","revision":"1.0","prereqVals":[{"algorithm":"CMAC","valValue":"same"},{"algorithm":"HMAC","valValue":"same"},{"algorithm":"KAS","valValue":"same"},{"algorithm":"DRBG","valValue":"same"}],"capabilities":[{"kdfMode":"dpi","macMode":["CMAC-AES128","CMAC-AES192","CMAC-AES256","HMAC-SHA-1","HMAC-SHA2-224","HMAC-SHA2-256","HMAC-SHA2-384","HMAC-SHA2-512","CMAC-TDES"],"supportedLengths":[{"min":1,"max":4096,"increment":1}],"fixedDataOrder":["after fixed data","before fixed data","before iterator","none"],"counterLength":[0,8,16,24,32],"supportsEmptyIv":false}]}]}]

***ACVP [INFO][log_network_status:1442]--> POST Registration...
Status: 400
Url: https://demo.acvts.nist.gov:443/acvp/v1/testSessions
Resp: Recieved

***ACVP [ERR][log_network_status:1466]--> 400 error received from server. Message:

***ACVP [ERR][log_network_status:1467]--> [
{
"acvVersion": "1.0"
},
{
"error": "Validation error(s) on JSON payload.",
"context": [
"KDF-1.0: Error converting value \u0022dpi\u0022 to type \u0027NIST.CVP.Crypto.Common.KDF.Enums.KdfModes\u0027. Path \u0027capabilities[0].kdfMode\u0027, line 1, position 280."
]
}
]

***ACVP [ERR][acvp_register:1872]--> Failed to send registration

***ACVP [ERR][acvp_run:3007]--> Failed to register with ACVP server

------------------------Another Attempt below -----------------------------

***ACVP [STATUS][acvp_login:2340]--> Login successful

***ACVP [STATUS][acvp_register:1854]--> Building registration of capabilities...

***ACVP [STATUS][acvp_register:1860]--> Sending registration of capabilities...

***ACVP [INFO][acvp_register:1861]--> [{"acvVersion":"1.0"},{"algorithms":[{"algorithm":"KDF","revision":"1.0","prereqVals":[{"algorithm":"CMAC","valValue":"same"}],"capabilities":[{"kdfMode":"dpi","macMode":["CMAC-AES128"],"supportedLengths":[{"min":1,"max":4096,"increment":1}],"fixedDataOrder":["before fixed data"],"counterLength":[0],"supportsEmptyIv":true}]}]}]

***ACVP [INFO][log_network_status:1442]--> POST Registration...
Status: 400
Url: https://demo.acvts.nist.gov:443/acvp/v1/testSessions
Resp: Recieved

***ACVP [ERR][log_network_status:1466]--> 400 error received from server. Message:

***ACVP [ERR][log_network_status:1467]--> [
{
"acvVersion": "1.0"
},
{
"error": "Validation error(s) on JSON payload.",
"context": [
"KDF-1.0: Error converting value \u0022dpi\u0022 to type \u0027NIST.CVP.Crypto.Common.KDF.Enums.KdfModes\u0027. Path \u0027capabilities[0].kdfMode\u0027, line 1, position 164."
]
}
]

***ACVP [ERR][acvp_register:1872]--> Failed to send registration

***ACVP [ERR][acvp_run:3007]--> Failed to register with ACVP server

ECDSA KeyVer and SigVer failing

For a lack of a better place, opening an issue here.
The failures were seen with a bitbucket build since github is not currently building with FOM.

include html docs unzipped?

assuming this software would itself be compressed (eg using zip or gzip or bzip2 or xc) it does not make sense to ship the documentation inside it as a zip file. It would be better to shiip these unzipped.

Validating response files

When I run this command "./app/acvp_app --no_aes --no_tdes --no_cmac --no_hmac" it is successful. It says KATs passed. How can I upload my own response files to get it validated?

Link error on windows

Hello,
I am trying to buid and link libacvp on windows with gradle. I did the following steps :

  • build openssl.1.1.1
  • build static version of libcurl
    I modified the gradle_env.bat to point to the right directory for SSL and CURL and I set DISABLE_SAFEC=TRUE.
    I had a first error on strnlen_s in acvp files. I fixed the error by replacing strnlen_s by strnlen.
    I have other errors during link of the shared library:

Task :linkAcvpSharedLibrary FAILED
acvp_util.obj : error LNK2019: unresolved external symbol __imp_curl_global_cleanup referenced in function acvp_cleanup
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_escape referenced in function acvp_transport_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_free referenced in function acvp_transport_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_slist_append referenced in function acvp_add_auth_hdr
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_slist_free_all referenced in function acvp_curl_http_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_strerror referenced in function acvp_curl_http_post
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_init referenced in function acvp_transport_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_setopt referenced in function acvp_curl_http_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_perform referenced in function acvp_curl_http_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_cleanup referenced in function acvp_transport_get
acvp_transport.obj : error LNK2019: unresolved external symbol __imp_curl_easy_getinfo referenced in function acvp_curl_http_get
libacvp-master\build\libs\acvp\shared\acvp.dll : fatal error LNK1120: 11 unresolved externals

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':linkAcvpSharedLibrary'.

Do you have an idea of what could be the failure root cause ?
Thanks in advance.

how to build libacvp.so only?

Hi,
I want to build libacvp.so only. How could I do that?
I think libacvp.so is only depended on libcurl, so maybe we can just build this dynamic library with libcurl header files. And when build app or write my own app, I will link them all togther.

Issue with connecting to server

I'm trying to build the latest version of software and seem to have difficulties connecting to server.
I've shown the error and set up below:

$ ./app/acvp_app --all_algs --sample

Using the following parameters:

ACV_SERVER:     demo.acvp.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: acvp/v1/
ACV_CA_FILE:    certs/acvp.nist.gov.crt
ACV_CERT_FILE:  certs/CSR_athorath-corsec.cer
ACV_KEY_FILE:   certs/privateKey.pem

***ACVP [ERR][acvp_curl_http_post:323]--> Curl failed with code 6 (Couldn't resolve host name)

***ACVP [STATUS][log_network_status:885]--> POST Login...
Status: 0
Url: https://demo.acvp.nist.gov:443/acvp/v1/login
Resp:
(null)

***ACVP [STATUS][acvp_register:1396]--> Login Send Failed
***ACVP [ERR][acvp_run:2142]--> Failed to register with ACVP server

I tried to use "acvp/" for ACV_URI_PREFIX (excluded /v1/) but still can't connect.

$ ./app/acvp_app --all_algs --sample

Using the following parameters:

ACV_SERVER:     demo.acvp.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: acvp/
ACV_CA_FILE:    certs/acvp.nist.gov.crt
ACV_CERT_FILE:  certs/CSR_athorath-corsec.cer
ACV_KEY_FILE:   certs/privateKey.pem

***ACVP [ERR][acvp_curl_http_post:323]--> Curl failed with code 6 (Couldn't resolve host name)

***ACVP [STATUS][log_network_status:885]--> POST Login...
Status: 0
Url: https://demo.acvp.nist.gov:443/acvp/login
Resp:
(null)

***ACVP [STATUS][acvp_register:1396]--> Login Send Failed
***ACVP [ERR][acvp_run:2142]--> Failed to register with ACVP server

I've run the client before and there's no change in my keys or certs.

Curl version and LD_LIBRARY_PATH shown below:

$ echo $LD_LIBRARY_PATH
/home/amritha/cavp_tool/curl-7.59.0/lib:/home/amritha/ssl/lib

$ curl -V
curl 7.59.0 (x86_64-pc-linux-gnu) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.8 librtmp/2.3
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

Get demo certificate number

Hello,
I have some troubles with the libacvp.
I succeeded to generate a testSession.json thanks to the command ./app/acvp --sample
but i can not generate or find the certificate number.
Can you help me please ? What is the command please ?

Thanks for advance

A few questions for libacvp offline testing

Hello,

I have a few questions about the use of Cisco runtime libacvp or non-runtime libacvp, detailed as below.

  1. I need to get the request test vectors (.req) from the ACVP server, then load them into the tested crypto module for algo testing, and then upload the response files (.rsp) back to ACVP server for validation. In this sort of Non-Real Time case, should I build the Runtime libacvp or non-Runtime libacvp? Is Runtime libacvp referenced to the Real time? If not, What are the major differences between the runtime and non-runtime libacvp?

  2. The README file under \libacvp-master\ introduces two Building methods for the cases of Runtime and non-Runtime application respectively. Currently, we are using OpenSSL v1.1.1 as the crypto module running in our testing machine that will be used to talk with ACVP server. In that case, to get the request test vectors (.req) from ACVP server, can we just use Runtime libacvp?

  3. Below are the instructions from README file, test offline:
    a) Download vectors on network accessible device
    ./app/acvp_app -- --vector_req
    b) Copy vectors and acvp_app to target
    ./app/acvp_app --all_algs --vector_req --vector_rsp
    c) Copy respones(filename2) to network accessible device
    ./app/acvp_app --all_algs --vector_upload

In bullet B above, what does the parameter "--vector_rsp " do in the whole command?

Thanks,
-Richard

(ACVP_AES_XTS, tweak) typo on line 558 in acvp_build_register.c

Current line ---> switch (sym_cap->tweak->length) { ...
Should be ---> switch (sl_list->length) { ...

if (cap_entry->cipher == ACVP_AES_XTS) {
    json_object_set_value(cap_obj, "tweakMode", json_value_init_array());
    opts_arr = json_object_get_array(cap_obj, "tweakMode");
    sl_list = sym_cap->tweak;
    while (sl_list) {
        switch (sym_cap->tweak->length) {
        case ACVP_SYM_CIPH_TWEAK_HEX:
            json_array_append_string(opts_arr, "hex");
            break;
        case ACVP_SYM_CIPH_TWEAK_NUM:
            json_array_append_string(opts_arr, "number");
            break;
        default:
            break;
        }
        sl_list = sl_list->next;
    }
}

Since the switch keeps switching on the first link list nodes length/value then it builds the json with either ["hex","hex"] or ["number","number"] when two tweakModes are present in cap.

can't login acvp demo server

Hi all,
I compiled the libacvp library and then I called " app/acvp_app --all_algs --vector_req req.json"
I got the following errors: can somebody tell me how to solve it?
Thanks.
ACV_SERVER: demo.acvts.nist.gov
ACV_PORT: 443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE: /root/libacvp/certs/mozzila_trust_anchors.pem
ACV_CERT_FILE: /root/libacvp/certs/xx_Demo.cer
ACV_KEY_FILE: /root/libacvp/certs/xx_chen.key

***ACVP [STATUS][acvp_login:2320]--> Logging in...
***ACVP [ERR][log_network_status:1466]--> 400 error received from server. Message:
***ACVP [ERR][log_network_status:1467]--> {
"acvVersion" : "1.0",
"error" : "Invalid JSON input (1:23): Expected Start Object not found."
}
***ACVP [STATUS][acvp_login:2332]--> Login Send Failed
***ACVP [ERR][acvp_run:2969]--> Failed to login with ACVP server

Memory leaks due to pattern of `calloc() ; sanitize input`

I've ran an analyzer on some of the pull requests found here and see numerous memory leaks in acvp.c. As shown here, the function acvp_append_ecdsa_caps_entry around line 4222 first allocates memory then checks if the provided cipher parameter is valid and returns with failure (and without freeing the memory) if cipher is invalid. This pattern occurs in a few places in this file.

Request vectors, test and validate

Hi,

I want to request test vectors, use them to run some tests on my system and generate results. Upload these results back so that they can be validated. How do I do that?

Errors due to a git pulling

Hello,

Recently, I update my depot with a git pull and when I try to recompile with the command "make", I have this error message.
acvp.c:24:22: fatal error: safe_lib.h

It worked before and now it does not work.
What is the source of my problem ?

I try to override the problem in using the docker of libacvp but some problems appear:
with the openssl library 102 -> app_main.c:18:10: fatal error: openssl/rsa.h: not found
with the openssl library 110 -> the docker does not build.
with the openssl library 111 -> ACVP [ERR][acvp_curl_http_post:686]--> Curl failed with code 60

So to summarize:
I had one problem, I tried to resolve with 3 possible solutions but now I have 3 problems ^^
Can you help me please ?

Best regards,

Duplicate code in app_main.c

Between lines 2273 to 2461 for ACVP_HASHDRBG parameter setting

The below function call repeats for ACVP_DRBG_SHA_224 through ACVP_DRBG_SHA_512_256

rv = acvp_cap_drbg_set_parm(ctx, ACVP_HASHDRBG, ACVP_DRBG_SHA_224,
                            ACVP_DRBG_PRED_RESIST_ENABLED, 1);

Search app_main.c for ACVP_DRBG_PRED_RESIST_ENABLED and you'll see there are 6 duplicate calls to acvp_cap_drbg_set_parm for (ctx, ACVP_HASHDRBG, ACVP_DRBG_SHA_XXX,
ACVP_DRBG_PRED_RESIST_ENABLED, 1);

Request for expected result after requesting sample test vector

Hi,

I built a non-runtime libacvp application and tried to request a sample test vector and its expected answer. It looks good to have the downloaded hash test vector where the tag "isSample" is marked as true, but later I got a failed response from server while trying to get the expected answer.

Here is my testing steps.
1../acvp_app --hash --vector_req ./testvector/hash_req.json --sample --verbose

Vector sets are successfully downloaded
"vectorSetUrls": [
"/acvp/v1/testSessions/81129/vectorSets/188932",
"/acvp/v1/testSessions/81129/vectorSets/188933",
"/acvp/v1/testSessions/81129/vectorSets/188934",
"/acvp/v1/testSessions/81129/vectorSets/188935",
"/acvp/v1/testSessions/81129/vectorSets/188936"

Tag "isSample" are also marked as true
"vsId": 188932,
"algorithm": "SHA-1",
"revision": "1.0",
"isSample": true,

2../acvp_app --get /acvp/v1/testSessions/81129/vectorSets/188932/expected --verbose

Get the error message "error" : "tsId was not found in the JWT"
***ACVP [INFO][log_network_status:1445]--> POST Login...
Status: 200
Url: https://demo.acvts.nist.gov:443/acvp/v1/login
Resp: Recieved

***ACVP [STATUS][acvp_login:2109]--> Login successful
***ACVP [ERR][log_network_status:1418]--> 401 error recieved from server. Message:
***ACVP [ERR][log_network_status:1419]--> {
"acvVersion" : "1.0",
"error" : "tsId was not found in the JWT"
}
***ACVP [INFO][log_network_status:1425]--> GET...
Status: 401
Url: https://demo.acvts.nist.gov:443/acvp/v1/testSessions/81129/vectorSets/188932/expected
Resp:
{
"acvVersion" : "1.0",
"error" : "tsId was not found in the JWT"
}

GET Response: {
"acvVersion" : "1.0",
"error" : "tsId was not found in the JWT"
}

Not quite sure if I misuse the command, does anyone have idea?

Thanks,
Sean

SHA algorithm needs testing

eb6580e completes the initial code for SHA algorithms. However, this code is untested. Is anyone aware of a ACVP server that implements SHA that could be used for testing?

CA invalid

Please check the log:

root@hexiang-VirtualBox:/work/lib/libacvp# ./acvp_app

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: acvp/
ACV_CA_FILE:    certs/acvp.nist.gov.crt
ACV_CERT_FILE:  kevin.micciche_hpe_server.cer
ACV_KEY_FILE:   myserver.key

POST [
{
"acvVersion": "0.4"
},
{
"password": "09726792"
}
]
***ACVP [ERR][acvp_curl_http_post:265]--> Curl failed with code 60 (Peer certificate cannot be authenticated with given CA certificates)

***ACVP [ERR][acvp_curl_http_post:281]--> HTTP response: 0

***ACVP [ERR][acvp_send_login:568]--> Unable to register with ACVP server. curl rv=0

***ACVP [STATUS][acvp_register:994]--> Login Response Failed (null)
***ACVP [STATUS][acvp_register:997]--> Login Send Failed
Failed to register with ACVP server (rv=3)

Scripts nist_setup is outdated

The url should be updated to demo.acvts.nist.gov.

As well the key file is not produced by NIST. The user should already possess that file.

Failed to login with ACVP server

Using the following parameters:

ACV_SERVER:     demo.acvts.nist.gov
ACV_PORT:       443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE:    certs/acvp.nist.gov.crt
ACV_CERT_FILE:  kevin.micciche_hpe_server.cer
ACV_KEY_FILE:   myserver.key

***ACVP [ERR][acvp_curl_http_post:687]--> Curl failed with code 77 (Problem with the SSL CA cert (path? access rights?))

***ACVP [STATUS][log_network_status:1397]--> POST Login...
Status: 0
Url: https://demo.acvts.nist.gov:443/acvp/v1/login
Resp:
(null)

***ACVP [STATUS][acvp_login:2067]--> Login Send Failed
***ACVP [ERR][acvp_run:2585]--> Failed to login with ACVP server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.