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 B2886A04AD for ; Mon, 24 Jan 2022 20:09:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADECE4117A; Mon, 24 Jan 2022 20:09:33 +0100 (CET) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by mails.dpdk.org (Postfix) with ESMTP id 4D08C40040 for ; Mon, 24 Jan 2022 20:09:32 +0100 (CET) Received: by mail-qk1-f195.google.com with SMTP id t1so21373182qkt.11 for ; Mon, 24 Jan 2022 11:09:32 -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=HLNsaUVrL0VdR/Rsrv1kf9Vs+Q6ysosSy2RDOkrPs5KNGIgR89FnlBH/z7IE4lvkdq 6jbkkZVq5LSCI0n5dA0gW7X0CLkodwqMlnwqyigw1jHgvhjCpeZmrnEaS6LT5bN9JPGA nYOzPyImeSJzUQQlVrPyACXr6gB+8TkuFLwZA= 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=mLUEGARZxDH9XUi+6KstTeykwHbHP0fNM98udUIzS0nPvDW6lEV716NTCJnCZXQYNv n+kyVLimphIDgqp5vxDsEdqC94uFko82iO390jCG6/nTdY5Wbd/Iuc7xVBF2DHNryDZ+ BMjxrwSblZsaDONnb9FWNna3kt71HsUfIZGVyGhZTaPnanu97DMVDhzX5Bm4955iYKab hlWMrWeYRjsUfc8T3Zr9Kp+wuQbjurIXliCGtwmiFm351n+fg6oeZ/QILZKcme1rE2t4 XLKr89UWO4kJ4vR7TIOK6swCHNIakhNjrKgWXNQ/yzalO8F+PkxvIUe7wINLwXUUF1Xi +xxA== X-Gm-Message-State: AOAM531+aGBvhHV49J8Wkxe/A8dOcsW2P+Yt73/w6cXQ7p5/ybVTSQaj afYDfJlL9nmNfch/hXHTW2g3U5a9AyjJjBHqZQxtBXcGMLqCsyuWuAMsXCOxXF4lPr3H7p08eRW XEhF/xdOOLYAoePkkFKyYcX/OGP97hxNsxcBFtjmTPeuZ7ffPUUVP X-Google-Smtp-Source: ABdhPJwybyzJ6BxIobKMIeNOUy3kUK46iKZAEwBqkysPdiKLTJWXsXgI/GAeSUlesd77IHn1Gcqmvw== X-Received: by 2002:a05:620a:12f2:: with SMTP id f18mr821332qkl.773.1643051371361; Mon, 24 Jan 2022 11:09:31 -0800 (PST) Received: from blo.iol.unh.edu ([2601:187:807e:37c0:b8f3:1158:3aca:ef34]) by smtp.gmail.com with ESMTPSA id h7sm7706769qtb.15.2022.01.24.11.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 11:09:30 -0800 (PST) From: Brandon Lo To: ci@dpdk.org Cc: Brandon Lo Subject: [PATCH 4/4] doc: add readme file for acvp_tool Date: Mon, 24 Jan 2022 14:09:23 -0500 Message-Id: <20220124190923.745577-5-blo@iol.unh.edu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220124190923.745577-1-blo@iol.unh.edu> References: <20220124190923.745577-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