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 AES 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_kat_requests=" michael@0: CBCGFSbox128.req michael@0: CBCGFSbox192.req michael@0: CBCGFSbox256.req michael@0: CBCKeySbox128.req michael@0: CBCKeySbox192.req michael@0: CBCKeySbox256.req michael@0: CBCVarKey128.req michael@0: CBCVarKey192.req michael@0: CBCVarKey256.req michael@0: CBCVarTxt128.req michael@0: CBCVarTxt192.req michael@0: CBCVarTxt256.req michael@0: " michael@0: michael@0: cbc_mct_requests=" michael@0: CBCMCT128.req michael@0: CBCMCT192.req michael@0: CBCMCT256.req michael@0: " michael@0: michael@0: cbc_mmt_requests=" michael@0: CBCMMT128.req michael@0: CBCMMT192.req michael@0: CBCMMT256.req michael@0: " michael@0: michael@0: ecb_kat_requests=" michael@0: ECBGFSbox128.req michael@0: ECBGFSbox192.req michael@0: ECBGFSbox256.req michael@0: ECBKeySbox128.req michael@0: ECBKeySbox192.req michael@0: ECBKeySbox256.req michael@0: ECBVarKey128.req michael@0: ECBVarKey192.req michael@0: ECBVarKey256.req michael@0: ECBVarTxt128.req michael@0: ECBVarTxt192.req michael@0: ECBVarTxt256.req michael@0: " michael@0: michael@0: ecb_mct_requests=" michael@0: ECBMCT128.req michael@0: ECBMCT192.req michael@0: ECBMCT256.req michael@0: " michael@0: michael@0: ecb_mmt_requests=" michael@0: ECBMMT128.req michael@0: ECBMMT192.req michael@0: ECBMMT256.req michael@0: " michael@0: 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 aes kat ecb $request > $response michael@0: done 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 aes mmt ecb $request > $response michael@0: done michael@0: for request in $ecb_mct_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest aes mct ecb $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 aes kat cbc $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 aes mmt cbc $request > $response michael@0: done michael@0: for request in $cbc_mct_requests; do michael@0: response=`echo $request | sed -e "s/req/rsp/"` michael@0: echo $request $response michael@0: fipstest aes mct cbc $request > $response michael@0: done