GithubHelp home page GithubHelp logo

usnistgov / acvp-server Goto Github PK

View Code? Open in Web Editor NEW
36.0 22.0 13.0 527.04 MB

A repository tracking releases of NIST's ACVP server. See www.github.com/usnistgov/ACVP for the protocol.

C# 99.74% PLSQL 0.08% PLpgSQL 0.10% TSQL 0.08%
nist protocol acvp acvp-server cryptography nist-approved-algorithms cryptographic-algorithm-validations

acvp-server's Introduction

Automated Cryptographic Validation Test System - Gen/Vals

This project contains the code used by the National Institute of Standards and Technology (NIST) Cryptographic Algorithm Validation Program (CAVP) to generate and validate test vectors for Federal Information Processing Standard (FIPS) 140.

Jump to

ACVP-Server

An implementation of the Automated Cryptographic Validation Protocol (ACVP) for NIST. This repository will be used to track deployments and issues of the Demo and Production ACVP Servers hosted by NIST. The server implementation MAY differ from the protocol specification. We will track those differences in this repository. Some modifications may be additional requirements on top of the protocol that are NIST specific. The protocol is intended to be general purpose for any testing body to host a compliant instance.

Releases

Release notes will often be posted on this repository for both the Demo and Production NIST ACVP servers. Release notes marked as "prerelease" are for the Demo server. Notes marked as "release" are for the Prod server.

Wiki

  • See the ACVP-Server Wiki for information such as documentation on ACVP Server specific endpoints.
  • See the ACVP Protocol Wiki for information regarding protocol specific usage / FAQs.

Issues

Please report issues found on the Demo or Prod servers on this repository. Issues that can be reported here include

  • Errors generating or validating vector sets
  • Questions about the server/implementation
  • Questions about authentication
  • Noticed differences from the protocol specifications
  • Suggestions for improved tests

Questions or problems with the specifications, can be raised with issues on the protocol repository. Questions or problems with the CAVP's use of ACVP or how ACVP fits into the larger CMVP should be raised via email to a member of the CAVP.

When creating an issue, DO NOT share any secret values used for authentication. DO NOT share a JWT, and DO NOT share a TOTP seed.

Project Structure

ACVTS can be separated out into two larger components. Server structure and Gen/Vals. The server structure includes serveral projects to host the API and maintain workflows for ACVTS. The Gen/Vals includes several projects that focus on generating tests and verifying the correctness of responses. The code in this repository is only for the Gen/Vals. With this code, any one can produce vector sets for algorithms on demand without needing to contact the ACVTS API.

The Gen/Vals can be further broken out into several areas: the Crypto code, Generation code, and an Orleans server. There are also test projects for each of these components. Here is a complete list of sections:

Many of the above sections could likely be further broken down into more granular sections, like abstraction vs implementation, and testing, but these are the high level concepts of the system.

Sample Executables

The samples/ folder contains the GenValAppRunner and Orleans.ServerHost runnable applications - the only two portions of the repository you'll need to be concerned with if your intention is to just run the generation and validation processes against an algorithm registration.

The two applications in the samples folder are "wrapper" applications into the logic and abstractions of the program as a whole.

GenValAppRunner

The GenValAppRunner is a console application that takes in parameters for its "running mode" - "check", "generation" or "validation". This application can be invoked with a dotnet run from the folder containing the applications csproj file.

See Running Gen/Vals for more information.

Orleans ServerHost

The Orleans.ServerHost application is the means of distributing CPU bound work across a cluster of nodes. For the purposes of the Orleans.ServerHost sample in this repository, the application is set up to use "local" clustering. Going this route allows for the running of the GenValAppRunner using no additional infrastructure, but also limiting the running of the application to a local, single node "cluster" of compute.

In a more "real world" situation, the Orleans.ServerHost application can be brought up as multiple instances, with a highly available clustering mechanism, to distribute compute (crypto calls) to all nodes within the Orleans cluster.

This application MUST be running in order for the GenValAppRunner to function, as all crypto calls are computed through Orleans.

More information on Orleans can be found here: https://github.com/dotnet/orleans.

The Orleans.ServerHost relies on configuration from the sharedappsettings.json file to inform the node how many piece of concurrent work can be done in parallel. Orleans relies on asynchronous communication between the client and server, so it is important that the amount of concurrent work specified through the MaxConcurrentWork property is less than the number of CPUs available to the machine. There always needs to be some compute available for the acknowledgement and responses between the client and node(s) in the cluster.

When running the system, if generation/validation fails, it could be because of the MaxConcurrentWork being set too high. One means of determining this, is by making use of the Orleans.Dashboard which is set up to run (by default) on port 8081 alongside the Orleans server.

Orleans Dashboard

If the CPU utilization on the dashboard is consistently above 95%, you may want to reduce the amount of concurrent work you're attempting to do, or bring up additional nodes for your Orleans cluster, while relying on a different clustering strategy than "local clustering".

See Running Orleans Server for more information.

src

The primary "substance" (implementations/code) of the application is contained within the src folder and its sub-folders.

Common

Common functionality that can be used across other projects. This is the "root" of the object dependency graph that makes up the system as a whole. The project contains several extension methods, services, and enums that are used throughout other portions of the system. A core feature of ACVTS is the BitString.cs class contained within ~/gen-val/src/common/src/NIST.CVP.ACVTS.Libraries.Math. The NIST.CVP.ACVTS.Libraries.Math project contains many data structures and utilities used to perform cryptographic operations.

Generation

This section is used to define the abstraction of the flow through the generation and validation process. For each algorithm tested, a grouping of new "strategies" are implemented against pieces of that abstraction. The general flow of the generation process is as follows:

  1. Parse Parameters - The registration.json is parsed into Parameters.cs and checked for correctness via ParameterValidator.cs.
  2. Generate Vector Set - This is filled with metadata about the algorithm, mode, and revision being tested.
  3. Generate Test Groups - A test group is a set of tests focused on specific properties within the algorithm.
  4. Generate Test Cases - A test case is an individual unit of work the client is expected to perform for the validation.
  5. Dispatch Crypto Tasks - Request the Orleans Server to provide content to the test cases defined. The actual content generation of the test cases happens in ~/gen-val/src/orleans/src/NIST.CVP.ACVTS.Libraries.Orleans.Grains/.
  6. Serialize Vector Set - With content the full vector set is serialized into several JSON files as defined by the ContractResolvers.

Some algorithms may not follow this process exactly. Some algorithms need crypto results during Test Group generation and may make such requests early. Some algorithms may utilize additional classes to distinguish between similar algorithms and reduce duplicated code (such as CMAC-AES and CMAC-TDES).

The general flow of the validation process is as follows:

  1. Deserialize InternalProjection and SubmittedResults - The JSON files must be converted back into the associated TestVectorSet.cs, TestGroup.cs, and TestCase.cs data models.
  2. Assign Validators - A TestCaseValidator.cs is created for each individual test case.
  3. Dispatch Validators - All validators are executed and their results compiled.
  4. Dispatch Crypto Tasks - Some algorithms may not allow the server to precompute results (i.e. when input from the client is provided in the expectedResults.json), the server computes the results during this step by dispatching jobs to Orleans.
  5. Serialize Validation File - The final validation.json file is produced.
Generation.Core

This assembly defines the interfaces and base classes that are required to provide strategy implementations for testing against an algorithm. In addition to the abstractions, there are implementation classes that walk through the yet-to-be provided strategies (through the IGenValInvoker or GenValAppRunner) in order to perform either generation or validation against a registration/vector set.

Generation

This assembly contains all of the "per algorithm" implementations of the interfaces defined from Generation.Core. For each algorithm tested, the generation/validation strategies can be found under Generation, organized under a folder or subfolder from the root of the project. Some algorithms from the protocol may call the same set of Gen/Val code.

Crypto

The crypto assemblies define the abstractions (Crypto.Common) as well as implementations (Crypto) of all the cryptography utilized and tested within the system. Generally, the cryptography is not directly invoked by the generation/validation process, but calls are rather pushed to the Orleans cluster; which allows for the distribution of the CPU bound work.

Orleans

The projects under Orleans defined both the abstractions and implementations of "Grains". These grains are the piece of the system that actually perform the crypto work.

Solutions

The solutions that are included under ~/gen-val/src/solutions are for each individual (or group of) algorithm(s) supported for generation/validation.

