Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | #!/bin/sh |
michael@0 | 2 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | # |
michael@0 | 7 | # A Bourne shell script for running the NIST AES Algorithm Validation Suite |
michael@0 | 8 | # |
michael@0 | 9 | # Before you run the script, set your PATH, LD_LIBRARY_PATH, ... environment |
michael@0 | 10 | # variables appropriately so that the fipstest command and the NSPR and NSS |
michael@0 | 11 | # shared libraries/DLLs are on the search path. Then run this script in the |
michael@0 | 12 | # directory where the REQUEST (.req) files reside. The script generates the |
michael@0 | 13 | # RESPONSE (.rsp) files in the same directory. |
michael@0 | 14 | |
michael@0 | 15 | cbc_kat_requests=" |
michael@0 | 16 | CBCGFSbox128.req |
michael@0 | 17 | CBCGFSbox192.req |
michael@0 | 18 | CBCGFSbox256.req |
michael@0 | 19 | CBCKeySbox128.req |
michael@0 | 20 | CBCKeySbox192.req |
michael@0 | 21 | CBCKeySbox256.req |
michael@0 | 22 | CBCVarKey128.req |
michael@0 | 23 | CBCVarKey192.req |
michael@0 | 24 | CBCVarKey256.req |
michael@0 | 25 | CBCVarTxt128.req |
michael@0 | 26 | CBCVarTxt192.req |
michael@0 | 27 | CBCVarTxt256.req |
michael@0 | 28 | " |
michael@0 | 29 | |
michael@0 | 30 | cbc_mct_requests=" |
michael@0 | 31 | CBCMCT128.req |
michael@0 | 32 | CBCMCT192.req |
michael@0 | 33 | CBCMCT256.req |
michael@0 | 34 | " |
michael@0 | 35 | |
michael@0 | 36 | cbc_mmt_requests=" |
michael@0 | 37 | CBCMMT128.req |
michael@0 | 38 | CBCMMT192.req |
michael@0 | 39 | CBCMMT256.req |
michael@0 | 40 | " |
michael@0 | 41 | |
michael@0 | 42 | ecb_kat_requests=" |
michael@0 | 43 | ECBGFSbox128.req |
michael@0 | 44 | ECBGFSbox192.req |
michael@0 | 45 | ECBGFSbox256.req |
michael@0 | 46 | ECBKeySbox128.req |
michael@0 | 47 | ECBKeySbox192.req |
michael@0 | 48 | ECBKeySbox256.req |
michael@0 | 49 | ECBVarKey128.req |
michael@0 | 50 | ECBVarKey192.req |
michael@0 | 51 | ECBVarKey256.req |
michael@0 | 52 | ECBVarTxt128.req |
michael@0 | 53 | ECBVarTxt192.req |
michael@0 | 54 | ECBVarTxt256.req |
michael@0 | 55 | " |
michael@0 | 56 | |
michael@0 | 57 | ecb_mct_requests=" |
michael@0 | 58 | ECBMCT128.req |
michael@0 | 59 | ECBMCT192.req |
michael@0 | 60 | ECBMCT256.req |
michael@0 | 61 | " |
michael@0 | 62 | |
michael@0 | 63 | ecb_mmt_requests=" |
michael@0 | 64 | ECBMMT128.req |
michael@0 | 65 | ECBMMT192.req |
michael@0 | 66 | ECBMMT256.req |
michael@0 | 67 | " |
michael@0 | 68 | |
michael@0 | 69 | for request in $ecb_kat_requests; do |
michael@0 | 70 | response=`echo $request | sed -e "s/req/rsp/"` |
michael@0 | 71 | echo $request $response |
michael@0 | 72 | fipstest aes kat ecb $request > $response |
michael@0 | 73 | done |
michael@0 | 74 | for request in $ecb_mmt_requests; do |
michael@0 | 75 | response=`echo $request | sed -e "s/req/rsp/"` |
michael@0 | 76 | echo $request $response |
michael@0 | 77 | fipstest aes mmt ecb $request > $response |
michael@0 | 78 | done |
michael@0 | 79 | for request in $ecb_mct_requests; do |
michael@0 | 80 | response=`echo $request | sed -e "s/req/rsp/"` |
michael@0 | 81 | echo $request $response |
michael@0 | 82 | fipstest aes mct ecb $request > $response |
michael@0 | 83 | done |
michael@0 | 84 | for request in $cbc_kat_requests; do |
michael@0 | 85 | response=`echo $request | sed -e "s/req/rsp/"` |
michael@0 | 86 | echo $request $response |
michael@0 | 87 | fipstest aes kat cbc $request > $response |
michael@0 | 88 | done |
michael@0 | 89 | for request in $cbc_mmt_requests; do |
michael@0 | 90 | response=`echo $request | sed -e "s/req/rsp/"` |
michael@0 | 91 | echo $request $response |
michael@0 | 92 | fipstest aes mmt cbc $request > $response |
michael@0 | 93 | done |
michael@0 | 94 | for request in $cbc_mct_requests; do |
michael@0 | 95 | response=`echo $request | sed -e "s/req/rsp/"` |
michael@0 | 96 | echo $request $response |
michael@0 | 97 | fipstest aes mct cbc $request > $response |
michael@0 | 98 | done |