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