These solutions differ from opening the GenValAppRunner solution in that they contain test projects for the crypto/genvals specific to the algorithm. Since the crypto and genvals (integration) tests tend to be the longest running aspect of the test suite, they are not included as a part of the GenValAppRunner nor Orleans.ServerHost solutions.

There is also an All.sln that contains every project from the repository. Caution when running the tests on All.sln, this will take around 12 hours.

json-files

This folder contains sample JSON files from all algorithms covered by the Gen/Vals. Use these when you would like to quickly grab a full set of files for testing. This includes registration, prompt, internalProjection, and expectedResults. These files are generated by the NIST.CVP.ACVTS.Libraries.Generation.<Algo>.IntegrationTests project under GenValTests.cs via the GetTestFileLotsOfTestCases() test method. A successful run of this test method will overwrite the existing algorithm folder in ~/gen-val/json-files/.

Setting Up

The code provided is C# using the .NET6 framework. This is a cross-platform framework. To run the code, you will need to install the .NET6 SDK.

Create or modify the following files:

  • The ~/gen-val/samples/sharedappsettings.json file with properties based on the existing file.
  • Create the symbolic links described below.

Sym Links

Symbolic links are used to mirror the Directory.build.props and Directory.Packages.props files from ~/_config to -> ~/. They are contained with ~/config for our build's purposes, but need to be at ~/ for local purposes.

The following bash commands from the project root will create the needed sym links:

rm Directory.Build.props
rm Directory.Packages.props
ln -s ./_config/Directory.Build.props
ln -s ./_config/Directory.Packages.props

Running

In order for the Gen/Vals to function, the Orleans Server must also be running.

Gen/Vals

GenValAppRunner w/o parameters passed to it

When arguments are not supplied through the invoking of the application, the help message is printed as above.

To run the application in "generation" mode, a file containing the algorithm registration to be tested should be passed in with the -g flag. Note that this GenValAppRunner only supports a single algorithm registration at a time, unlike the ACVP web api. Example registration files can be found in ~/gen-val/json-files/.

The following registration can be used to run the GenValAppRunner application against ACVP-AES-CBC:

{
  "vsId": 0,
  "algorithm": "ACVP-AES-CBC",
  "revision": "1.0",
  "isSample": false,
  "conformances": [],
  "direction": [
    "encrypt",
    "decrypt"
  ],
  "keyLen": [
    128,
    192,
    256
  ]
}

The vsId property can be specified by the user in the JSON. This value is copied to the resulting files for tracking purposes.

The algorithm, mode, and revision properties define the set of algorithm tests that will be generated or validated.

The isSample boolean flag determines some branches in behavior. When isSample is true, the generation code will generate fewer tests, but will also always generate a complete expectedResults.json file. This is not always the case when isSample is false.

Notice how the above json object is not contained within an object array of "algorithms", as is done with the ACVP web api. If the above json snippet is saved under "C:/registrations/1971-01-01/registration.json", and the GenValAppRunner invoked with the following command:

dotnet run -g "C:/registrations/1971-01-01/registration.json"

Then the application will perform test vector generation for AES-CBC, using both encrypt/decrypt operations, for the key sizes 128, 192, and 256.

If successful, the generation step will produce the following files:

  • prompt.json
    • contains the "questions" that are asked of the IUT to solve
  • internalProjection.json
    • contains both the "questions" posed to the IUT, as well as the expected answers, where applicable.
  • expectedResults.json
    • The expected answers to the questions being asked in the prompt file. This file can be used as a validation file when the vector set is generated with the isSample flag.

A similar method can be used for the validation of a set of test vectors:

dotnet run -a [answerFile] -b [iutResponsesFile]

where answerFile is the internalProjection.json produced from a generate step, and iutResponsesFile is either the expectedResults.json file (only guaranteed to be useable when generated for a sample registration), or the response file generated through the IUT's testing harness after having run the prompt.json through it. This will produce a validation.json file which outlines the test cases the IUT got correct or incorrect.

An algorithm registration can also be checked for correctness without starting the Orleans Server:

dotnet run -c "C:/registrations/1971-01-01/registration.json"

Orleans Server

The ACVP Project uses Orleans to distribute crypto across a (potential) cluster of nodes. The genvals rely on this cluster being available, and configuration is provided via the sharedappsettings.json outlined in Setting Up.

To host the Orleans Silo locally there are two options:

  • Run as a console application

    • From the NIST.CVP.Orleans.ServerHost directory (where the csproj is located) dotnet run --console
    • From the compiled binary: dotnet NIST.CVP.Orleans.ServerHost.dll --console
  • Run as a service

    • After publishing with dotnet publish -c Release run from an elevated command prompt:
    sc delete AcvpOrleans # if exists
    sc create AcvpOrleans binPath= "C:path/to/executable/NIST.CVP.Orleans.ServerHost.dll"
    sc start AcvpOrleans

Testing

There are tens of thousands of unit and integration tests included in the repository. They have been categorized into a few different filters to help inform users and run specific tests.

  • FastCryptoTest - These tests are within the NIST.CVP.ACVTS.Libraries.Crypto.<Algo>.Tests projects. Each test is expected to complete within milliseconds.
  • LongCryptoTest - These tests are within the NIST.CVP.ACVTS.Libraries.Crypto.<Algo>.Tests projects. Each test may take from a couple of seconds to several minutes to complete.
  • UnitTest - These tests are commonly used for the NIST.CVP.ACVTS.Libraries.Generation.Tests project. Each test will complete within milliseconds.
  • FastIntegrationTest - These tests are used in the NIST.CVP.ACVTS.Libraries.Generation.<Algo>.IntegrationTests projects. Each test will take anywhere from a couple of seconds to couple minutes.
  • LongRunningIntegrationTest - These tests are used in the NIST.CVP.ACVTS.Libraries.Generation.<Algo>.IntegrationTests projects. Each test will take anywhere from a couple of minutes to an hour.

The integration test categories have two common test files. FireHoseTests.cs and GenValTests.cs. The FireHoseTests.cs runs through legacy CAVS files to verify the correct serialization and implementation of the algorithm. Some of these files can take some time as usually all capabilities of an algorithm are covered. The GenValTests.cs runs through a sample registration to generate JSON files. This requires the Orleans Server to be running.

To run the tests associated with a specific .csproj, use the following command within directory containing the .csproj file:

dotnet test NIST.CVP.ACVTS.Libraries.Generation.AES_CBC.IntegrationTests.csproj

To filter out specific tests, use the following command:

dotnet test NIST.CVP.ACVTS.Libraries.Generation.AES_CBC.IntegrationTests.csproj --filter Category=FastIntegrationTest

License

NIST-developed software is provided by NIST as a public service. You may use, copy, and distribute copies of the software in any medium, provided that you keep intact this entire notice. You may improve, modify, and create derivative works of the software or any portion of the software, and you may copy and distribute such modifications or works. Modified works should carry a notice stating that you changed the software and should note the date and nature of any such change. Please explicitly acknowledge the National Institute of Standards and Technology as the source of the software.

NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED, IN FACT, OR ARISING BY OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE SOFTWARE.

You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. The software developed by NIST employees is not subject to copyright protection within the United States.

Contributions

Contributions to the project via PRs, especially to address known issues, are helpful. There is a process for NIST to accept public PRs. Any code contributed to the project will be treated as from NIST with the same license agreement. If you are preparing a larger PR to the project, please reach out to the team to ensure it is not something we are already working on.

Contact

If you have any questions or feedback, reach out to Chris Celi at christopher.celi (at) nist.gov.

acvp-server's People

Contributors

celic avatar jbrock24 avatar kritner avatar livebe01 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

Watchers

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

acvp-server's Issues

Clairification of what goes in this repo versus the other

