From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD23FA04A3 for ; Wed, 26 Jan 2022 19:16:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0FB442760; Wed, 26 Jan 2022 19:16:56 +0100 (CET) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by mails.dpdk.org (Postfix) with ESMTP id 4589B42738 for ; Wed, 26 Jan 2022 19:16:56 +0100 (CET) Received: by mail-qt1-f179.google.com with SMTP id w6so427063qtk.4 for ; Wed, 26 Jan 2022 10:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QZc4UjgJLCMhRo0NA6AfehPeyNQRVtBAuFPRiCiTA+s=; b=TzqJvheuyxMyceNmfErpJUYwOePOZWhjjwgJGUUBdrtu2ane6Enpt0l+A20DDLRdhp lWMZ3poYqHzCDKkj0HoccQMU4oYiEpLLYrfsLasYhwr8SCyySyZJO5Bz2ZP3V7oNY3uP nhATwK4+jUSaVcRQ0ZPD6aWQfHaOoaIzak4P0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QZc4UjgJLCMhRo0NA6AfehPeyNQRVtBAuFPRiCiTA+s=; b=eCbjCHnJC5c8hklEBUq3YyAYKDbA6lPuzZ9Wt5RVjNfF39MHlKdZhGTdE3lV6zEc1D IGggtm8VzwP9o4xAjEv/iwKzNkrjHh5/SF1hyLESZP7Rt0uODHvZyEtPmTce5sr/vE6P ru+/IadpIWvb/usBbZNhinz6sg1WAau4HOHJtZcug96NRCbsI7KrKWF2a/Umt0PPDnYJ zGvbIl8L4UXWpjt4rjlBYwN4OP4TEOV+GBpNodqO5W3O3LZs4fEuZeMD8esZ1Dq83ZYN 20zNIw7iN4EU//021HsR1dU8ofD7cF1DJxdG3D0mDfintyerUW6f04qY8eQdNCb0dwuV sKdQ== X-Gm-Message-State: AOAM531VuV2vEkcxJxt62gqEKO+VWyoVBKfWrkCkABqMYAqmAyDo3oj1 PzBgEk9zFb20oa7cgyhjmmYUTZbGlJP2hY+WNJ72P4DLTMh8bQ7/lA+U7OvuLfU3XSl2j5jG9u1 q2RkCuJTju9rOIv8gqL8XL9WxAvWI9/ELuveRBofmjn3fFKe6hQ== X-Google-Smtp-Source: ABdhPJx+duqMFqQM1t9G5NAQncVf+WSRtL0tFJm6IeoyM0oGNzbrDfEf/dI8Tm7d/sj6M0ZbGRyiHw== X-Received: by 2002:ac8:9:: with SMTP id a9mr21153494qtg.351.1643221015308; Wed, 26 Jan 2022 10:16:55 -0800 (PST) Received: from blo.unh.edu (nt-238-78.w4.unh.edu. [132.177.238.78]) by smtp.gmail.com with ESMTPSA id v21sm3198qtx.13.2022.01.26.10.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 10:16:54 -0800 (PST) From: Brandon Lo To: ci@dpdk.org Cc: Brandon Lo Subject: [PATCH v2 4/4] doc: add readme file for acvp_tool Date: Wed, 26 Jan 2022 13:16:49 -0500 Message-Id: <20220126181649.770364-5-blo@iol.unh.edu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220126181649.770364-1-blo@iol.unh.edu> References: <20220126181649.770364-1-blo@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org This readme file contains instructions to set up and use the acvp_tool. Signed-off-by: Brandon Lo --- tools/acvp/README | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 tools/acvp/README diff --git a/tools/acvp/README b/tools/acvp/README new file mode 100644 index 0000000..0cd3acc --- /dev/null +++ b/tools/acvp/README @@ -0,0 +1,71 @@ +The ACVP tool is a general tool for interacting with the NIST ACVP API +in order to test different cryptographic implementations. + +It produces machine-readable output for parsing in a CI environment. + + +Requirements +------------ + +There are also packages you need to download from the requirements.txt file: +* pyotp +* requests + +The tool expects that you have all the credential files from NIST: +* Client certificate (usually a .cer file from NIST) +* Key file for the certificate +* Time-based one-time password seed file (usually a .txt file from NIST) + +The path to each file must be stored in an environment variable: +$ACVP_SEED_FILE = Path to the TOTP seed .txt file (given by NIST). +$ACVP_CERT_FILE = Path to the client .cer/.crt file (given by NIST). +$ACVP_KEY_FILE = Path to the certificate key file (generated by user). + +If you do not have the required files from NIST, you must email them +to create demo credentials. +https://pages.nist.gov/ACVP/#access + + +Setup +----- + +After setting the environment variables as described in the +"Requirements" section, you will need to edit the acvp_config.json file. + +The acvp_config.json file is expected to be a json object +containing two keys: "url" and "algorithms" + +"url" must be the base URL string of the API you want to use. +"algorithms" must be an array of algorithm objects as detailed in the +ACVP API specification here: +https://github.com/usnistgov/ACVP/wiki/ACVTS-End-User-Documentation + +Now you can use the acvp_tool.py script to register a test session, +upload the results, and download the verdict. + + +Usage +----- + +To see all options available, use the --help flag. + +First, register and download a new test session with the tool: + acvp_tool.py --request $DOWNLOAD_PATH +The file written to $DOWNLOAD_PATH will contain both the session information +and the test vectors. + +You should use the DPDK FIPS validation example application to test +the vectors in this file. The example application will generate +the result file which is uploaded back to the ACVP API. + +After running tests with the vector file, you can submit the result: + acvp_tool.py --response $RESULT_PATH --upload +where $RESULT_PATH is the path of the file containing the answers. + +Once you submit your results, you can do + acvp_tool.py --response $RESULT_PATH --verdict $VERDICT_PATH +where $VERDICT_PATH is where you want to save the verdict information. +The verdict file will contain the result of each test case submitted. + +You can also combine the options: + acvp_tool.py --response $RESULT_PATH --upload --verdict $VERDICT_PATH -- 2.25.1