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 C7922A00C5 for ; Wed, 2 Feb 2022 16:04:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3AF2410D5; Wed, 2 Feb 2022 16:04:58 +0100 (CET) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by mails.dpdk.org (Postfix) with ESMTP id 4654940689 for ; Wed, 2 Feb 2022 16:04:57 +0100 (CET) Received: by mail-io1-f49.google.com with SMTP id n17so25785464iod.4 for ; Wed, 02 Feb 2022 07:04:57 -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=CIJkKz37Q2ry3aRIjG27XIvmA0ICpejp1auUAhReGp6uaKZ7Sruyno4WeLiQQaa2bU +OXOuAHWPg4wiIw+NZoFyQHfcbSgd+Rcf/x/6z2JOE1QjT6g/g+PHyuIuAXb1q3n1WGe tnEEHJg7l0JmZfuZ3dceN7qa2KCeBdbkVU7y8= 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=PhtU7tx2bOHkLT8e2rhVbS9FW0k+wYv6rmuGlDfMhECnrLJMBUUPq10z3YOD7cA0gB q+DH/YfDKt6LvmyY3m9oCuDI1g1gCZ3YMY2CmFLQBOR0BC60S8opSvclFEcQLZotfeSy 4OleTrfRIbrT//iFbhEA0i5c+9GNeynfEZf6pO72eGiqbXHll4qJt59ZwCmO259VF7M/ FG6ArAde5glxxkVH70tMebe0J+89nnf9bGKstNcqkJDahwLZdRjIiBu6oy0Er8Lbo16q AEgapz71s1RoTolpgvNTg1e2s+He5yGeycg2Q/vu/L+6EBgh+mn85l/gZpgBW+huvEdn cq9w== X-Gm-Message-State: AOAM5325ui7wC6pgcyRTGcNQ6n7pUfJKOrzcPzrKgy9QOI8jkjsiVwF9 FBfSaKc5V6RPIRLYpi5xH0jzfA== X-Google-Smtp-Source: ABdhPJwGzEJqLSmHAUsmxaU9mtGiCiXJMg6Mcu1XAQ/gQ9HT126enr8px7njZXqfGSpSyOUzv/FdvQ== X-Received: by 2002:a05:6638:4105:: with SMTP id ay5mr15429946jab.128.1643814296636; Wed, 02 Feb 2022 07:04:56 -0800 (PST) Received: from blo.unh.edu ([2606:4100:3880:1270:9db9:ea15:56a9:4976]) by smtp.gmail.com with ESMTPSA id a6sm12081603ilk.6.2022.02.02.07.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 07:04:55 -0800 (PST) From: Brandon Lo To: thomas@monjalon.net Cc: ci@dpdk.org, Brandon Lo Subject: [PATCH v3 4/4] doc: add readme file for acvp_tool Date: Wed, 2 Feb 2022 10:04:45 -0500 Message-Id: <20220202150445.28995-5-blo@iol.unh.edu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220202150445.28995-1-blo@iol.unh.edu> References: <20220126181649.770364-1-blo@iol.unh.edu> <20220202150445.28995-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