I just want to clarify what types of issue continue to be raised in the other repository (https://github.com/usnistgov/ACVP).

In the README for this one, it says that issues can be raised here that are about :

Noticed differences from the protocol specifications

But it also says further down:

Questions or problems with the specifications, can be raised with issues on the protocol repository

KAS-FFC Sp800-56Ar3 dhHybrid1 KdfKc DKM computation

environment
Demo

testSessionId
122528

vsId
364227

Algorithm registration
{
"prereqVals":[
{
"algorithm":"DRBG",
"valValue":"same"
},
{
"algorithm":"HMAC",
"valValue":"same"
},
{
"algorithm":"SHA",
"valValue":"same"
},
{
"algorithm":"SafePrimes",
"valValue":"same"
}
],
"revision":"Sp800-56Ar3",
"algorithm":"KAS-FFC",
"function":[
"keyPairGen",
"fullVal"
],
"iutId":"D1E9DE6D343E266A",
"scheme":{
"dhHybrid1":{
"kasRole":[
"initiator",
"responder"
],
"kdfMethods":{
"oneStepKdf":{
"auxFunctions":[
{
"auxFunctionName":"SHA2-512"
}
],
"fixedInfoPattern":"uPartyInfo||vPartyInfo",
"encoding":[
"concatenation"
]
}
},
"keyConfirmationMethod":{
"macMethods":{
"HMAC-SHA2-256":{
"keyLen":160,
"macLen":256
}
},
"keyConfirmationDirections":[
"bilateral"
],
"keyConfirmationRoles":[
"provider",
"recipient"
]
},
"l":512
}
},
"domainParameterGenerationMethods":[
"MODP-4096"
]
}

Endpoint in which the error is experienced
GET /acvp/v1/testSessions/122528/vectorSets/364227 HTTP/1.1

Expected behavior
I expected DKM computation for this "KdfKc" situation to be like what was done for tsId 124356 / vsId 371044, where the capabilities were "KdfNoKc". Instead, DKM shown for the "KdfKc" situation has shorter length (perhaps by the amount used for MAC key) and the visible hex characters are not a substring of the IUT's recomputed DKM value.

Additional context
Algorithm registration for tsId 124356 / vsId 371044 KdfNoKc with DKM that matched my expectations:
{
"prereqVals":[
{
"algorithm":"DRBG",
"valValue":"same"
},
{
"algorithm":"SHA",
"valValue":"same"
},
{
"algorithm":"SafePrimes",
"valValue":"same"
}
],
"revision":"Sp800-56Ar3",
"algorithm":"KAS-FFC",
"function":[
"keyPairGen",
"fullVal"
],
"iutId":"D1E9DE6D343E266A",
"scheme":{
"dhHybrid1":{
"kasRole":[
"initiator",
"responder"
],
"kdfMethods":{
"oneStepKdf":{
"auxFunctions":[
{
"auxFunctionName":"SHA2-512"
}
],
"fixedInfoPattern":"uPartyInfo||vPartyInfo",
"encoding":[
"concatenation"
]
}
},
"l":512
}
},
"domainParameterGenerationMethods":[
"MODP-4096"
]
}

FFC-SSC: some primes missing

environment
Prod

testSessionId
2718, 2720, 2728

vsId
N/A

Algorithm registration

       "revision":"Sp800-56Ar3",
        "algorithm":"KAS-FFC-SSC",
        "scheme":{
          "dhEphem":{
            "kasRole":[
              "initiator",
              "responder"
            ]
          }
        },
        "domainParameterGenerationMethods":[
          "MODP-2048",
          "MODP-3072",
          "MODP-4096",
          "MODP-6144",
          "MODP-8192",
          "ffdhe2048",
          "ffdhe3072",
          "ffdhe4096",
          "ffdhe6144",
          "ffdhe8192"
        ]
      }

The request returned only a subset of the requested primes. E.g. 2718 did not have MODP2048 and FFDHE2048.

Yet, the certificate at https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?validation=33303 shows that all ciphers are tested.

I am not sure that is intended.

SP800-56C r1 OneStep general error

environment
Demo

testSessionId
not yet awarded

vsId
N/A

Algorithm registration

      {
        "prereqVals":[
          {
            "algorithm":"SHA",
            "valValue":"same"
          },
          {
            "algorithm":"HMAC",
            "valValue":"same"
          },
          {
            "algorithm":"DRBG",
            "valValue":"same"
          }
        ],
        "algorithm":"KAS-KDF",
        "mode":"OneStep",
        "revision":"Sp800-56Cr1",
        "l":1024,
        "z":[
          {
            "min":256,
            "max":512,
            "increment":128
          }
        ],
        "auxFunctions":[
          {
            "auxFunctionName":"HMAC-SHA2-256",
            "macSaltMethods":[
              "default",
              "random"
            ]
          },
          {
            "auxFunctionName":"SHA2-256",
            "macSaltMethods":[
              "random"
            ]
          }
        ],
        "fixedInfoPattern":"uPartyInfo||vPartyInfo||literal[affedeadbeef]",
        "encoding":[
          "concatenation"
        ]
      },

Endpoint in which the error is experienced
POST /acvp/v1/testSessions

[
  {
    "acvVersion": "1.0"
  },
  {
    "error": "Validation error(s) on JSON payload.",
    "context": [
      "KAS-KDF-OneStep-Sp800-56Cr1: General exception. Contact service provider."
    ]
  }
]

AES FF1 Missing from Specification

environment
N/A

testSessionId
N/A

vsId
N/A

Algorithm registration
N/A

Endpoint in which the error is experienced
Programmatic Transitions: https://csrc.nist.gov/Projects/cryptographic-module-validation-program/programmatic-transitions
ACVP Page: https://usnistgov.github.io/ACVP/
Symmetric Algorithms Page: https://usnistgov.github.io/ACVP/draft-celi-acvp-symmetric.html

Expected behavior
Based on the Programmatic Transitions link, AES FF1 should be implemented on both the demo and production servers. Using the ACVP Page above, if you follow the link for AES-FF1 it leads you to the Symmetric Block Cipher Algorithms JSON specification page. This page does not appear to contain any information regarding the "FF1" mode of AES and what options are supported for this mode.

Additional context
I have a vendor that's looking to test AES-FF1, but the JSON specification doesn't seem to indicate the supported options for this mode.

Fail to fetch OE list

environment
Prod

When trying to fetch the list of OE, it returns

[
{
"acvVersion": "1.0"
},
{
"error": "Internal service error. Contact service provider."
}
]

And it's working fine in the demo server.

Demo server unresponsive

The demo server seems to be very unresponsive. A login operation takes more than 2 minutes and then is cancelled because my TOTP value is out of date.

AES-ECB MCT test with empty "pt" in excepted result

environment
Demo

testSessionId
/acvp/v1/testSessions/100283

vsId
291188

