nss: import at 3.0.1 beta 1
[mozilla-nss.git] / security / nss / cmd / fipstest / aes.sh
blob09ed494bf6b85c94dcb8066073e9a1e3fc088290
1 #!/bin/sh
3 # A Bourne shell script for running the NIST AES Algorithm Validation Suite
5 # Before you run the script, set your PATH, LD_LIBRARY_PATH, ... environment
6 # variables appropriately so that the fipstest command and the NSPR and NSS
7 # shared libraries/DLLs are on the search path. Then run this script in the
8 # directory where the REQUEST (.req) files reside. The script generates the
9 # RESPONSE (.rsp) files in the same directory.
11 cbc_kat_requests="
12 CBCGFSbox128.req
13 CBCGFSbox192.req
14 CBCGFSbox256.req
15 CBCKeySbox128.req
16 CBCKeySbox192.req
17 CBCKeySbox256.req
18 CBCVarKey128.req
19 CBCVarKey192.req
20 CBCVarKey256.req
21 CBCVarTxt128.req
22 CBCVarTxt192.req
23 CBCVarTxt256.req
26 cbc_mct_requests="
27 CBCMCT128.req
28 CBCMCT192.req
29 CBCMCT256.req
32 cbc_mmt_requests="
33 CBCMMT128.req
34 CBCMMT192.req
35 CBCMMT256.req
38 ecb_kat_requests="
39 ECBGFSbox128.req
40 ECBGFSbox192.req
41 ECBGFSbox256.req
42 ECBKeySbox128.req
43 ECBKeySbox192.req
44 ECBKeySbox256.req
45 ECBVarKey128.req
46 ECBVarKey192.req
47 ECBVarKey256.req
48 ECBVarTxt128.req
49 ECBVarTxt192.req
50 ECBVarTxt256.req
53 ecb_mct_requests="
54 ECBMCT128.req
55 ECBMCT192.req
56 ECBMCT256.req
59 ecb_mmt_requests="
60 ECBMMT128.req
61 ECBMMT192.req
62 ECBMMT256.req
65 for request in $ecb_kat_requests; do
66 response=`echo $request | sed -e "s/req/rsp/"`
67 echo $request $response
68 fipstest aes kat ecb $request > $response
69 done
70 for request in $ecb_mmt_requests; do
71 response=`echo $request | sed -e "s/req/rsp/"`
72 echo $request $response
73 fipstest aes mmt ecb $request > $response
74 done
75 for request in $ecb_mct_requests; do
76 response=`echo $request | sed -e "s/req/rsp/"`
77 echo $request $response
78 fipstest aes mct ecb $request > $response
79 done
80 for request in $cbc_kat_requests; do
81 response=`echo $request | sed -e "s/req/rsp/"`
82 echo $request $response
83 fipstest aes kat cbc $request > $response
84 done
85 for request in $cbc_mmt_requests; do
86 response=`echo $request | sed -e "s/req/rsp/"`
87 echo $request $response
88 fipstest aes mmt cbc $request > $response
89 done
90 for request in $cbc_mct_requests; do
91 response=`echo $request | sed -e "s/req/rsp/"`
92 echo $request $response
93 fipstest aes mct cbc $request > $response
94 done