michael@0: #!/bin/sh michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # michael@0: # A Bourne shell script for running the NIST tdea Algorithm Validation Suite michael@0: # michael@0: # Before you run the script, set your PATH, LD_LIBRARY_PATH, ... environment michael@0: # variables appropriately so that the fipstest command and the NSPR and NSS michael@0: # shared libraries/DLLs are on the search path. Then run this script in the michael@0: # directory where the REQUEST (.req) files reside. The script generates the michael@0: # RESPONSE (.rsp) files in the same directory. michael@0: michael@0: #CBC_Known_Answer_tests michael@0: #Initial Permutation KAT michael@0: #Permutation Operation KAT michael@0: #Subsitution Table KAT michael@0: #Variable Key KAT michael@0: #Variable PlainText KAT michael@0: cbc_kat_requests=" michael@0: TCBCinvperm.req michael@0: TCBCpermop.req michael@0: TCBCsubtab.req michael@0: TCBCvarkey.req michael@0: TCBCvartext.req michael@0: " michael@0: michael@0: #CBC Monte Carlo KATs michael@0: cbc_monte_requests=" michael@0: TCBCMonte1.req michael@0: TCBCMonte2.req michael@0: TCBCMonte3.req michael@0: " michael@0: #Multi-block Message KATs michael@0: cbc_mmt_requests=" michael@0: TCBCMMT1.req michael@0: TCBCMMT2.req michael@0: TCBCMMT3.req michael@0: " michael@0: michael@0: ecb_kat_requests=" michael@0: TECBinvperm.req michael@0: TECBpermop.req michael@0: TECBsubtab.req michael@0: TECBvarkey.req michael@0: TECBvartext.req michael@0: " michael@0: michael@0: ecb_monte_requests=" michael@0: TECBMonte1.req michael@0: TECBMonte2.req michael@0: TECBMonte3.req michael@0: " michael@0: michael@0: ecb_mmt_requests=" michael@0: TECBMMT1.req michael@0: TECBMMT2.req michael@0: TECBMMT3.req michael@0: " michael@0: michael@0: for request in $ecb_mmt_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest tdea mmt ecb $request > $response michael@0: done michael@0: for request in $ecb_kat_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest tdea kat ecb $request > $response michael@0: done michael@0: for request in $ecb_monte_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest tdea mct ecb $request > $response michael@0: done michael@0: for request in $cbc_mmt_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest tdea mmt cbc $request > $response michael@0: done michael@0: for request in $cbc_kat_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest tdea kat cbc $request > $response michael@0: done michael@0: for request in $cbc_monte_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest tdea mct cbc $request > $response michael@0: done