There are three Monte Carlo tests, with "tgId" as 16, 17, and 18.
16 - keyLen = 128
17 - keyLen = 192
18 - keyLen = 256
In the expected response file, both cases 16 and 18 include an empty "pt" item before the "resultsArray". For example:
"tgId": 16,
"tests": [
{
"tcId": 1070,
"pt": "",
"resultsArray": [
...
Case 17 (keyLen = 192) does not include this empty "pt" item. Should all three cases be consistent in their inclusion or exclusion of the empty "pt"? It seemed odd that only the 192 keyLen did not include it, while the other two cases did.

PBKDF2 error

environment
Demo

The following request is rejected:

[
  {
    "acvVersion":"1.0"
  },
  {
    "isSample":false,
    "operation":"register",
    "certificateRequest":"no",
    "debugRequest":"yes",
    "production":"no",
    "encryptAtRest":"yes",
    "algorithms":[
      {
        "revision":"1.0",
        "algorithm":"PBKDF",
        "prereqVals":[
          {
            "algorithm":"SHA",
            "valValue":"same"
          }
        ],
        "capabilities":[
          {
            "iterationCount":[
              {
                "min":10,
                "max":1000,
                "increment":1
              }
            ],
            "keyLen":[
              {
                "min":128,
                "max":4096,
                "increment":8
              }
            ],
            "passwordLen":[
              {
                "min":8,
                "max":128,
                "increment":1
              }
            ],
            "saltLen":[
              {
                "min":128,
                "max":4096,
                "increment":8
              }
            ],
            "hmacAlg":[
              "SHA-1",
              "SHA2-224",
              "SHA2-256",
              "SHA2-384",
              "SHA2-512"
            ]
          }
        ]
      }
    ]
  }
]

Error:

[
  {
    "acvVersion": "1.0"
  },
  {
    "error": "Validation error(s) on JSON payload.",
    "context": [
      "Unable to map PBKDF-1.0 - index 0 to an internal algorithm id."
    ]
  }
]

KAS 56C KDF OneStep: FixedInput requirements are unclear

Given the following test target:

  • The associated KAS scheme is C(2e, 0s), no key confirmation.
  • algorithm: KAS-KDF
  • mode: OneStep
  • revision: Sp800-56Cr1
  • auxFunctionName: SHA2-256

And given that ACVP testing requires FixedInput and fields within FixedInput (although these are not mandated by 56Ar3 and 56Cr2);

The specification of uPartyInfo and vPartyInfo are not precise about what is optional and what is required for the current ACVP test process. Using uPartyInfo as the example, it is specified as:

uPartyId { || ephemeralKey } { || ephemeralNonce } { || dkmNonce } { || c }

  • "optional" items such as ephemeralKey MUST be included when available for ACVP testing.

Which of these optional fields must be included for the ACVP system to accept the registration?
Just ephemeralKey?
All of them?
What is c in this specification? It does not appear to be described in the 56Ar3 and 56Cr2 sections cited next.

References to FixedInfo in source specifications:
SP 800-56C Section 4.1 Input item c. FixedInfo refers the reader to SP 800-56Ar3.
SP 800-56Ar3 Section 5.8.2.1.1 provides some help:

PartyUInfo: A required non-null subfield containing public information about party U.
At a minimum, PartyUInfo shall include IDU, an identifier for party U, as a distinct item of information. This subfield could also include information about the public key(s) contributed to the key-agreement transaction by party U. The nonce provided by party U as required in a C(0e, 2s) scheme (see Section 6.3) shall be included in this subfield.

The ACVP specification cites both ephemeralNonce and dkmNonce, while the 56r3 specification cites the nonce provided by party U in a static scheme (not the one used in this case).

Can you provide a working registration example for the Hash option case?

Final observation / question: given that this testing is new, should the ACVP test coverage (and therefore "revision" field) cite
SP800-56Cr2 rather than SP 800-56r1?

Thank you

ACVP Server sending non-JSON data?

I currently see a very odd issue I have never encountered before. I am not sure where the error is, so allow me to mention it to see whether or not it is a server issue.

Currently I have a very slow Internet uplink. I yet get to the server to download some 40 HMAC/SHA vectors in parallel. The individual bit stream maybe is 1kb/s, so very slow.

For 5 out of the 40 vectors initially my client received non-JSON data during downloading the test vectors. Unfortunately I was not able to retain the data. After retrying to fetch the test vectors again, I got the right data.

Server: PROD

vsIDs: 35786, 35805, 38506, 35800, 35771

The time that all that happened was between 16:30:19 and 16:31:13 MET.

KAS-ECC Component mode noKdfNoKc option inappropriately requires hashAlg

The KAS ECC testing for the Component mode, noKdfnoKc scenario requires the shared secret Z of SP 800-56Ar3 Section 5.7.1.2 (for ECC) or 5.7.1.1 (for FFC) to be hashed. It appears this is only for the purpose of testing, carrying over the practice described in the CAVS kasvs.pdf.

Why is hashAlg required for the noKdfNoKc case?

This practice is not explained well in the test specification and so will result in confusion. It also seems inconsistent with other testing methods that don't impose extraneous primitives for test purposes.

Scenario: Mode: Component; option: noKdfNoKc

The relevant KAS ECC specification section 7.7.2 requires the selection of a hashAlg:

"noKdfNoKc" REQUIRES "hashAlg"

The 3rd bullet of Section 6.2.1 KAS-ECC Requirements Covered appears to be inconsistent - the NoKc part of noKdfNoKc means no key confirmation:

SP 800-56a - 5.1 Cryptographic Hash Functions. All modes of performing KAS SHALL make use of a hash function.
The hash function MAY be used for confirmation of a successfully generated shared secret Z (noKdfNoKc),
or as a primitive within the KDF being tested (kdfNoKc and kdfKc).

When there is no KDF and no key confirmation (the noKdfNoKc scenario), the hash is not used by the implementation under test. The practice of hashing Z for test purposes seems to derive from the CAVS testing described in KASVS.pdf Section 2 final paragraph:

Note that the validation testing without key confirmation asks for a MAC algorithm to perform the testing.
It is not a prerequisite to getting the IUT validated. Likewise, if “all of SP800-56A except the key derivation function”
is being tested, the testing requires the shared secret value ZZ to be hashed.
The hash function is only used to perform the test and is not a prerequisite to getting the IUT validated.

HMAC Verification Error

environment
Demo

testSessionId
129547

vsId
397156

After we uploaded the result of the vector set, everything (vector set, result, expected) becomes below response,

"error": "A task was canceled."

Not able to connect/login to nist server

environment
The environment the issue was experienced (Demo or Prod)
Demo

testSessionId
N/A

vsId
N/A

Algorithm registration
The pertinent algorithm registration pieces (algorithm tested, capabilities, etc) in json format
N/A

Endpoint in which the error is experienced
https://demo.acvts.nist.gov:443/acvp/v1/login

Expected behavior
A clear and concise description of what you expected to happen.

Hello,
I have just received certificate file in .cer for accessing to demo server.
I tried to login using acvp_app, but unable to get connected due to certificate issue.
can you please advice.

[admin@oak-vsh367 ~]# ./acvp_app --verbose --aes

Using the following parameters:
ACV_SERVER: demo.acvts.nist.gov
ACV_PORT: 443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE: acvp.nist.gov.crt
ACV_CERT_FILE: Riverbed_Ramana_Pillalamarri_Demo.cer
ACV_KEY_FILE: riverbed-private1.key

***ACVP [INFO][acvp_http_user_agent_handler:1515]--> HTTP User-Agent: libacvp/1.0;Linux;2.6.32;x86_64;Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz;GCC/8.3.0

***ACVP [STATUS][acvp_login:2497]--> Logging in...
***ACVP [ERR][acvp_curl_http_post:353]--> Curl failed with code 60 (SSL peer certificate or SSH remote key was not OK)

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

***ACVP [ERR][log_network_status:1105]--> Received no response from server.
***ACVP [STATUS][acvp_login:2509]--> Login Send Failed
***ACVP [ERR][acvp_run:3195]--> Failed to login with ACVP server

[admin@oak-vsh367 ~]# curl -v --cacert acvp.nist.gov.crt --key riverbed-private1.key --cert Riverbed_Ramana_Pillalamarri_Demo.cer -d '{{"acvVersion":"1.0"}, {"password":<>}}' -H "Content-Type: application/json" https://demo.acvts.nist.gov/acvp/v1/login

  • Trying 52.204.191.193:443...
  • TCP_NODELAY set
  • Connected to demo.acvts.nist.gov (52.204.191.193) port 443 (#0)
  • Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@strength
  • successfully set certificate verify locations:
  • CAfile: acvp.nist.gov.crt
    CApath: none
  • TLSv1.2 (OUT), TLS Unknown, Certificate Status (22):
  • TLSv1.2 (OUT), TLS handshake, Client hello (1):
  • TLSv1.2 (IN), TLS handshake, Server hello (2):
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
  • TLSv1.2 (OUT), TLS alert, unknown CA (560):
  • SSL certificate problem: unable to get local issuer certificate
  • Closing connection 0
    curl: (60) SSL certificate problem: unable to get local issuer certificate
    More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Additional context
I have set the ACV_TOTP_SEED with the specified value

Demo server RSA-KeyGen-FIPS186-4 always return "infoGeneratedByServer": false

I have sent RSA-KeyGen-FIPS186-4 capabilities JSON string as below and got the vectors successfully. My request has "infoGeneratedByServer": true, but the returned vectors contain only "infoGeneratedByServer": false for all trstGroups.

Is it a server bug?

[{"acvVersion":"1.0"},{"algorithms":[{"algorithm":"RSA","revision":"FIPS186-4","mode":"keyGen","prereqVals":[{"algorithm":"SHA","valValue":"same"},{"algorithm":"DRBG","valValue":"same"}],"infoGeneratedByServer":true,"pubExpMode":"random","keyFormat":"standard","capabilities":[{"randPQ":"B.3.3","properties":[{"modulo":2048,"hashAlg":[],"primeTest":["tblC2"]},{"modulo":3072,"hashAlg":[],"primeTest":["tblC2"]}]}]}]}]

ECDSA vector set issue

Thanks, @Kritner. And our lab user found another two vector sets with the same error when testing with DCDSA. Not sure if they are having the same issue. If not I may need to open up another issue.

/acvp/v1/testSessions/129146/vectorSets/393177

/acvp/v1/testSessions/129146/vectorSets/393180

Originally posted by @AndrewHYang in #46 (comment)

500 when trying most actions on demo

environment
Demo

testSessionId
N/A

vsId
N/A

Algorithm registration
N/A

Endpoint in which the error is experienced
Most resource/meta endpoints that I tried
GET https://acvts.nist.gov/acvp/v1/vendors?limit=20&offset=0

It seems like trying to do most things (I didn't try making a new test session) is giving a 500 with the error:

[
    {
        "acvVersion": "1.0"
    },
    {
        "error": "Internal service error. Contact service provider."
    }
]

This might be related to:
usnistgov/ACVP#1029
and
usnistgov/ACVP#1035

TDES CFB MCT Does Not Include PT/CT

environment
Demo and Prod

testSessionId
Demo: 123075
Prod: 3034

vsId
Demo: 366026, 366027, 366028
Prod: 29625, 29626, 29627

Expected behavior
The MCT vectors for ACVP-TDES-CFB1, ACVP-TDES-CFB8 and ACVP-TDES-CFB64 did not include a PT/CT field. The description of the MCT says "the initial condition for the test is the tuple (KEY1, KEY2, KEY3, IV, PT) set to some values" but the vectors only included key1, key2, key3 and iv.

For example, the vectors for ACVP-TDES-CFB1 on demo (vsid 366026):
{
"tgId": 13,
"direction": "Encrypt",
"testType": "MCT",
"keyingOption": 1,
"tests": [
{
"tcId": 689,
"key1": "C454B67C26341919",
"key2": "AB4FF1C110CD6B45",
"key3": "E5FB83CE0DFE405D",
"iv": "83C1D3365765C84F"
}
]
},
{
"tgId": 14,
"direction": "Decrypt",
"testType": "MCT",
"keyingOption": 1,
"tests": [
{
"tcId": 690,
"key1": "6145EF8354E5C449",
"key2": "A41A866BFDBC19C4",
"key3": "3DB362E3C49B15EF",
"iv": "46AA85EAAD1606AB"
}
]
}

Test vector generation errors

environment
Prod

testSessionId
3381

vsId
32404

The server failed to generate the vector:

[
  {
    "acvVersion": "1.0"
  },
  {
    "error": "Failed to generate. Object reference not set to an instance of an object."
  }
]

How can I retrieve the test vector without discarding the entire test session?

Approval of PUT (update) metadata submissions in Demo

environment
Demo

Metadata PUT (update) request
The pertinent algorithm registration pieces (algorithm tested, capabilities, etc) in json format

request URL

https://demo.acvts.nist.gov/acvp/v1/modules/12309 PUT

request payload

[{
	"acvVersion": "1.0"
}, {
	"description": "Software Algorithms VC1.0 with more details"
}]

ACVP response:

[
  {
    "acvVersion": "1.0"
  },
  {
    "url": "/acvp/v1/requests/15312",
    "status": "initial"
  }
]

Endpoint in which the error is experienced
https://demo.acvts.nist.gov/acvp/v1/modules/12309 PUT

Expected behavior
When testing new metadata object creation (POST) in the demo environment, if there is not an error, the initial request is approved within a couple of minutes automatically.

We have been been testing the update (PUT) of the module metadata object but we have not had any of the initial request URLs come back as approved. Our initial requests were sent more than 12 hours ago and the request URLs are still marked as "initial".

Our main questions are:

  • Did we submit the requests to update the module metadata correctly?
  • Should the demo environment automatically approve the update request if there is not an error in the submission process?

We would like to get our workflow correct before making any updates in prod and we cannot tell at this time if we are making a mistake or not.

Also the protocol spec is not clear on which module properties may be updated after the module is associated with a test session (https://usnistgov.github.io/ACVP/draft-fussell-acvp-spec.html#name-update-a-module). Are you able to identify which module properties can be updated after association with a test session?

Thank you for your help!

Additional context
These are previous attempts to update module metadata that are still "initial"
/acvp/v1/requests/15308
/acvp/v1/requests/15310

KAS response/expected issue

environment
Demo

testSessionId
118302

vsId
340867

After we uploaded the results of vector sets. We can some response in the result like

"incorrect TestPassed result. Test expectation: \Failure - IUT should calculate different tag due to OI value changed."

So, we said "false" and the expected result was "false", but we failed the test. There are several of these instances.
Any idea what it's about? Or any document that we may follow?

Need guidance on KMAC in OneStep KDF.

In table 3 of SP800-56C Rev 2 states "Choice of 160, 224, 256, 384, 512, or L." for H_outputBits and recommends the use of L (which is the length of the key material requested) for efficiency reasons on Page 14.

Given the following:

"kdfConfiguration": {
  "kdfType": "oneStep",
  "l": 1024,
  "saltMethod": "default",
  "fixedInfoPattern": "algorithmId||uPartyInfo||vPartyInfo",
  "fixedInfoEncoding": "concatenation",
  "auxFunction": "KMAC-128"
}

and the vector:

{
  "tcId": 1,
  "kdfParameter": {
    "kdfType": "oneStep",
    "salt": "00000000000000000000000000000000",
    "z": "39CB5C7486EEB4CFA379EC16CC23C8D9E0C3FCC941B92B6C8F1658F5929BB48D",
    "l": 1024,
    "algorithmId": "C90F0C695C8372FCB94F0BAF9A86AC67"
  },
  "fixedInfoPartyU": {
    "partyId": "00F00E52832EF7960EBD7A46E2E7F574",
    "ephemeralData": "C4C150F5BD1F35140B5F9AE014D3CD7F600F1B8F6940C3F83AA0B343E8A082A2"
  },
  "fixedInfoPartyV": {
    "partyId": "DB06A47DB74EA7474231502AD9D1D7EE"
  }
},

This gives a fixedInfo of

c90f0c695c8372fcb94f0baf9a86ac6700f00e52832ef7960ebd7a46e2e7f574c4c150f5bd1f35140b5f9ae014d3cd7f600f1b8f6940c3f83aa0b343e8a082a2db06a47db74ea7474231502ad9d1d7ee

and KMAC128("00000000000000000000000000000000", C || "39CB5C7486EEB4CFA379EC16CC23C8D9E0C3FCC941B92B6C8F1658F5929BB48D" || fixedInfo, 1024, "KDF")

where C is a 4 byte big endian encoding of the block number (in this case 1)

gives:

80a3dd756f342e8f29dfbb4c9d05f19d1f8ac29246bda54627fc7b064359ff62c3566f148fead0f2053d9637e6ce334b3067e66068da811a2f6197c615c9c13f2c3bb7da0392481fc06c96d81e9a6e38d9d1228e3fd9e88e4891f4bbb1dc59adb3fb2b2af956219b3201c8f7b658089529e36929c568c014d1cc9719991e9861

The sample response for the vector is:

D6572FACBFC553F16FD7B7D58F95E3E4A24D6C336BF7F9E7171914B7194AAC45C044FA5F754D1F4850AB1BBDA04AAACEED115647C5F9FE6A40A10FD4654E9E6ACBE9C6DB3548DAA376E9E5C1AE30B881A1BE42933D7D3FD6664B9E2F5EEA234870952D2E0608D89269791D6B4E925D5B6B5B60894B1B968CA173080984B225CD

What is H_outputBits set to in the server? I tried the other values listed in table 3 and nothing seemed to work. Intuitively I'm attracted to the idea of using L as it's possible to do so, but I'm also concerned that none of the listed options produce the same result as the sample response. I'm wondering if there is some other consideration with KMAC that I have managed to miss (for example KMAC has an indefinite length option for generating output, is that happening somewhere?). Thanks.

AES/SHA submission with partial MCT results puts entire vector set in 'error' status

I can't be sure that the partial MCTs are the reason, but I have a strong suspicion. To save time in testing my ACVP test framework, I only run 3 of 100 MCT rounds. When I retrieve results for these uploaded partial responses, I get the error "Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')" on 372084 (AES-CFB128), and "A task was canceled." for the other vector sets.

On the subject of long-running MCTs -- is there some suggestion for how to make these more manageable? I imagine that many embedded implementations are slow enough to make these inconveniently time-consuming. Can the server perform partial validation of only the uploaded rounds? Perhaps only for sample vectors? The number of rounds is not part of the algorithm registration or test group/case parameters, so lowering the number of rounds might be difficult. Does this even make sense for the goals of the MCT?

environment
Demo

testSessionId
124777

vsId
372084 (AES), 372085 (AES), 372108 (SHA), 372109 (SHA), 372110 (SHA)

Algorithm registration

{"algorithm":"ACVP-AES-CFB128","revision":"1.0","direction":["encrypt","decrypt"],"keyLen":[128,256]}
{"algorithm":"ACVP-AES-ECB","revision":"1.0","direction":["encrypt"],"keyLen":[256]}
{"algorithm":"SHA-1","revision":"1.0","messageLength":[{"min":0,"max":65536,"increment":8}]}
{"algorithm":"SHA2-256","revision":"1.0","messageLength":[{"min":0,"max":65536,"increment":8}]}
{"algorithm":"SHA2-384","revision":"1.0","messageLength":[{"min":0,"max":65536,"increment":8}]}

Endpoint in which the error is experienced
POST acvp/v1/testSessions/124777/vectorSets/372108/results etc.

Expected behavior
The specific MCT test cases are marked as failed, but the other test types/groups/cases are processed normally

Generation of Vector Sets for RSA via FIPS186-4 taking several days on Demo

environment
Demo

testSessionId
105365

vsId
316459

Algorithm registration
[{"acvVersion":"1.0"},{"algorithms":[{"algorithm":"RSA","revision":"FIPS186-4","mode":"sigGen","prereqVals":[{"algorithm":"SHA","valValue":"same"},{"algorithm":"DRBG","valValue":"same"}],"capabilities":[{"sigType":"ansx9.31","properties":[{"modulo":2048,"hashPair":[{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]},{"modulo":3072,"hashPair":[{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]}]},{"sigType":"pkcs1v1.5","properties":[{"modulo":2048,"hashPair":[{"hashAlg":"SHA2-224"},{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]},{"modulo":3072,"hashPair":[{"hashAlg":"SHA2-224"},{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]}]},{"sigType":"pss","properties":[{"modulo":2048,"hashPair":[{"hashAlg":"SHA2-224","saltLen":0},{"hashAlg":"SHA2-256","saltLen":0},{"hashAlg":"SHA2-384","saltLen":0},{"hashAlg":"SHA2-512","saltLen":0}]},{"modulo":3072,"hashPair":[{"hashAlg":"SHA2-224","saltLen":0},{"hashAlg":"SHA2-256","saltLen":0},{"hashAlg":"SHA2-384","saltLen":0},{"hashAlg":"SHA2-512","saltLen":0}]}]}]},{"algorithm":"RSA","revision":"FIPS186-4","mode":"sigVer","prereqVals":[{"algorithm":"SHA","valValue":"same"},{"algorithm":"DRBG","valValue":"same"}],"pubExpMode":"fixed","fixedPubExp":"010001","capabilities":[{"sigType":"ansx9.31","properties":[{"modulo":2048,"hashPair":[{"hashAlg":"SHA-1"},{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]},{"modulo":3072,"hashPair":[{"hashAlg":"SHA-1"},{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]}]},{"sigType":"pkcs1v1.5","properties":[{"modulo":2048,"hashPair":[{"hashAlg":"SHA-1"},{"hashAlg":"SHA2-224"},{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]},{"modulo":3072,"hashPair":[{"hashAlg":"SHA-1"},{"hashAlg":"SHA2-224"},{"hashAlg":"SHA2-256"},{"hashAlg":"SHA2-384"},{"hashAlg":"SHA2-512"}]}]},{"sigType":"pss","properties":[{"modulo":2048,"hashPair":[{"hashAlg":"SHA-1","saltLen":0},{"hashAlg...[truncated]

Endpoint in which the error is experienced
/acvp/v1/testSessions/105365/vectorSets/316459 GET

Expected behavior
The test session was created on Friday afternoon - still getting "retry in 30 seconds" message.

Additional context
attempted to create a new session in case the aforementioned one was dropped from the queue; that has also been waiting a while now.

Thanks for your time! I am just creating this issue in case it is a result of some problem caused by the recent changes, not complaining about a large queue backlog if thats the reason.

Andrew

KAS-ECC only generates vectors for the first auxFunction and ignores any others

environment
Demo

testSessionId
125751

vsId
375761

Algorithm registration

  "algorithm": "KAS-ECC",
  "revision": "Sp800-56Ar3",
  "prereqVals": [{"algorithm":"DRBG","valValue":"same"},{"algorithm":"SHA","valValue":"same"},{"algorithm":"ECDSA","valValue":"same"},{"algorithm":"HMAC","valValue":"same"}],
  "function": ["keyPairGen","fullVal"],
  "iutId": "012345678",
  "scheme": {
    "onePassDh": {
      "kasRole": ["initiator","responder"],
      "kdfMethods": {
        "oneStepKdf": {
          "auxFunctions": [
            {"auxFunctionName": "SHA2-256"},
            {"auxFunctionName": "SHA2-384"}
          ],
          "fixedInfoPattern": "uPartyInfo||vPartyInfo",
          "encoding": ["concatenation"]
        }
      },
      "l": 512
    }
  },
  "domainParameterGenerationMethods": ["P-256"]
}

Endpoint in which the error is experienced
GET /acvp/v1/testSessions/125751/vectorSets/375761

Expected behavior
Vectors covering all domainParameterGeneration/KDF auxFunction combinations

Attempts at FIPS 186-2 Legacy SigVer seems to be throwing a General Exception:

Attempts at FIPS 186-2 Legacy SigVer seems to be throwing a General Exception:

Status: 200
Url: https://demo.acvts.nist.gov:443/acvp/v1/testSessions/115454/vectorSets/326947
Resp:

[
  {
    "acvVersion": "1.0"
  },
  {
    "error": "General exception. Contact service provider."
  }
]

The following is the JSON request for reference:

[{
	"acvVersion": "1.0"
}, {
	"isSample": true,
	"algorithms": [{
		"algorithm": "RSA",
		"revision": "FIPS186-2",
		"mode": "sigVer",
		"prereqVals": [{
			"algorithm": "SHA",
			"valValue": "same"
		}, {
			"algorithm": "DRBG",
			"valValue": "same"
		}],
		"pubExpMode": "fixed",
		"fixedPubExp": "010001",
		"capabilities": [{
			"sigType": "pkcs1v1.5",
			"properties": [{
				"modulo": 1024,
				"hashPair": [{
					"hashAlg": "SHA-1"
				}]
			}, {
				"modulo": 1536,
				"hashPair": [{
					"hashAlg": "SHA-1"
				}]
			}]
		}]
	}]
}]

Same failure for Random Exponents as well

Originally posted by @mtdownz in usnistgov/ACVP#990 (comment)

Request for a submit for validation do not change it status

environment
Demo

testSessionId
/testSessions/118682

Endpoint in which the error is experienced
PUT on /testSessions/118682

Expected behavior
The testsession is "publishable": true, "passed": true, "isSample": false. And I also got a request link: requests/14679 as answere for the PUT. But the request never change it statuts, its now for some hours on "initial". I would expect that the status changed to "approved" and that I get a validationID at the received URL, like described in https://usnistgov.github.io/ACVP/draft-fussell-acvp-spec.html 10.16.4 or that I get a error Message, why the submit is failed.

Additional context
I dont know if its concerning to that issue, but in https://usnistgov.github.io/ACVP/draft-fussell-acvp-spec.html 10.16.4 it is written that the prerequisites can be specified during the submit for validation, but for example in https://usnistgov.github.io/ACVP/draft-celi-acvp-symmetric.txt 7.1 it is written that the prerequisites have to be specified during the request for testVectors. Do I have to specify them in both cases?
In my case I only specify the prerequisites during the submit for validation.

Sha256 test vector question

We use the following

[
  {“acvVersion”:”1.0”},
  “algorithms”:[
  { 
  “Aalgorithm”: “SHA2-256”,
 “Rrevision”: “1.0”,
“MessageLength”: [ {“min”:8, “max”:51200, “increment”:8 } ]
 }
 ]
}
]

In this case, we receive a lot of test vectors comare to last year(previous system).
Our system is not a general system like pc, so it is very difficult to upload all the test vector to the chip’s memory at one time.
IF we use these so big test vector, then it make us very ineffient and time consuming work.

So, we tried again using separate request but satisfying SHAVS criteria.
But in this case, NIST DEMO server make erro in case of case 2 (in the following) like 256 bit case should be included to the request.
Actually we separet it to two cases like this. We thought these two cases satisfies SHAVS criteria.

Case 1.

  {“acvVersion”:”1.0”},
  “algorithms”:[
  { 
  “algorithm”: “SHA2-256”,
 “revision”: “1.0”,
“messageLength”: [ {“min”:8, “max”:512, “increment”:8 } ]
 }
 ]
}
]

Case 2.

  {“acvVersion”:”1.0”},
  “algorithms”:[
  { 
  “Aalgorithm”: “SHA2-256”,
 “Rrevision”: “1.0”,
“MessageLength”: [ {“min”:1304, “max”:51200, “increment”:792 } ]
 }
 ]
}
]

If you have any valuable comment on this situation, please let us know.
Thank you so much in advance.

environment
The environment the issue was experienced (Demo or Prod)

testSessionId
The test session ID

vsId
The vectorSet ID displaying the issue

Algorithm registration
The pertinent algorithm registration pieces (algorithm tested, capabilities, etc) in json format

Endpoint in which the error is experienced
https://[acvpUrl]/acvp/[endpoint] GET

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

AES-XPN on demo: "error" disposition with zeroed out test responses instead of "fail"

environment
Demo

testSessionId
117174

vsId
335684

Algorithm registration
[{"acvVersion":"1.0"},{"algorithms":[{"algorithm":"ACVP-AES-XPN","revision":"1.0","prereqVals":[{"algorithm":"AES","valValue":"same"},{"algorithm":"DRBG","valValue":"same"}],"direction":["encrypt","decrypt"],"ivGen":"internal","saltGen":"external","ivGenMode":"8.2.1","keyLen":[128,256],"tagLen":[128],"payloadLen":[16,128,136,256,264],"aadLen":[0,128,136,256]}]}]

Endpoint in which the error is experienced
/acvp/v1/testSessions/117174/results
/acvp/v1/testSessions/117174/vectorSets/335684/results

Expected behavior
Expected a "fail" disposition for VS 335684. Got "error" disposition.

Additional context
Working to add aes-xpn support to libacvp despite not having a crypto implementation to test with. So, am testing with zeroed out test responses. I would expect a fail disposition but am getting an error and am unable to retrieve the the results for the vector set as well - I get an error "error": "Object reference not set to an instance of an object."

The previous session run as sample, 117173, had the expected "fail" disposition and reasoning, with the exact same algorithm registration. Compared the expected results to my output results and the objects within the test cases seemed to match up (with the exception that we include testPassed: true and the server only seems to require that value when testPassed: false)

Thanks,
Andrew

RSA Upload Error on Demo

environment
Demo

testSessionId
/acvp/v1/testSessions/122000

vsId
362043, 362045, 362046

Result of these vector sets is, "error": "Responses for vsId 362043 not received by the server."

And we are trying to submit the result we got rejected as,

Upload failed. Validation error(s) on JSON payload. : ["Vector set not in 'failed' status.", "Unable to submit results when vector set in 'passed' status.", 'Unable to submit results when vector set has been archived']

It is confusing whether the result was received or not.

DRBG vector sets General exception

environment
Demo

testSessionId
/acvp/v1/testSessions/124122

vsId
/acvp/v1/testSessions/124122/vectorSets/370342

We got below error when trying to fetch vector sets.

"error": "General exception. Contact service provider."

Cannot List Resources (Vendor, Module, etc...)

environment
Demo (Prod is working OK)

testSessionId
N/A

vsId
N/A

Algorithm registration
N/A

Endpoint in which the error is experienced
GET https://demo.acvts.nist.gov/acvp/v1/vendors?limit=20&offset=0

 [
    {
        "acvVersion": "1.0"
    },
    {
        "error": "Internal service error. Contact service provider."
    }
]

Expected behaviour
I should be able to list resources

Additional context
This seems to be a consistently reoccurring issue subsequent to backend updates.

TLS v1.2 KDF provision for extended master secret

SP 800-52 rev 2 Section 3.4.1 requires support for Extended Master Secret (RFC 7627 Section 4).
The text of SP 800-135 rev 1 Section 4.2.2 is vague regarding the scope but references RFC 5246 Section 5 in a footnote and RFC 5246 generally in document citations.
Recognizing that:

  • SP 800-52 is not under the umbrella of FIPS 140 / SP 800-140* documents;
  • The status of Extended Master Secret as approved or not approved is outside the scope of CAVP / ACVP;
  • While RFC 7627 is not cited in SP 800-135 rev 1, the RFC 5246 Section 5 definition is broad enough to cover the Extended Master Secret calculation;

Q: Does the CAVP have any plan to test RFC 7627 Extended Master Secret as a variant of TLS KDF testing?

The situation may be similar to that of the TLS 1.3 KDF, where there was recognition of the need but some lag in approval.
If there is not a plan to test RFC 7627, where should the question of alignment of SP 800-52 and SP 800-135 be directed?
It's not clear if NIST CT have a mechanism to register issues of that type for resolution.

Error in posting SHA-1 result on production server

environment
Production server

testSessionId
The test session ID - 2767

vsId
The vectorSet ID - 26507

Algorithm registration
SHA-1

Endpoint in which the error is experienced
https://acvts.nist.gov:443/ PUT

Expected behavior
Expected the SHA-1 results to verify with no failures

Additional context
All other algorithms were validated without error. I compared the SHA2-256 response file with SHA-1 and first segment looked the same with exception of vector ID and algorithm.
The error seen is this:
"error": "Error converting value \u0022SHA-1\u0022 to type \u0027NIST.CVP.Crypto.Common.Hash.ShaWrapper.ModeValues\u0027. Path \u0027testGroups[0].function\u0027, line 9, position 25."

GMAC RETRY30

environment
Demo

testSessionId
118741

vsId
344099

After we submitted our result. The result of validation, expected result and vector sets are all become "retry": 30.

Scheduled Maintenance [ 2020-Nov-13 @ 4pm EST ]

Greetings ACVTS Demo and Prod Users,

On Friday, 2020-Nov-13 starting at 4pm EST, I will be taking the Demo and Prod environments offline to perform some necessary maintenance.

The expected downtime will be several hours, and I will send out a follow up email when the environments are back online once the maintenance has been completed.

Thanks,
Jason

KMAC AFT tests seem incorrect

environment
Demo

testSessionId
118292

vsId
340784,340785

Algorithm registration
[{"acvVersion":"1.0"},{"isSample":true,"algorithms":[{"algorithm":"KMAC-128","revision":"1.0","hexCustomization":true,"xof":[true,false],"msgLen":[{"min":0,"max":1024,"increment":8}],"keyLen":[{"min":128,"max":1024,"increment":8}],"macLen":[{"min":32,"max":512,"increment":8}]},{"algorithm":"KMAC-256","revision":"1.0","hexCustomization":false,"xof":[true,false],"msgLen":[{"min":0,"max":65536,"increment":8}],"keyLen":[{"min":128,"max":4096,"increment":8}],"macLen":[{"min":32,"max":4096,"increment":8}]}]}]

Endpoint in which the error is experienced
https://demo.acvts.nist.gov:443/acvp/v1 GET

Expected behavior
I think I expect the AFT test responses I'm generating to pass. The MVT tests now pass (fully) for both KMAC-128 and KMAC-256, however the AFT tests universally fail. I've tried swapping parameters and ignoring some, but I do not seem to be able to reproduce any of the AFT sample responses. The same code generating them is generating the MVT test results, it almost seems like the setup of the KMAC function in the server has an issue.

Additional context
A simple test vector for KMAC-128,
xof=true,
msg="",
customization="",
key="",
macLen=256,
mac="3f9259e80b35e0719c26025f7e38a4a38172bf1142a6a9c1930e50df03904312"

for KMAC-256 the same inputs produce:

mac="2c9683c318165466c0d3f9467ce77f0cea513f643ae3bd5b0969165aafae3f71"

"Decryption Failed" when retrieving KTS-IFC validation results

environment
Demo

testSessionId
123980

vsId
369802, 369803

Algorithm registration

  {
    "algorithm": "KTS-IFC",
    "revision": "Sp800-56Br2",
    "prereqVals": [{"algorithm":"DRBG","valValue":"same"},{"algorithm":"RSA","valValue":"same"},{"algorithm":"SHA","valValue":"same"}],
    "function": ["keyPairGen", "partialVal"],
    "iutId": "012345678",
    "keyGenerationMethods": ["rsakpg1-crt"],
    "modulo": [2048, 3072, 4096],
    "fixedPubExp": "010001",
    "scheme": {
      "KTS-OAEP-basic": {
        "kasRole": ["initiator","responder"],
        "ktsMethod": {
          "hashAlgs": ["SHA2-256"],
          "supportsNullAssociatedData": true,
          "associatedDataPattern": "label",
          "encoding": ["concatenation"]
        },
        "l": 256
      }
    }
  }

and the same with "hashAlgs": ["SHA2-384"] and "l": 384

Endpoint in which the error is experienced
GET acvp/v1/testSessions/123980/vectorSets/369802/results and GET acvp/v1/testSessions/123980/vectorSets/369803/results

Expected behavior
Information about the pass/fail state of each test case

Additional Context

  • The response is merely [{"acvVersion": "1.0"}, {"error": "Decryption failed."}]
  • POST-ing the responses did not return any errors

KAS-ECC only generates vectors for the first auxFunction and ignores any others

environment
Demo

testSessionId
125751

vsId
375761

Algorithm registration

  "algorithm": "KAS-ECC",
  "revision": "Sp800-56Ar3",
  "prereqVals": [{"algorithm":"DRBG","valValue":"same"},{"algorithm":"SHA","valValue":"same"},{"algorithm":"ECDSA","valValue":"same"},{"algorithm":"HMAC","valValue":"same"}],
  "function": ["keyPairGen","fullVal"],
  "iutId": "012345678",
  "scheme": {
    "onePassDh": {
      "kasRole": ["initiator","responder"],
      "kdfMethods": {
        "oneStepKdf": {
          "auxFunctions": [
            {"auxFunctionName": "SHA2-256"},
            {"auxFunctionName": "SHA2-384"}
          ],
          "fixedInfoPattern": "uPartyInfo||vPartyInfo",
          "encoding": ["concatenation"]
        }
      },
      "l": 512
    }
  },
  "domainParameterGenerationMethods": ["P-256"]
}

TOTP authentication failures

environment
Demo

testSessionId
various - the one discussed below is 129266

Today I had to request a large amount of test daa.

Quite often I get the following error:

ACVPProxy (14:59:31) (acvp-proxy) Error: Process following server response for HTTP return code 403: [
  {
    "acvVersion": "1.0"
  },
  {
    "error": "Access denied! Reason: TOTP failed to verify"
  }
]

When invoking the request some time later, it works again. My time is exact and taken from NTP.

See the time stamp in the log message if you want to search your log message.

AES-CTR plaintext value too large

Environment
Both Production and Demo

testSessionId (with vsID in parenthesis)
Prod: 3722 (vsID: 36462), 3724 (vsID: 36464), 3725 (vsID: 36465), 3726 (vsID: 36466), 3728 (vsID: 36490), 3729 (vsID: 36491)
Demo: 131104 (vsID: 404133), 131105 (vsID: 404134), 131106 (vsID: 404135), 131107 (vsID: 404136), 131115 (vsID: 404167), 131120 (vsID: 404176)

Algorithm registration

[
   {
      "acvVersion":"1.0"
   },
   {
      "algorithms":[
         {
            "algorithm":"ACVP-AES-CTR",
            "revision":"1.0",
            "direction":[
               "encrypt"
            ],
            "incrementalCounter":false,
            "overflowCounter":false,
            "keyLen":[
               128,
               192,
               256
            ],
            "payloadLen":[
               128
            ]
         }
      ]
   }
]

Vector sets 3722 and 131104 have both incrementalCounter and overflowCounter set to false.
Sets 3724 and 131105 have both incrementalCounter and overflowCounter set to true.
Sets 3725 and 131106 have incrementalCounter set to true and overflowCounter set to false.
Sets 3726 and 131107 have incrementalCounter set to false and overflowCounter set to true.

Endpoint in which the error is experienced
https://acvts.nist.gov/acvp/v1/testSessions
https://demo.acvts.nist.gov/acvp/v1/testSessions

Expected behavior
With payloadLen set to 128, I expect the 'pt' length to be at max 128 bits. However, tcId's 31-33 or 31-36 (depending on which options are selected for incrementalCounter and overflowCounter) have a 'pt' length of 32,000 hex characters, far surpassing 128 bits. This is the case for both demo and production servers, with each of the above combinations of incrementalCounter and overflowCounter set. See the first four testSessionId's listed above for both Demo and Prod servers.

Additional context
Setting 'performCounterTests' to true didn't change the above as this value defaults to true if not included. The problem doesn't exist when 'performCounterTests' is set to false (see Prod. vsID 36490 and Demo vsID 404167), but that's not what I need for my vendor.

Also, setting 'isSample' to true on the demo server when incrementalCounter was set to true and overflowCounter set to false produced only 3,200 hex characters instead of 32,000. See vsID: 404176.

Noticing substantial response time increase since Nov. 9, 2020 mid afternoon on both environments

environment
Demo and Prod

testSessionId
N/A

vsId
N/A

Algorithm registration
N/A

Endpoint in which the error is experienced
GET https://acvts.nist.gov/acvp/v1/vendors. took 23s
GET https://demo.acvts.nist.gov/acvp/v1/vendors took 26s
GET https://demo.acvts.nist.gov/acvp/v1/algorithms took 17s
GET https://acvts.nist.gov/acvp/v1/algorithms took 30s before timing out since my HTTP client timeout is set to 30s

Expected behaviour
Response times on route calls should not be as high as I'm seeing

Additional context
So it looks like starting roughly Nov. 9 in mid afternoon (although this probably isn't exact), the resource routes (vendor, module, etc...) seem to be taking a VERY long time to respond. They are actually hitting my HTTP client timeout in some cases without responding with the headers. Listing a vendors, for example is taking upwards of 23 seconds before responding.

Authentication, TOTP and the TOTP Window

environment
Demo and Production

Endpoint in which the error is experienced
POST https://demo.acvts.nist.gov/acvp/v1/login

The dilemma I am running into has to do with the adherence to the TOTP windows (which if I'm not mistaken is 30s). We have a system that needs to be able to asynchronously and intermittently (when required) refresh tokens that may have expired. This system services a team of people who each have their own subset of test sessions that they are currently working on. The bulk access token route doesn't solve my issue because I cannot control when a particular user will have a single or collection of test session JWTs that need to be refreshed. More specifically, two users could interact with the system seconds apart trying to interact with different test sessions. The first person will be allowed, but the second person will not be able to refresh their token because the TOTP Window has already been used as the error states.

Hopefully I've described the problem well enough.

RSA vector sets are different when isSample is changed.

environment
Demo

testSessionId
127649 & 127655

vsId
\testSessions\127649\vectorSets\384961
\testSessions\127655\vectorSets\385004

One of them isSample is true while the other is false.
And when the isSample is false, parameters are missing from the test cases but "deferred": true

RSA result 'retry 30'

environment
Demo

testSessionId
118146

vsId
340251

After vector set is uploaded, the result keeps showing as

"retry": 30

ACVP Server DB consistency issue?

During preparation of a search capability following https://github.com/usnistgov/ACVP/wiki/Finding-ACVTS-Metadata-IDs-of-Legacy-Validation-Data I tried to query the certificate for our ACVP Proxy tool: https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?product=11251.

I queried the Prod server for /acvp/v1/validations/11251 and got:

[
  {
    "acvVersion": "1.0"
  },
  {
    "url": "/acvp/v1/validations/11251",
    "validationId": "AES2189",
    "moduleUrl": "/acvp/v1/modules/428",
    "oeUrls": [
      "/acvp/v1/oes/744"
    ]
  }
]

This is followed by querying the Prod server /acvp/v1/modules/428 and I got

[
  {
    "acvVersion": "1.0"
  },
  {
    "url": "/acvp/v1/modules/428",
    "name": "AES GCM for User Data and Key Wrapping",
    "version": "POPOVICH10 1.0 (Firmware)",
    "type": "Firmware",
    "website": "www.hp.com",
    "vendorUrl": "/acvp/v1/vendors/428",
    "addressUrl": "/acvp/v1/vendors/428/addresses/428",
    "contactUrls": [
      "/acvp/v1/persons/553"
    ],
    "description": "The Hewlett Packard LTO-6 Tape Drive is a multi-chip standalone module composed of hardware and firmware components, providing cryptographic services to a host."
  }
]

This is strange - shouldn't there be my ACVP Proxy entries?

Besides, applying the same queries to the demo server, I get the very same data. What am I missing?

Download Sample Expected results output

When attempting to download sample vectors for a algorithm set that has now completed vector download the server returns an internal server error of "Internal service error. contact service provider". however, i believe that this should be the retry vector set that is returned for the test vectors when they are not yet ready.

Returned:
[
{
"acvVersion": "1.0"
},
{
"error": "Internal service error. Contact service provider."
}
]

Expected/Proposed:
[
{
"acvVersion": "1.0"
},
{
"retry": 30
}
]

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.