summaryrefslogtreecommitdiff
path: root/mozilla/security/nss/tests/cipher
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla/security/nss/tests/cipher')
-rwxr-xr-xmozilla/security/nss/tests/cipher/cipher.sh138
-rw-r--r--mozilla/security/nss/tests/cipher/cipher.txt78
-rw-r--r--mozilla/security/nss/tests/cipher/dsa.txt43
-rw-r--r--mozilla/security/nss/tests/cipher/hash.txt43
-rwxr-xr-xmozilla/security/nss/tests/cipher/performance.sh187
-rw-r--r--mozilla/security/nss/tests/cipher/rsa.txt43
-rw-r--r--mozilla/security/nss/tests/cipher/symmkey.txt64
7 files changed, 596 insertions, 0 deletions
diff --git a/mozilla/security/nss/tests/cipher/cipher.sh b/mozilla/security/nss/tests/cipher/cipher.sh
new file mode 100755
index 0000000..b363b79
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/cipher.sh
@@ -0,0 +1,138 @@
+#! /bin/bash
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1994-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+########################################################################
+#
+# mozilla/security/nss/tests/cipher/cipher.sh
+#
+# Script to test NSS ciphers
+#
+# needs to work on all Unix and Windows platforms
+#
+# special strings
+# ---------------
+# FIXME ... known problems, search for this string
+# NOTE .... unexpected behavior
+#
+########################################################################
+
+############################## cipher_init #############################
+# local shell function to initialize this script
+########################################################################
+cipher_init()
+{
+ SCRIPTNAME="cipher.sh"
+ if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for
+ CLEANUP="${SCRIPTNAME}" # cleaning this script will do it
+ fi
+ if [ -z "${INIT_SOURCED}" ] ; then
+ cd ../common
+ . ./init.sh
+ fi
+ SCRIPTNAME="cipher.sh"
+ html_head "Cipher Tests"
+
+ CIPHERDIR=${HOSTDIR}/cipher
+ CIPHERTESTDIR=${QADIR}/../cmd/bltest
+ D_CIPHER="Cipher.$version"
+
+ CIPHER_TXT=${QADIR}/cipher/cipher.txt
+
+ mkdir -p ${CIPHERDIR}
+
+ cd ${CIPHERDIR}
+ P_CIPHER=.
+ if [ -n "${MULTIACCESS_DBM}" ]; then
+ P_CIPHER="multiaccess:${D_CIPHER}"
+ fi
+}
+
+############################## cipher_main #############################
+# local shell function to test NSS ciphers
+########################################################################
+cipher_main()
+{
+ while read EXP_RET PARAM TESTNAME
+ do
+ if [ -n "$EXP_RET" -a "$EXP_RET" != "#" ] ; then
+ PARAM=`echo $PARAM | sed -e "s/_-/ -/g"`
+ TESTNAME=`echo $TESTNAME | sed -e "s/_/ /g"`
+ echo "$SCRIPTNAME: $TESTNAME --------------------------------"
+ failedStr=""
+ inOff=0
+ res=0
+ while [ $inOff -lt 8 ]
+ do
+ outOff=0
+ while [ $outOff -lt 8 ]
+ do
+ echo "bltest -T -m $PARAM -d $CIPHERTESTDIR -1 $inOff -2 $outOff"
+ ${PROFTOOL} ${BINDIR}/bltest -T -m $PARAM -d $CIPHERTESTDIR -1 $inOff -2 $outOff
+ if [ $? -ne 0 ]; then
+ failedStr="$failedStr[$inOff:$outOff]"
+ fi
+ outOff=`expr $outOff + 1`
+ done
+ inOff=`expr $inOff + 1`
+ done
+ if [ -n "$failedStr" ]; then
+ html_msg 1 $EXP_RET "$TESTNAME (Failed in/out offset pairs:" \
+ " $failedStr)"
+ else
+ html_msg $res $EXP_RET "$TESTNAME"
+ fi
+ fi
+ done < ${CIPHER_TXT}
+}
+
+############################## cipher_cleanup ############################
+# local shell function to finish this script (no exit since it might be
+# sourced)
+########################################################################
+cipher_cleanup()
+{
+ html "</TABLE><BR>"
+ cd ${QADIR}
+ . common/cleanup.sh
+}
+
+################## main #################################################
+
+cipher_init
+cipher_main
+cipher_cleanup
diff --git a/mozilla/security/nss/tests/cipher/cipher.txt b/mozilla/security/nss/tests/cipher/cipher.txt
new file mode 100644
index 0000000..44fdfd0
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/cipher.txt
@@ -0,0 +1,78 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2001-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+#
+# This file defines the cipher tests
+#
+# expected
+# return bltest Test Case name
+# value params
+# ------- ---------- ---------------
+ 0 des_ecb_-E DES_ECB_Encrypt
+ 0 des_ecb_-D DES_ECB_Decrypt
+ 0 des_cbc_-E DES_CBC_Encrypt
+ 0 des_cbc_-D DES_CBC_Decrypt
+ 0 des3_ecb_-E DES3_ECB_Encrypt
+ 0 des3_ecb_-D DES3_ECB_Decrypt
+ 0 des3_cbc_-E DES3_CBC_Encrypt
+ 0 des3_cbc_-D DES3_CBC_Decrypt
+ 0 aes_ecb_-E AES_ECB_Encrypt
+ 0 aes_ecb_-D AES_ECB_Decrypt
+ 0 aes_cbc_-E AES_CBC_Encrypt
+ 0 aes_cbc_-D AES_CBC_Decrypt
+ 0 camellia_ecb_-E Camellia_ECB_Encrypt
+ 0 camellia_ecb_-D Camellia_ECB_Decrypt
+ 0 camellia_cbc_-E Camellia_CBC_Encrypt
+ 0 camellia_cbc_-D Camellia_CBC_Decrypt
+ 0 seed_ecb_-E SEED_ECB_Encrypt
+ 0 seed_ecb_-D SEED_ECB_Decrypt
+ 0 seed_cbc_-E SEED_CBC_Encrypt
+ 0 seed_cbc_-D SEED_CBC_Decrypt
+ 0 rc2_ecb_-E RC2_ECB_Encrypt
+ 0 rc2_ecb_-D RC2_ECB_Decrypt
+ 0 rc2_cbc_-E RC2_CBC_Encrypt
+ 0 rc2_cbc_-D RC2_CBC_Decrypt
+ 0 rc4_-E RC4_Encrypt
+ 0 rc4_-D RC4_Decrypt
+ 0 rsa_-E RSA_Encrypt
+ 0 rsa_-D RSA_Decrypt
+ 0 dsa_-S DSA_Sign
+ 0 dsa_-V DSA_Verify
+ 0 md2_-H MD2_Hash
+ 0 md5_-H MD5_Hash
+ 0 sha1_-H SHA1_Hash
+ 0 sha256_-H SHA256_Hash
+ 0 sha384_-H SHA384_Hash
+ 0 sha512_-H SHA512_Hash
diff --git a/mozilla/security/nss/tests/cipher/dsa.txt b/mozilla/security/nss/tests/cipher/dsa.txt
new file mode 100644
index 0000000..097ffda
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/dsa.txt
@@ -0,0 +1,43 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2000-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+#
+# This file enables test coverage of the dsa performance tests
+#
+#
+# mode keysize bufsize repetitions cxrepetitions
+ dsa 64 20 200 5
+ dsa 96 20 200 3
+ dsa 128 20 200 3
diff --git a/mozilla/security/nss/tests/cipher/hash.txt b/mozilla/security/nss/tests/cipher/hash.txt
new file mode 100644
index 0000000..423499c
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/hash.txt
@@ -0,0 +1,43 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2000-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+#
+# This file enables test coverage of the cryptographic hash performance tests
+#
+#
+# mode bufsize repetitions
+ md2 10240 5000
+ md5 10240 100000
+ sha1 10240 100000
diff --git a/mozilla/security/nss/tests/cipher/performance.sh b/mozilla/security/nss/tests/cipher/performance.sh
new file mode 100755
index 0000000..a8ad28c
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/performance.sh
@@ -0,0 +1,187 @@
+#!/bin/sh
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2000-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+#
+# This is just a quick script so we can still run our testcases.
+# Longer term we need a scriptable test environment..
+#
+. ../common/init.sh
+CURDIR=`pwd`
+if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
+ CURDIR=`cygpath -m ${CURDIR}`
+fi
+
+CIPHERDIR=${HOSTDIR}/cipher
+SKTESTS=${CURDIR}/symmkey.txt
+RSATESTS=${CURDIR}/rsa.txt
+DSATESTS=${CURDIR}/dsa.txt
+HASHTESTS=${CURDIR}/hash.txt
+SKPERFOUT=${CIPHERDIR}/skperfout.data
+RSAPERFOUT=${CIPHERDIR}/rsaperfout.data
+DSAPERFOUT=${CIPHERDIR}/dsaperfout.data
+HASHPERFOUT=${CIPHERDIR}/hashperfout.data
+PERFRESULTS=${HOSTDIR}/performance.html
+
+echo "<HTML><BODY>" >> ${PERFRESULTS}
+
+mkdir -p ${CIPHERDIR}
+cd ${CIPHERDIR}
+
+if [ -z $1 ]; then
+ TESTSET="all"
+else
+ TESTSET=$1
+fi
+
+if [ $TESTSET = "all" -o $TESTSET = "symmkey" ]; then
+echo "<TABLE BORDER=1><TR><TH COLSPAN=6>Symmetric Key Cipher Performance</TH></TR>" >> ${PERFRESULTS}
+echo "<TR bgcolor=lightGreen><TH>MODE</TH><TH>INPUT SIZE (bytes)</TH><TH>SYMMETRIC KEY SIZE (bits)</TH><TH>REPETITIONS (cx/op)</TH><TH>CONTEXT CREATION TIME (ms)</TH><TH>OPERATION TIME (ms)</TH></TR>" >> ${PERFRESULTS}
+
+while read mode keysize bufsize reps cxreps
+do
+ if [ $mode != "#" ]; then
+ echo "bltest -N -m $mode -b $bufsize -g $keysize -u $cxreps"
+ ${BINDIR}/bltest -N -m $mode -b $bufsize -g $keysize -u $cxreps >> ${SKPERFOUT}
+ mv "tmp.in.0" "$mode.in"
+ mv tmp.key $mode.key
+ if [ -f tmp.iv ]; then
+ mv tmp.iv $mode.iv
+ fi
+ echo "bltest -E -m $mode -i ${CIPHERDIR}/$mode.in -k ${CIPHERDIR}/$mode.key -v ${CIPHERDIR}/$mode.iv -p $reps -o ${CIPHERDIR}/$mode.out"
+ ${BINDIR}/bltest -E -m $mode -i ${CIPHERDIR}/$mode.in -k ${CIPHERDIR}/$mode.key -v ${CIPHERDIR}/$mode.iv -p $reps -o ${CIPHERDIR}/$mode.out >> ${SKPERFOUT}
+ echo "bltest -D -m $mode -i ${CIPHERDIR}/$mode.out -k ${CIPHERDIR}/$mode.key -v ${CIPHERDIR}/$mode.iv -p $reps -o ${CIPHERDIR}/$mode.inv"
+ ${BINDIR}/bltest -D -m $mode -i ${CIPHERDIR}/$mode.out -k ${CIPHERDIR}/$mode.key -v ${CIPHERDIR}/$mode.iv -p $reps -o ${CIPHERDIR}/$mode.inv >> ${SKPERFOUT}
+ fi
+done < ${SKTESTS}
+
+while read md buf sk rps cxrps cx op
+do
+ if [ $md != "#" ]; then
+ echo "<TR><TH>$md</TH><TD align=right>$buf</TD><TD align=right>$sk</TD><TD align=right>$cxrps/$rps</TD><TD align=right>$cx</TD><TD align=right>$op</TD></TR>" >> ${PERFRESULTS}
+ fi
+done < ${SKPERFOUT}
+
+echo "</TABLE><BR>" >> ${PERFRESULTS}
+
+fi
+
+if [ $TESTSET = "all" -o $TESTSET = "rsa" ]; then
+while read mode keysize bufsize exp reps cxreps
+do
+ if [ $mode != "#" ]; then
+ echo "bltest -N -m $mode -b $bufsize -e $exp -g $keysize -u $cxreps"
+ ${BINDIR}/bltest -N -m $mode -b $bufsize -e $exp -g $keysize -u $cxreps >> ${RSAPERFOUT}
+ mv "tmp.in.0" "$mode.in"
+ mv tmp.key $mode.key
+ echo "bltest -E -m $mode -i ${CIPHERDIR}/$mode.in -k ${CIPHERDIR}/$mode.key -p $reps -o ${CIPHERDIR}/$mode.out"
+ ${BINDIR}/bltest -E -m $mode -i ${CIPHERDIR}/$mode.in -k ${CIPHERDIR}/$mode.key -p $reps -o ${CIPHERDIR}/$mode.out >> ${RSAPERFOUT}
+ echo "bltest -D -m $mode -i ${CIPHERDIR}/$mode.out -k ${CIPHERDIR}/$mode.key -p $reps -o ${CIPHERDIR}/$mode.inv"
+ ${BINDIR}/bltest -D -m $mode -i ${CIPHERDIR}/$mode.out -k ${CIPHERDIR}/$mode.key -p $reps -o ${CIPHERDIR}/$mode.inv >> ${RSAPERFOUT}
+ fi
+done < ${RSATESTS}
+
+echo "<TABLE BORDER=1><TR><TH COLSPAN=7>RSA Cipher Performance</TH></TR>" >> ${PERFRESULTS}
+echo "<TR bgcolor=lightGreen><TH>MODE</TH><TH>INPUT SIZE (bytes)</TH><TH>KEY SIZE (bits)</TH><TH>PUBLIC EXPONENT</TH><TH>REPETITIONS (cx/op)</TH><TH>CONTEXT CREATION TIME (ms)</TH><TH>OPERATION TIME (ms)</TH></TR>" >> ${PERFRESULTS}
+
+while read md buf mod pe rps cxrps cx op
+do
+ if [ $md != "#" ]; then
+ echo "<TR><TH>$md</TH><TD align=right>$buf</TD><TD align=right>$mod</TD><TD align=right>$pe</TD><TD align=right>$cxrps/$rps</TD><TD align=right>$cx</TD><TD align=right>$op</TD></TR>" >> ${PERFRESULTS}
+ fi
+done < ${RSAPERFOUT}
+
+echo "</TABLE><BR>" >> ${PERFRESULTS}
+fi
+
+if [ $TESTSET = "all" -o $TESTSET = "dsa" ]; then
+
+while read mode keysize bufsize reps cxreps
+do
+ if [ $mode != "#" ]; then
+ echo "bltest -N -m $mode -b $bufsize -g $keysize -u $cxreps"
+ ${BINDIR}/bltest -N -m $mode -b $bufsize -g $keysize -u $cxreps >> ${DSAPERFOUT}
+ mv "tmp.in.0" "$mode.in"
+ mv tmp.key $mode.key
+ echo "bltest -S -m $mode -i ${CIPHERDIR}/$mode.in -k ${CIPHERDIR}/$mode.key -p $reps -o ${CIPHERDIR}/$mode.out"
+ ${BINDIR}/bltest -S -m $mode -i ${CIPHERDIR}/$mode.in -k ${CIPHERDIR}/$mode.key -p $reps -o ${CIPHERDIR}/$mode.out >> ${DSAPERFOUT}
+ echo "bltest -V -m $mode -f ${CIPHERDIR}/$mode.out -k ${CIPHERDIR}/$mode.key -p $reps -i ${CIPHERDIR}/$mode.in -o ${CIPHERDIR}/$mode.out"
+ ${BINDIR}/bltest -V -m $mode -f ${CIPHERDIR}/$mode.out -k ${CIPHERDIR}/$mode.key -p $reps -i ${CIPHERDIR}/$mode.in -o ${CIPHERDIR}/$mode.out >> ${DSAPERFOUT}
+ fi
+done < ${DSATESTS}
+
+echo "<TABLE BORDER=1><TR><TH COLSPAN=6>DSA Cipher Performance</TH></TR>" >> ${PERFRESULTS}
+echo "<TR bgcolor=lightGreen><TH>MODE</TH><TH>INPUT SIZE (bytes)</TH><TH>KEY SIZE (bits)</TH><TH>REPETITIONS (cx/op)</TH><TH>CONTEXT CREATION TIME (ms)</TH><TH>OPERATION TIME (ms)</TH></TR>" >> ${PERFRESULTS}
+
+while read md buf mod rps cxrps cx op
+do
+ if [ $md != "#" ]; then
+ echo "<TR><TH>$md</TH><TD align=right>$buf</TD><TD align=right>$mod</TD><TD align=right>$cxrps/$rps</TD><TD align=right>$cx</TD><TD align=right>$op</TD></TR>" >> ${PERFRESULTS}
+ fi
+done < ${DSAPERFOUT}
+
+echo "</TABLE><BR>" >> ${PERFRESULTS}
+fi
+
+if [ $TESTSET = "all" -o $TESTSET = "hash" ]; then
+while read mode bufsize reps
+do
+ if [ $mode != "#" ]; then
+ echo "bltest -N -m $mode -b $bufsize"
+ ${BINDIR}/bltest -N -m $mode -b $bufsize
+ mv "tmp.in.0" "$mode.in"
+ echo "bltest -H -m $mode -i ${CIPHERDIR}/$mode.in -p $reps -o ${CIPHERDIR}/$mode.out"
+ ${BINDIR}/bltest -H -m $mode -i ${CIPHERDIR}/$mode.in -p $reps -o ${CIPHERDIR}/$mode.out >> ${HASHPERFOUT}
+ fi
+done < ${HASHTESTS}
+
+echo "<TABLE BORDER=1><TR><TH COLSPAN=6>Hash Cipher Performance</TH></TR>" >> ${PERFRESULTS}
+echo "<TR bgcolor=lightGreen><TH>MODE</TH><TH>INPUT SIZE (bytes)</TH><TH>REPETITIONS</TH><TH>OPERATION TIME (ms)</TH></TR>" >> ${PERFRESULTS}
+
+while read md buf rps cxrps cx op
+do
+ if [ $md != "#" ]; then
+ echo "<TR><TH>$md</TH><TD align=right>$buf</TD><TD align=right>$rps</TD><TD align=right>$op</TD></TR>" >> ${PERFRESULTS}
+ fi
+done < ${HASHPERFOUT}
+
+echo "</TABLE><BR>" >> ${PERFRESULTS}
+fi
+
+#rm -f ${TEMPFILES}
+cd ${CURDIR}
+
+echo "</BODY></HTML>" >> ${PERFRESULTS}
diff --git a/mozilla/security/nss/tests/cipher/rsa.txt b/mozilla/security/nss/tests/cipher/rsa.txt
new file mode 100644
index 0000000..377b252
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/rsa.txt
@@ -0,0 +1,43 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2000-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+#
+# This file enables test coverage of the rsa performance tests
+#
+#
+# mode keysize bufsize exponent repetitions cxrepetitions
+ rsa 32 32 17 1000 5
+ rsa 64 64 3 500 3
+ rsa 128 128 65537 200 3
diff --git a/mozilla/security/nss/tests/cipher/symmkey.txt b/mozilla/security/nss/tests/cipher/symmkey.txt
new file mode 100644
index 0000000..1dab07b
--- /dev/null
+++ b/mozilla/security/nss/tests/cipher/symmkey.txt
@@ -0,0 +1,64 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2000-2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+#
+# This file enables test coverage of the symmetric key performance tests
+#
+#
+# mode keysize bufsize repetitions cxrepetitions
+ des_ecb 8 8192 1000 100000
+ des_cbc 8 8192 1000 100000
+ des3_ecb 24 8192 1000 100000
+ des3_cbc 24 8192 1000 100000
+ rc2_ecb 5 8192 1000 100000
+ rc2_ecb 8 8192 1000 100000
+ rc2_ecb 16 8192 1000 100000
+ rc2_cbc 5 8192 1000 100000
+ rc2_cbc 8 8192 1000 100000
+ rc2_cbc 16 8192 1000 100000
+ rc4 5 8192 10000 100000
+ rc4 8 8192 10000 100000
+ rc4 16 8192 10000 100000
+ rc4 24 8192 10000 100000
+ aes_ecb 16 8192 10000 100000
+ aes_cbc 16 8192 10000 100000
+ aes_ecb 32 8192 10000 100000
+ aes_cbc 32 8192 10000 100000
+ camellia_ecb 16 8192 10000 100000
+ camellia_cbc 16 8192 10000 100000
+ camellia_ecb 32 8192 10000 100000
+ camellia_cbc 32 8192 10000 100000
+ seed_ecb 16 8192 10000 100000
+ seed_cbc 16 8192 10000 100000