Compare commits
15 Commits
FIPS_098_T
...
OpenSSL-fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d0a5219aa | ||
|
|
63fc9883c5 | ||
|
|
d1321464f6 | ||
|
|
a0055fbef4 | ||
|
|
2f9048b8a1 | ||
|
|
d73ed541db | ||
|
|
e6e5592a50 | ||
|
|
663bbb6367 | ||
|
|
98ced05c56 | ||
|
|
5b75e1cff4 | ||
|
|
f36a8c2060 | ||
|
|
90ac9ec264 | ||
|
|
fe5c4c885b | ||
|
|
1950e8acea | ||
|
|
437bafa5cc |
57
Configure
57
Configure
@@ -358,6 +358,9 @@ my %table=(
|
||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
|
||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
|
||||
|
||||
# Android: Linux but without -DTERMIO and pointers to headers and libs.
|
||||
"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### *BSD [do see comment about ${BSDthreads} above!]
|
||||
"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -566,7 +569,8 @@ my $idx_arflags = $idx++;
|
||||
my $prefix="";
|
||||
my $openssldir="";
|
||||
my $exe_ext="";
|
||||
my $install_prefix="";
|
||||
my $install_prefix="$ENV{'INSTALL_PREFIX'}";
|
||||
my $cross_compile_prefix="$ENV{'CROSS_COMPILE'}";
|
||||
my $fipslibdir="/usr/local/ssl/lib/fips-1.0/";
|
||||
my $nofipscanistercheck=0;
|
||||
my $fipsdso=0;
|
||||
@@ -1221,12 +1225,19 @@ if (!$IsMK1MF)
|
||||
}
|
||||
|
||||
$cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/);
|
||||
# Compiler fix-ups
|
||||
if ($target =~ /icc$/)
|
||||
|
||||
#
|
||||
# Platform fix-ups
|
||||
#
|
||||
if ($target =~ /\-icc$/) # Intel C compiler
|
||||
{
|
||||
my($iccver)=`$cc -V 2>&1`;
|
||||
if ($iccver =~ /Version ([0-9]+)\./) { $iccver=$1; }
|
||||
else { $iccver=0; }
|
||||
my $iccver=0;
|
||||
if (open(FD,"$cc -V 2>&1 |"))
|
||||
{
|
||||
while(<FD>) { $iccver=$1 if (/Version ([0-9]+)\./); }
|
||||
close(FD);
|
||||
}
|
||||
|
||||
if ($iccver>=8)
|
||||
{
|
||||
# Eliminate unnecessary dependency from libirc.a. This is
|
||||
@@ -1234,6 +1245,28 @@ if ($target =~ /icc$/)
|
||||
# apps/openssl can end up in endless loop upon startup...
|
||||
$cflags.=" -Dmemcpy=__builtin_memcpy -Dmemset=__builtin_memset";
|
||||
}
|
||||
if ($iccver>=9)
|
||||
{
|
||||
$cflags.=" -i-static";
|
||||
$cflags=~s/\-no_cpprt/-no-cpprt/;
|
||||
}
|
||||
if ($iccver>=10)
|
||||
{
|
||||
$cflags=~s/\-i\-static/-static-intel/;
|
||||
}
|
||||
}
|
||||
|
||||
# Unlike other OSes (like Solaris, Linux, Tru64, IRIX) BSD run-time
|
||||
# linkers (tested OpenBSD, NetBSD and FreeBSD) "demand" RPATH set on
|
||||
# .so objects. Apparently application RPATH is not global and does
|
||||
# not apply to .so linked with other .so. Problem manifests itself
|
||||
# when libssl.so fails to load libcrypto.so. One can argue that we
|
||||
# should engrave this into Makefile.shared rules or into BSD-* config
|
||||
# lines above. Meanwhile let's try to be cautious and pass -rpath to
|
||||
# linker only when --prefix is not /usr.
|
||||
if ($target =~ /^BSD\-/)
|
||||
{
|
||||
$shared_ldflag.=" -Wl,-rpath,\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|);
|
||||
}
|
||||
|
||||
if ($sys_id ne "")
|
||||
@@ -1368,7 +1401,16 @@ while (<IN>)
|
||||
s/^PLATFORM=.*$/PLATFORM=$target/;
|
||||
s/^OPTIONS=.*$/OPTIONS=$options/;
|
||||
s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/;
|
||||
s/^CC=.*$/CC= $cc/;
|
||||
if ($cross_compile_prefix)
|
||||
{
|
||||
s/^CC=.*$/CROSS_COMPILE= $cross_compile_prefix\nCC= \$\(CROSS_COMPILE\)$cc/;
|
||||
s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/;
|
||||
s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
|
||||
}
|
||||
else {
|
||||
s/^CC=.*$/CC= $cc/;
|
||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||
}
|
||||
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
|
||||
s/^CFLAG=.*$/CFLAG= $cflags/;
|
||||
s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
|
||||
@@ -1387,7 +1429,6 @@ while (<IN>)
|
||||
s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
|
||||
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
||||
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||
s/^ARFLAGS=.*/ARFLAGS= $arflags/;
|
||||
s/^PERL=.*/PERL= $perl/;
|
||||
s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
|
||||
|
||||
14
Makefile.org
14
Makefile.org
@@ -512,12 +512,14 @@ dclean:
|
||||
@set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
|
||||
|
||||
rehash: rehash.time
|
||||
rehash.time: certs
|
||||
@(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
||||
OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
touch rehash.time
|
||||
rehash.time: certs apps
|
||||
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
||||
(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
||||
OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
$(PERL) tools/c_rehash certs) && \
|
||||
touch rehash.time; \
|
||||
else :; fi
|
||||
|
||||
test: tests
|
||||
|
||||
|
||||
@@ -466,7 +466,7 @@ link_o.hpux:
|
||||
ALLSYMSFLAGS='-Wl,-Fl'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+cdp,../:,+cdp,./:"; \
|
||||
fi; \
|
||||
rm -f $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX || :; \
|
||||
$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
|
||||
@@ -479,7 +479,7 @@ link_a.hpux:
|
||||
ALLSYMSFLAGS='-Wl,-Fl'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+cdp,../:,+cdp,./:"; \
|
||||
fi; \
|
||||
rm -f $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX || :; \
|
||||
$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
|
||||
|
||||
@@ -153,17 +153,14 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
elif [ -n "$(FIPSCANLIB)" ]; then \
|
||||
FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
|
||||
FIPSLD_CC="$(CC)"; CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
|
||||
fi; \
|
||||
LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
|
||||
[ "x$(FIPSCANLIB)" = "xlibfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||
CC=$${CC} APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
|
||||
CC="$${CC}" APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
|
||||
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
|
||||
link_app.$${shlib_target}
|
||||
-(cd ..; \
|
||||
OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
|
||||
progs.h: progs.pl
|
||||
$(PERL) progs.pl $(E_EXE) >progs.h
|
||||
|
||||
22
apps/dgst.c
22
apps/dgst.c
@@ -256,29 +256,33 @@ ERR_load_crypto_strings();
|
||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm (default)\n",
|
||||
LN_md5,LN_md5);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_md4,LN_md4);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_md2,LN_md2);
|
||||
#ifndef OPENSSL_NO_SHA
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_sha1,LN_sha1);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_sha,LN_sha);
|
||||
#ifndef OPENSSL_NO_SHA256
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_sha224,LN_sha224);
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_sha256,LN_sha256);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_sha384,LN_sha384);
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_sha512,LN_sha512);
|
||||
#endif
|
||||
#endif
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_mdc2,LN_mdc2);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
|
||||
LN_ripemd160,LN_ripemd160);
|
||||
err=1;
|
||||
goto end;
|
||||
|
||||
8
config
8
config
@@ -48,10 +48,10 @@ done
|
||||
|
||||
# First get uname entries that we use below
|
||||
|
||||
MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
|
||||
RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
|
||||
SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
|
||||
VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
|
||||
[ "$MACHINE" ] || MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
|
||||
[ "$RELEASE" ] || RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
|
||||
[ "$SYSTEM" ] || SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
|
||||
[ "$BUILD" ] || VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
|
||||
|
||||
|
||||
# Now test for ISC and SCO, since it is has a braindamaged uname.
|
||||
|
||||
@@ -62,9 +62,11 @@ typedef struct {
|
||||
/* XXX: probably some better way to do this */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#define UNALIGNED_MEMOPS_ARE_FAST 1
|
||||
#else
|
||||
#define UNALIGNED_MEMOPS_ARE_FAST 0
|
||||
#endif
|
||||
|
||||
#ifdef UNALIGNED_MEMOPS_ARE_FAST
|
||||
#if UNALIGNED_MEMOPS_ARE_FAST
|
||||
#define load_block(d, s) (d) = *(const aes_block_t *)(s)
|
||||
#define store_block(d, s) *(aes_block_t *)(d) = (s)
|
||||
#else
|
||||
@@ -89,7 +91,8 @@ void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
|
||||
if (AES_ENCRYPT == enc)
|
||||
{
|
||||
if (in != out)
|
||||
if (in != out &&
|
||||
(UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
|
||||
{
|
||||
aes_block_t *ivp = (aes_block_t *)ivec;
|
||||
aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
|
||||
@@ -143,7 +146,8 @@ void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
}
|
||||
else
|
||||
{
|
||||
if(in != out)
|
||||
if (in != out &&
|
||||
(UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
|
||||
{
|
||||
aes_block_t *ivp = (aes_block_t *)ivec;
|
||||
aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
#include <openssl/bn.h> /* To get BN_LLONG properly defined */
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#ifdef BN_LLONG
|
||||
#if defined(BN_LLONG) || defined(SIXTY_FOUR_BIT)
|
||||
# ifndef HAVE_LONG_LONG
|
||||
# define HAVE_LONG_LONG 1
|
||||
# endif
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
#if HAVE_LONG_LONG
|
||||
# if defined(OPENSSL_SYS_WIN32) && !defined(__GNUC__)
|
||||
# define LLONG _int64
|
||||
# define LLONG __int64
|
||||
# else
|
||||
# define LLONG long long
|
||||
# endif
|
||||
|
||||
@@ -456,9 +456,6 @@ int BIO_sock_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
#ifdef SIGINT
|
||||
signal(SIGINT,(void (*)(int))BIO_sock_cleanup);
|
||||
#endif
|
||||
wsa_init_done=1;
|
||||
memset(&wsa_state,0,sizeof(wsa_state));
|
||||
if (WSAStartup(0x0101,&wsa_state)!=0)
|
||||
@@ -484,11 +481,6 @@ int BIO_sock_init(void)
|
||||
|
||||
if (!wsa_init_done)
|
||||
{
|
||||
|
||||
# ifdef SIGINT
|
||||
signal(SIGINT,(void (*)(int))BIO_sock_cleanup);
|
||||
# endif
|
||||
|
||||
wsa_init_done=1;
|
||||
wVerReq = MAKEWORD( 2, 0 );
|
||||
err = WSAStartup(wVerReq,&wsaData);
|
||||
@@ -511,7 +503,7 @@ void BIO_sock_cleanup(void)
|
||||
{
|
||||
wsa_init_done=0;
|
||||
#ifndef OPENSSL_SYS_WINCE
|
||||
WSACancelBlockingCall();
|
||||
WSACancelBlockingCall(); /* Winsock 1.1 specific */
|
||||
#endif
|
||||
WSACleanup();
|
||||
}
|
||||
|
||||
@@ -129,8 +129,8 @@ extern "C" {
|
||||
/* dgram BIO stuff */
|
||||
#define BIO_CTRL_DGRAM_CONNECT 31 /* BIO dgram special */
|
||||
#define BIO_CTRL_DGRAM_SET_CONNECTED 32 /* allow for an externally
|
||||
* connected socket to be
|
||||
* passed in */
|
||||
* connected socket to be
|
||||
* passed in */
|
||||
#define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33 /* setsockopt, essentially */
|
||||
#define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34 /* getsockopt, essentially */
|
||||
#define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35 /* setsockopt, essentially */
|
||||
@@ -146,14 +146,14 @@ extern "C" {
|
||||
#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */
|
||||
#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */
|
||||
#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for
|
||||
* MTU. want to use this
|
||||
* if asking the kernel
|
||||
* fails */
|
||||
* MTU. want to use this
|
||||
* if asking the kernel
|
||||
* fails */
|
||||
|
||||
#define BIO_CTRL_DGRAM_MTU_EXCEEDED 43 /* check whether the MTU
|
||||
* was exceed in the
|
||||
* previous write
|
||||
* operation */
|
||||
* was exceed in the
|
||||
* previous write
|
||||
* operation */
|
||||
|
||||
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ bn_mul_mont:
|
||||
push %r14
|
||||
push %r15
|
||||
|
||||
mov ${num}d,${num}d
|
||||
lea 2($num),%rax
|
||||
mov %rsp,%rbp
|
||||
neg %rax
|
||||
|
||||
@@ -299,6 +299,8 @@ int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
|
||||
}
|
||||
for (ri+=4; i<ri; i++)
|
||||
rp[i]=nrp[i], ap[i]=0;
|
||||
bn_correct_top(r);
|
||||
bn_correct_top(ret);
|
||||
# else
|
||||
if (bn_wexpand(ret,al) == NULL) goto err;
|
||||
ret->top=al;
|
||||
|
||||
@@ -377,14 +377,14 @@ static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
|
||||
static int probable_prime(BIGNUM *rnd, int bits)
|
||||
{
|
||||
int i;
|
||||
BN_ULONG mods[NUMPRIMES];
|
||||
prime_t mods[NUMPRIMES];
|
||||
BN_ULONG delta,maxdelta;
|
||||
|
||||
again:
|
||||
if (!BN_rand(rnd,bits,1,1)) return(0);
|
||||
/* we now have a random number 'rand' to test. */
|
||||
for (i=1; i<NUMPRIMES; i++)
|
||||
mods[i]=BN_mod_word(rnd,(BN_ULONG)primes[i]);
|
||||
mods[i]=(prime_t)BN_mod_word(rnd,(BN_ULONG)primes[i]);
|
||||
maxdelta=BN_MASK2 - primes[NUMPRIMES-1];
|
||||
delta=0;
|
||||
loop: for (i=1; i<NUMPRIMES; i++)
|
||||
|
||||
@@ -58,10 +58,12 @@
|
||||
|
||||
#ifndef EIGHT_BIT
|
||||
#define NUMPRIMES 2048
|
||||
typedef unsigned short prime_t;
|
||||
#else
|
||||
#define NUMPRIMES 54
|
||||
typedef unsigned char prime_t;
|
||||
#endif
|
||||
static const unsigned int primes[NUMPRIMES]=
|
||||
static const prime_t primes[NUMPRIMES]=
|
||||
{
|
||||
2, 3, 5, 7, 11, 13, 17, 19,
|
||||
23, 29, 31, 37, 41, 43, 47, 53,
|
||||
|
||||
@@ -101,10 +101,12 @@ for ($i=0; $i <= $#primes; $i++)
|
||||
|
||||
printf "#ifndef EIGHT_BIT\n";
|
||||
printf "#define NUMPRIMES %d\n",$num;
|
||||
printf "typedef unsigned short prime_t;\n";
|
||||
printf "#else\n";
|
||||
printf "#define NUMPRIMES %d\n",$eight;
|
||||
printf "typedef unsigned char prime_t;\n";
|
||||
printf "#endif\n";
|
||||
print "static const unsigned int primes[NUMPRIMES]=\n\t{\n\t";
|
||||
print "static const prime_t primes[NUMPRIMES]=\n\t{\n\t";
|
||||
$init=0;
|
||||
for ($i=0; $i <= $#primes; $i++)
|
||||
{
|
||||
|
||||
@@ -116,7 +116,7 @@ int DES_check_key_parity(const_DES_cblock *key)
|
||||
* (and actual cblock values).
|
||||
*/
|
||||
#define NUM_WEAK_KEY 16
|
||||
static DES_cblock weak_keys[NUM_WEAK_KEY]={
|
||||
static const DES_cblock weak_keys[NUM_WEAK_KEY]={
|
||||
/* weak keys */
|
||||
{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
|
||||
{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE},
|
||||
|
||||
@@ -119,13 +119,20 @@ static int dsa_builtin_paramgen(DSA *ret, int bits,
|
||||
if (bits < 512) bits=512;
|
||||
bits=(bits+63)/64*64;
|
||||
|
||||
if (seed_len < 20)
|
||||
/* NB: seed_len == 0 is special case: copy generated seed to
|
||||
* seed_in if it is not NULL.
|
||||
*/
|
||||
if (seed_len && (seed_len < 20))
|
||||
seed_in = NULL; /* seed buffer too small -- ignore */
|
||||
if (seed_len > 20)
|
||||
seed_len = 20; /* App. 2.2 of FIPS PUB 186 allows larger SEED,
|
||||
* but our internal buffers are restricted to 160 bits*/
|
||||
if ((seed_in != NULL) && (seed_len == 20))
|
||||
{
|
||||
memcpy(seed,seed_in,seed_len);
|
||||
/* set seed_in to NULL to avoid it being copied back */
|
||||
seed_in = NULL;
|
||||
}
|
||||
|
||||
if ((ctx=BN_CTX_new()) == NULL) goto err;
|
||||
|
||||
@@ -302,7 +309,7 @@ err:
|
||||
ok=0;
|
||||
goto err;
|
||||
}
|
||||
if ((m > 1) && (seed_in != NULL)) memcpy(seed_in,seed,20);
|
||||
if (seed_in != NULL) memcpy(seed_in,seed,20);
|
||||
if (counter_ret != NULL) *counter_ret=counter;
|
||||
if (h_ret != NULL) *h_ret=h;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opensslconf.h"
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -227,6 +227,14 @@ Blowfish and RC5 algorithms use a 128 bit key.
|
||||
rc5-ecb RC5 cipher in ECB mode
|
||||
rc5-ofb RC5 cipher in OFB mode
|
||||
|
||||
aes-[128|192|256]-cbc 128/192/256 bit AES in CBC mode
|
||||
aes-[128|192|256] Alias for aes-[128|192|256]-cbc
|
||||
aes-[128|192|256]-cfb 128/192/256 bit AES in 128 bit CFB mode
|
||||
aes-[128|192|256]-cfb1 128/192/256 bit AES in 1 bit CFB mode
|
||||
aes-[128|192|256]-cfb8 128/192/256 bit AES in 8 bit CFB mode
|
||||
aes-[128|192|256]-ecb 128/192/256 bit AES in ECB mode
|
||||
aes-[128|192|256]-ofb 128/192/256 bit AES in OFB mode
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Just base64 encode a binary file:
|
||||
|
||||
@@ -227,6 +227,22 @@ SHA Digest
|
||||
|
||||
SHA-1 Digest
|
||||
|
||||
=item B<sha224>
|
||||
|
||||
SHA-224 Digest
|
||||
|
||||
=item B<sha256>
|
||||
|
||||
SHA-256 Digest
|
||||
|
||||
=item B<sha384>
|
||||
|
||||
SHA-384 Digest
|
||||
|
||||
=item B<sha512>
|
||||
|
||||
SHA-512 Digest
|
||||
|
||||
=back
|
||||
|
||||
=head2 ENCODING AND CIPHER COMMANDS
|
||||
|
||||
@@ -152,7 +152,7 @@ The final BIT STRING contains the actual signature. It can be extracted with:
|
||||
|
||||
The certificate public key can be extracted with:
|
||||
|
||||
openssl x509 -in test/testx509.pem -pubout -noout >pubkey.pem
|
||||
openssl x509 -in test/testx509.pem -pubkey -noout >pubkey.pem
|
||||
|
||||
The signature can be analysed with:
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ int do_mct(char *amode,
|
||||
# Fri Aug 30 04:07:22 PM
|
||||
----------------------------*/
|
||||
|
||||
int proc_file(char *rqfile)
|
||||
int proc_file(char *rqfile, char *rspfile)
|
||||
{
|
||||
char afn[256], rfn[256];
|
||||
FILE *afp = NULL, *rfp = NULL;
|
||||
@@ -573,17 +573,21 @@ int proc_file(char *rqfile)
|
||||
afn, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
strcpy(rfn,afn);
|
||||
rp=strstr(rfn,"req/");
|
||||
if (!rspfile)
|
||||
{
|
||||
strcpy(rfn,afn);
|
||||
rp=strstr(rfn,"req/");
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
if (!rp)
|
||||
rp=strstr(rfn,"req\\");
|
||||
if (!rp)
|
||||
rp=strstr(rfn,"req\\");
|
||||
#endif
|
||||
assert(rp);
|
||||
memcpy(rp,"rsp",3);
|
||||
rp = strstr(rfn, ".req");
|
||||
memcpy(rp, ".rsp", 4);
|
||||
if ((rfp = fopen(rfn, "w")) == NULL)
|
||||
assert(rp);
|
||||
memcpy(rp,"rsp",3);
|
||||
rp = strstr(rfn, ".req");
|
||||
memcpy(rp, ".rsp", 4);
|
||||
rspfile = rfn;
|
||||
}
|
||||
if ((rfp = fopen(rspfile, "w")) == NULL)
|
||||
{
|
||||
printf("Cannot open file: %s, %s\n",
|
||||
rfn, strerror(errno));
|
||||
@@ -852,7 +856,7 @@ int proc_file(char *rqfile)
|
||||
--------------------------------------------------*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *rqlist = "req.txt";
|
||||
char *rqlist = "req.txt", *rspfile = NULL;
|
||||
FILE *fp = NULL;
|
||||
char fn[250] = "", rfn[256] = "";
|
||||
int f_opt = 0, d_opt = 1;
|
||||
@@ -888,7 +892,10 @@ int main(int argc, char **argv)
|
||||
if (d_opt)
|
||||
rqlist = argv[2];
|
||||
else
|
||||
{
|
||||
strcpy(fn, argv[2]);
|
||||
rspfile = argv[3];
|
||||
}
|
||||
}
|
||||
if (d_opt)
|
||||
{ /* list of files (directory) */
|
||||
@@ -903,7 +910,7 @@ int main(int argc, char **argv)
|
||||
strcpy(rfn, fn);
|
||||
if (VERBOSE)
|
||||
printf("Processing: %s\n", rfn);
|
||||
if (proc_file(rfn))
|
||||
if (proc_file(rfn, rspfile))
|
||||
{
|
||||
printf(">>> Processing failed for: %s <<<\n", rfn);
|
||||
EXIT(1);
|
||||
@@ -915,7 +922,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
if (VERBOSE)
|
||||
printf("Processing: %s\n", fn);
|
||||
if (proc_file(fn))
|
||||
if (proc_file(fn, rspfile))
|
||||
{
|
||||
printf(">>> Processing failed for: %s <<<\n", fn);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ void do_mct(char *amode,
|
||||
}
|
||||
}
|
||||
|
||||
int proc_file(char *rqfile)
|
||||
int proc_file(char *rqfile, char *rspfile)
|
||||
{
|
||||
char afn[256], rfn[256];
|
||||
FILE *afp = NULL, *rfp = NULL;
|
||||
@@ -297,17 +297,21 @@ int proc_file(char *rqfile)
|
||||
afn, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
strcpy(rfn,afn);
|
||||
rp=strstr(rfn,"req/");
|
||||
if (!rspfile)
|
||||
{
|
||||
strcpy(rfn,afn);
|
||||
rp=strstr(rfn,"req/");
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
if (!rp)
|
||||
rp=strstr(rfn,"req\\");
|
||||
if (!rp)
|
||||
rp=strstr(rfn,"req\\");
|
||||
#endif
|
||||
assert(rp);
|
||||
memcpy(rp,"rsp",3);
|
||||
rp = strstr(rfn, ".req");
|
||||
memcpy(rp, ".rsp", 4);
|
||||
if ((rfp = fopen(rfn, "w")) == NULL)
|
||||
assert(rp);
|
||||
memcpy(rp,"rsp",3);
|
||||
rp = strstr(rfn, ".req");
|
||||
memcpy(rp, ".rsp", 4);
|
||||
rspfile = rfn;
|
||||
}
|
||||
if ((rfp = fopen(rspfile, "w")) == NULL)
|
||||
{
|
||||
printf("Cannot open file: %s, %s\n",
|
||||
rfn, strerror(errno));
|
||||
@@ -623,7 +627,7 @@ int proc_file(char *rqfile)
|
||||
--------------------------------------------------*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *rqlist = "req.txt";
|
||||
char *rqlist = "req.txt", *rspfile = NULL;
|
||||
FILE *fp = NULL;
|
||||
char fn[250] = "", rfn[256] = "";
|
||||
int f_opt = 0, d_opt = 1;
|
||||
@@ -659,7 +663,10 @@ int main(int argc, char **argv)
|
||||
if (d_opt)
|
||||
rqlist = argv[2];
|
||||
else
|
||||
{
|
||||
strcpy(fn, argv[2]);
|
||||
rspfile = argv[3];
|
||||
}
|
||||
}
|
||||
if (d_opt)
|
||||
{ /* list of files (directory) */
|
||||
@@ -673,7 +680,7 @@ int main(int argc, char **argv)
|
||||
strtok(fn, "\r\n");
|
||||
strcpy(rfn, fn);
|
||||
printf("Processing: %s\n", rfn);
|
||||
if (proc_file(rfn))
|
||||
if (proc_file(rfn, rspfile))
|
||||
{
|
||||
printf(">>> Processing failed for: %s <<<\n", rfn);
|
||||
EXIT(1);
|
||||
@@ -685,7 +692,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
if (VERBOSE)
|
||||
printf("Processing: %s\n", fn);
|
||||
if (proc_file(fn))
|
||||
if (proc_file(fn, rspfile))
|
||||
{
|
||||
printf(">>> Processing failed for: %s <<<\n", fn);
|
||||
}
|
||||
|
||||
@@ -133,13 +133,20 @@ static int dsa_builtin_paramgen(DSA *ret, int bits,
|
||||
if (bits < 512) bits=512;
|
||||
bits=(bits+63)/64*64;
|
||||
|
||||
if (seed_len < 20)
|
||||
/* NB: seed_len == 0 is special case: copy generated seed to
|
||||
* seed_in if it is not NULL.
|
||||
*/
|
||||
if (seed_len && (seed_len < 20))
|
||||
seed_in = NULL; /* seed buffer too small -- ignore */
|
||||
if (seed_len > 20)
|
||||
seed_len = 20; /* App. 2.2 of FIPS PUB 186 allows larger SEED,
|
||||
* but our internal buffers are restricted to 160 bits*/
|
||||
if ((seed_in != NULL) && (seed_len == 20))
|
||||
{
|
||||
memcpy(seed,seed_in,seed_len);
|
||||
/* set seed_in to NULL to avoid it being copied back */
|
||||
seed_in = NULL;
|
||||
}
|
||||
|
||||
if ((ctx=BN_CTX_new()) == NULL) goto err;
|
||||
|
||||
@@ -316,7 +323,7 @@ err:
|
||||
ok=0;
|
||||
goto err;
|
||||
}
|
||||
if ((m > 1) && (seed_in != NULL)) memcpy(seed_in,seed,20);
|
||||
if (seed_in != NULL) memcpy(seed_in,seed,20);
|
||||
if (counter_ret != NULL) *counter_ret=counter;
|
||||
if (h_ret != NULL) *h_ret=h;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,13 @@
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
|
||||
static int fips_dsa_pairwise_fail = 0;
|
||||
|
||||
void FIPS_corrupt_dsa_keygen(void)
|
||||
{
|
||||
fips_dsa_pairwise_fail = 1;
|
||||
}
|
||||
|
||||
static int dsa_builtin_keygen(DSA *dsa);
|
||||
|
||||
int fips_check_dsa(DSA *dsa)
|
||||
@@ -145,6 +152,8 @@ static int dsa_builtin_keygen(DSA *dsa)
|
||||
|
||||
dsa->priv_key=priv_key;
|
||||
dsa->pub_key=pub_key;
|
||||
if (fips_dsa_pairwise_fail)
|
||||
BN_add_word(dsa->pub_key, 1);
|
||||
if(!fips_check_dsa(dsa))
|
||||
goto err;
|
||||
ok=1;
|
||||
|
||||
@@ -94,7 +94,10 @@ void pqg()
|
||||
dsa = FIPS_dsa_new();
|
||||
|
||||
if (!DSA_generate_parameters_ex(dsa, nmod,seed,0,&counter,&h,NULL))
|
||||
{
|
||||
do_print_errors();
|
||||
exit(1);
|
||||
}
|
||||
pbn("P",dsa->p);
|
||||
pbn("Q",dsa->q);
|
||||
pbn("G",dsa->g);
|
||||
@@ -109,6 +112,83 @@ void pqg()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pqgver()
|
||||
{
|
||||
char buf[1024];
|
||||
char lbuf[1024];
|
||||
char *keyword, *value;
|
||||
BIGNUM *p = NULL, *q = NULL, *g = NULL;
|
||||
int counter, counter2;
|
||||
unsigned long h, h2;
|
||||
DSA *dsa=NULL;
|
||||
int nmod=0;
|
||||
unsigned char seed[1024];
|
||||
|
||||
while(fgets(buf,sizeof buf,stdin) != NULL)
|
||||
{
|
||||
if (!parse_line(&keyword, &value, lbuf, buf))
|
||||
{
|
||||
fputs(buf,stdout);
|
||||
continue;
|
||||
}
|
||||
if(!strcmp(keyword,"[mod"))
|
||||
nmod=atoi(value);
|
||||
else if(!strcmp(keyword,"P"))
|
||||
p=hex2bn(value);
|
||||
else if(!strcmp(keyword,"Q"))
|
||||
q=hex2bn(value);
|
||||
else if(!strcmp(keyword,"G"))
|
||||
g=hex2bn(value);
|
||||
else if(!strcmp(keyword,"Seed"))
|
||||
{
|
||||
int slen = hex2bin(value, seed);
|
||||
if (slen != 20)
|
||||
{
|
||||
fprintf(stderr, "Seed parse length error\n");
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
else if(!strcmp(keyword,"c"))
|
||||
counter =atoi(buf+4);
|
||||
else if(!strcmp(keyword,"H"))
|
||||
{
|
||||
h = atoi(value);
|
||||
if (!p || !q || !g)
|
||||
{
|
||||
fprintf(stderr, "Parse Error\n");
|
||||
exit (1);
|
||||
}
|
||||
pbn("P",p);
|
||||
pbn("Q",q);
|
||||
pbn("G",g);
|
||||
pv("Seed",seed,20);
|
||||
printf("c = %d\n",counter);
|
||||
printf("H = %lx\n",h);
|
||||
dsa = FIPS_dsa_new();
|
||||
if (!DSA_generate_parameters_ex(dsa, nmod,seed,20 ,&counter2,&h2,NULL))
|
||||
{
|
||||
do_print_errors();
|
||||
exit(1);
|
||||
}
|
||||
if (BN_cmp(dsa->p, p) || BN_cmp(dsa->q, q) || BN_cmp(dsa->g, g)
|
||||
|| (counter != counter2) || (h != h2))
|
||||
printf("Result = F\n");
|
||||
else
|
||||
printf("Result = T\n");
|
||||
BN_free(p);
|
||||
BN_free(q);
|
||||
BN_free(g);
|
||||
p = NULL;
|
||||
q = NULL;
|
||||
g = NULL;
|
||||
FIPS_dsa_free(dsa);
|
||||
dsa = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void keypair()
|
||||
{
|
||||
char buf[1024];
|
||||
@@ -133,7 +213,10 @@ void keypair()
|
||||
printf("[mod = %d]\n\n",nmod);
|
||||
dsa = FIPS_dsa_new();
|
||||
if (!DSA_generate_parameters_ex(dsa, nmod,NULL,0,NULL,NULL,NULL))
|
||||
{
|
||||
do_print_errors();
|
||||
exit(1);
|
||||
}
|
||||
pbn("P",dsa->p);
|
||||
pbn("Q",dsa->q);
|
||||
pbn("G",dsa->g);
|
||||
@@ -142,8 +225,10 @@ void keypair()
|
||||
while(n--)
|
||||
{
|
||||
if (!DSA_generate_key(dsa))
|
||||
{
|
||||
do_print_errors();
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pbn("X",dsa->priv_key);
|
||||
pbn("Y",dsa->pub_key);
|
||||
@@ -176,7 +261,10 @@ void siggen()
|
||||
FIPS_dsa_free(dsa);
|
||||
dsa = FIPS_dsa_new();
|
||||
if (!DSA_generate_parameters_ex(dsa, nmod,NULL,0,NULL,NULL,NULL))
|
||||
{
|
||||
do_print_errors();
|
||||
exit(1);
|
||||
}
|
||||
pbn("P",dsa->p);
|
||||
pbn("Q",dsa->q);
|
||||
pbn("G",dsa->g);
|
||||
@@ -197,7 +285,10 @@ void siggen()
|
||||
pv("Msg",msg,n);
|
||||
|
||||
if (!DSA_generate_key(dsa))
|
||||
{
|
||||
do_print_errors();
|
||||
exit(1);
|
||||
}
|
||||
pk.type = EVP_PKEY_DSA;
|
||||
pk.pkey.dsa = dsa;
|
||||
pbn("Y",dsa->pub_key);
|
||||
@@ -315,6 +406,8 @@ int main(int argc,char **argv)
|
||||
primes();
|
||||
else if(!strcmp(argv[1],"pqg"))
|
||||
pqg();
|
||||
else if(!strcmp(argv[1],"pqgver"))
|
||||
pqgver();
|
||||
else if(!strcmp(argv[1],"keypair"))
|
||||
keypair();
|
||||
else if(!strcmp(argv[1],"siggen"))
|
||||
|
||||
@@ -73,10 +73,13 @@ int FIPS_selftest_aes(void);
|
||||
void FIPS_corrupt_des(void);
|
||||
int FIPS_selftest_des(void);
|
||||
void FIPS_corrupt_rsa(void);
|
||||
void FIPS_corrupt_rsa_keygen(void);
|
||||
int FIPS_selftest_rsa(void);
|
||||
void FIPS_corrupt_dsa(void);
|
||||
void FIPS_corrupt_dsa_keygen(void);
|
||||
int FIPS_selftest_dsa(void);
|
||||
void FIPS_corrupt_rng(void);
|
||||
void FIPS_rng_stick(void);
|
||||
int FIPS_selftest_rng(void);
|
||||
int FIPS_selftest_hmac(void);
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
(defined(__linux) && (defined(__arm) || defined(__arm__))) || \
|
||||
(defined(__i386) || defined(__i386__)) || \
|
||||
(defined(__x86_64) || defined(__x86_64__)) || \
|
||||
defined(__ANDROID__) || \
|
||||
(defined(vax) || defined(__vax__))
|
||||
# define POINTER_TO_FUNCTION_IS_POINTER_TO_1ST_INSTRUCTION
|
||||
# endif
|
||||
|
||||
@@ -40,52 +40,57 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* AES: encrypt and decrypt known plaintext, verify result matches original plaintext
|
||||
*/
|
||||
static int FIPS_aes_test()
|
||||
{
|
||||
unsigned char userkey[16] = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed, 0xf0, 0x0d };
|
||||
unsigned char plaintext[16] = "etaonrishdlcu";
|
||||
unsigned char ciphertext[16];
|
||||
unsigned char buf[16];
|
||||
AES_KEY key;
|
||||
AES_KEY dkey;
|
||||
static int FIPS_aes_test(void)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned char pltmp[16];
|
||||
unsigned char citmp[16];
|
||||
unsigned char key[16] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
|
||||
unsigned char plaintext[16] = "etaonrishdlcu";
|
||||
EVP_CIPHER_CTX ctx;
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
if (EVP_CipherInit_ex(&ctx, EVP_aes_128_ecb(),NULL, key, NULL, 1) <= 0)
|
||||
goto err;
|
||||
EVP_Cipher(&ctx, citmp, plaintext, 16);
|
||||
if (EVP_CipherInit_ex(&ctx, EVP_aes_128_ecb(),NULL, key, NULL, 0) <= 0)
|
||||
goto err;
|
||||
EVP_Cipher(&ctx, pltmp, citmp, 16);
|
||||
if (memcmp(pltmp, plaintext, 16))
|
||||
goto err;
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ERR_clear_error();
|
||||
if (AES_set_encrypt_key( userkey, 128, &key ))
|
||||
return 0;
|
||||
AES_encrypt( plaintext, ciphertext, &key);
|
||||
if (AES_set_decrypt_key( userkey, 128, &dkey ))
|
||||
return 0;
|
||||
AES_decrypt( ciphertext, buf, &dkey);
|
||||
if (memcmp(buf, plaintext, sizeof(buf)))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* DES: encrypt and decrypt known plaintext, verify result matches original plaintext
|
||||
*/
|
||||
static int FIPS_des_test()
|
||||
{
|
||||
DES_cblock userkey = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed, 0xf0, 0x0d };
|
||||
DES_cblock plaintext = { 'e', 't', 'a', 'o', 'n', 'r', 'i', 's' };
|
||||
|
||||
DES_key_schedule key;
|
||||
DES_cblock ciphertext;
|
||||
DES_cblock buf;
|
||||
|
||||
ERR_clear_error();
|
||||
if (DES_set_key(&userkey, &key) < 0)
|
||||
return 0;
|
||||
DES_ecb_encrypt( &plaintext, &ciphertext, &key, 1);
|
||||
DES_ecb_encrypt( &ciphertext, &buf, &key, 0);
|
||||
if (memcmp(buf, plaintext, sizeof(buf)))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
static int FIPS_des3_test(void)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned char pltmp[8];
|
||||
unsigned char citmp[8];
|
||||
unsigned char key[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,
|
||||
19,20,21,22,23,24};
|
||||
unsigned char plaintext[] = { 'e', 't', 'a', 'o', 'n', 'r', 'i', 's' };
|
||||
EVP_CIPHER_CTX ctx;
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
if (EVP_CipherInit_ex(&ctx, EVP_des_ede3_ecb(),NULL, key, NULL, 1) <= 0)
|
||||
goto err;
|
||||
EVP_Cipher(&ctx, citmp, plaintext, 8);
|
||||
if (EVP_CipherInit_ex(&ctx, EVP_des_ede3_ecb(),NULL, key, NULL, 0) <= 0)
|
||||
goto err;
|
||||
EVP_Cipher(&ctx, pltmp, citmp, 8);
|
||||
if (memcmp(pltmp, plaintext, 8))
|
||||
goto err;
|
||||
ret = 1;
|
||||
err:
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* DSA: generate keys and sign, verify input plaintext.
|
||||
*/
|
||||
static int FIPS_dsa_test()
|
||||
static int FIPS_dsa_test(int bad)
|
||||
{
|
||||
DSA *dsa = NULL;
|
||||
EVP_PKEY pk;
|
||||
@@ -104,6 +109,8 @@ static int FIPS_dsa_test()
|
||||
goto end;
|
||||
if (!DSA_generate_key(dsa))
|
||||
goto end;
|
||||
if (bad)
|
||||
BN_add_word(dsa->pub_key, 1);
|
||||
|
||||
pk.type = EVP_PKEY_DSA;
|
||||
pk.pkey.dsa = dsa;
|
||||
@@ -132,7 +139,7 @@ static int FIPS_dsa_test()
|
||||
/*
|
||||
* RSA: generate keys and sign, verify input plaintext.
|
||||
*/
|
||||
static int FIPS_rsa_test()
|
||||
static int FIPS_rsa_test(int bad)
|
||||
{
|
||||
RSA *key;
|
||||
unsigned char input_ptext[] = "etaonrishdlc";
|
||||
@@ -153,6 +160,8 @@ static int FIPS_rsa_test()
|
||||
if (!RSA_generate_key_ex(key, 1024,bn,NULL))
|
||||
return 0;
|
||||
BN_free(bn);
|
||||
if (bad)
|
||||
BN_add_word(key->n, 1);
|
||||
|
||||
pk.type = EVP_PKEY_RSA;
|
||||
pk.pkey.rsa = key;
|
||||
@@ -209,7 +218,7 @@ static int FIPS_sha256_test()
|
||||
unsigned char md[SHA256_DIGEST_LENGTH];
|
||||
|
||||
ERR_clear_error();
|
||||
if (!SHA256(str,sizeof(str) - 1,md)) return 0;
|
||||
if (!EVP_Digest(str,sizeof(str) - 1,md, NULL, EVP_sha256(), NULL)) return 0;
|
||||
if (memcmp(md,digest,sizeof(md)))
|
||||
return 0;
|
||||
return 1;
|
||||
@@ -230,7 +239,7 @@ static int FIPS_sha512_test()
|
||||
unsigned char md[SHA512_DIGEST_LENGTH];
|
||||
|
||||
ERR_clear_error();
|
||||
if (!SHA512(str,sizeof(str) - 1,md)) return 0;
|
||||
if (!EVP_Digest(str,sizeof(str) - 1,md, NULL, EVP_sha512(), NULL)) return 0;
|
||||
if (memcmp(md,digest,sizeof(md)))
|
||||
return 0;
|
||||
return 1;
|
||||
@@ -401,6 +410,7 @@ static int Zeroize()
|
||||
static int Error;
|
||||
const char * Fail(const char *msg)
|
||||
{
|
||||
do_print_errors();
|
||||
Error++;
|
||||
return msg;
|
||||
}
|
||||
@@ -408,6 +418,11 @@ const char * Fail(const char *msg)
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
|
||||
int do_corrupt_rsa_keygen = 0, do_corrupt_dsa_keygen = 0;
|
||||
int bad_rsa = 0, bad_dsa = 0;
|
||||
int do_rng_stick = 0;
|
||||
int no_exit = 0;
|
||||
|
||||
printf("\tFIPS-mode test application\n\n");
|
||||
|
||||
/* Load entropy from external file, if any */
|
||||
@@ -420,31 +435,51 @@ int main(int argc,char **argv)
|
||||
printf("AES encryption/decryption with corrupted KAT...\n");
|
||||
} else if (!strcmp(argv[1], "des")) {
|
||||
FIPS_corrupt_des();
|
||||
printf("DES-ECB encryption/decryption with corrupted KAT...\n");
|
||||
printf("DES3-ECB encryption/decryption with corrupted KAT...\n");
|
||||
} else if (!strcmp(argv[1], "dsa")) {
|
||||
FIPS_corrupt_dsa();
|
||||
printf("DSA key generation and signature validation with corrupted KAT...\n");
|
||||
} else if (!strcmp(argv[1], "rsa")) {
|
||||
FIPS_corrupt_rsa();
|
||||
printf("RSA key generation and encryption/decryption with corrupted KAT...\n");
|
||||
printf("RSA key generation and signature validation with corrupted KAT...\n");
|
||||
} else if (!strcmp(argv[1], "rsakey")) {
|
||||
printf("RSA key generation and signature validation with corrupted key...\n");
|
||||
bad_rsa = 1;
|
||||
no_exit = 1;
|
||||
} else if (!strcmp(argv[1], "rsakeygen")) {
|
||||
do_corrupt_rsa_keygen = 1;
|
||||
no_exit = 1;
|
||||
printf("RSA key generation and signature validation with corrupted keygen...\n");
|
||||
} else if (!strcmp(argv[1], "dsakey")) {
|
||||
printf("DSA key generation and signature validation with corrupted key...\n");
|
||||
bad_dsa = 1;
|
||||
no_exit = 1;
|
||||
} else if (!strcmp(argv[1], "dsakeygen")) {
|
||||
do_corrupt_dsa_keygen = 1;
|
||||
no_exit = 1;
|
||||
printf("DSA key generation and signature validation with corrupted keygen...\n");
|
||||
} else if (!strcmp(argv[1], "sha1")) {
|
||||
FIPS_corrupt_sha1();
|
||||
printf("SHA-1 hash with corrupted KAT...\n");
|
||||
} else if (!strcmp(argv[1], "rng")) {
|
||||
FIPS_corrupt_rng();
|
||||
printf("RNG test with corrupted KAT...\n");
|
||||
} else if (!strcmp(argv[1], "rngstick")) {
|
||||
do_rng_stick = 1;
|
||||
no_exit = 1;
|
||||
printf("RNG test with stuck continuous test...\n");
|
||||
} else {
|
||||
printf("Bad argument \"%s\"\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
if (!FIPS_mode_set(1))
|
||||
{
|
||||
do_print_errors();
|
||||
printf("Power-up self test failed\n");
|
||||
exit(1);
|
||||
if (!no_exit) {
|
||||
if (!FIPS_mode_set(1)) {
|
||||
do_print_errors();
|
||||
printf("Power-up self test failed\n");
|
||||
exit(1);
|
||||
}
|
||||
printf("Power-up self test successful\n");
|
||||
exit(0);
|
||||
}
|
||||
printf("Power-up self test successful\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Non-Approved cryptographic operation
|
||||
@@ -464,6 +499,12 @@ int main(int argc,char **argv)
|
||||
exit(1);
|
||||
}
|
||||
printf("successful\n");
|
||||
if (do_corrupt_dsa_keygen)
|
||||
FIPS_corrupt_dsa_keygen();
|
||||
if (do_corrupt_rsa_keygen)
|
||||
FIPS_corrupt_rsa_keygen();
|
||||
if (do_rng_stick)
|
||||
FIPS_rng_stick();
|
||||
|
||||
/* AES encryption/decryption
|
||||
*/
|
||||
@@ -473,17 +514,17 @@ int main(int argc,char **argv)
|
||||
/* RSA key generation and encryption/decryption
|
||||
*/
|
||||
printf("4. RSA key generation and encryption/decryption...");
|
||||
printf( FIPS_rsa_test() ? "successful\n" : Fail("FAILED!\n") );
|
||||
printf( FIPS_rsa_test(bad_rsa) ? "successful\n" : Fail("FAILED!\n") );
|
||||
|
||||
/* DES-CBC encryption/decryption
|
||||
*/
|
||||
printf("5. DES-ECB encryption/decryption...");
|
||||
printf( FIPS_des_test() ? "successful\n" : Fail("FAILED!\n") );
|
||||
printf( FIPS_des3_test() ? "successful\n" : Fail("FAILED!\n") );
|
||||
|
||||
/* DSA key generation and signature validation
|
||||
*/
|
||||
printf("6. DSA key generation and signature validation...");
|
||||
printf( FIPS_dsa_test() ? "successful\n" : Fail("FAILED!\n") );
|
||||
printf( FIPS_dsa_test(bad_dsa) ? "successful\n" : Fail("FAILED!\n") );
|
||||
|
||||
/* SHA-1 hash
|
||||
*/
|
||||
|
||||
12
fips/fipsld
12
fips/fipsld
@@ -117,7 +117,11 @@ lib*|*.dll) # must be linking a shared lib...
|
||||
${_WL_PREMAIN} "$@"
|
||||
|
||||
# generate signature...
|
||||
SIG=`"${THERE}/fips/fips_premain_dso" "${TARGET}"`
|
||||
if [ -z "${FIPS_SIG}" ]; then
|
||||
SIG=`"${THERE}/fips/fips_premain_dso" "${TARGET}"`
|
||||
else
|
||||
SIG=`"${FIPS_SIG}" -dso "${TARGET}"`
|
||||
fi
|
||||
/bin/rm -f "${TARGET}"
|
||||
if [ -z "${SIG}" ]; then
|
||||
echo "unable to collect signature"; exit 1
|
||||
@@ -156,7 +160,11 @@ lib*|*.dll) # must be linking a shared lib...
|
||||
${_WL_PREMAIN} "$@"
|
||||
|
||||
# generate signature...
|
||||
SIG=`"${TARGET}"`
|
||||
if [ -z "${FIPS_SIG}" ]; then
|
||||
SIG=`"${TARGET}"`
|
||||
else
|
||||
SIG=`"${FIPS_SIG}" -exe "${TARGET}"`
|
||||
fi
|
||||
/bin/rm -f "${TARGET}"
|
||||
if [ -z "${SIG}" ]; then
|
||||
echo "unable to collect signature"; exit 1
|
||||
|
||||
@@ -4,210 +4,226 @@ rem Auto generated by mkfipsscr.pl script
|
||||
rem Do not edit
|
||||
|
||||
|
||||
echo dsa tests
|
||||
if exist testvectors\dsa\rsp rd /s /q testvectors\dsa\rsp
|
||||
md testvectors\dsa\rsp
|
||||
.\fips_dssvs pqg < testvectors\dsa\req\PQGGen.req > testvectors\dsa\rsp\PQGGen.rsp
|
||||
.\fips_dssvs keypair < testvectors\dsa\req\KeyPair.req > testvectors\dsa\rsp\KeyPair.rsp
|
||||
.\fips_dssvs siggen < testvectors\dsa\req\SigGen.req > testvectors\dsa\rsp\SigGen.rsp
|
||||
.\fips_dssvs sigver < testvectors\dsa\req\SigVer.req > testvectors\dsa\rsp\SigVer.rsp
|
||||
echo Running tests in .\testvectors\AES\req
|
||||
if exist ".\testvectors\AES\rsp" rd /s /q ".\testvectors\AES\rsp"
|
||||
md ".\testvectors\AES\rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCGFSbox128.req" ".\testvectors\AES\rsp\CBCGFSbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCGFSbox192.req" ".\testvectors\AES\rsp\CBCGFSbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCGFSbox256.req" ".\testvectors\AES\rsp\CBCGFSbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCKeySbox128.req" ".\testvectors\AES\rsp\CBCKeySbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCKeySbox192.req" ".\testvectors\AES\rsp\CBCKeySbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCKeySbox256.req" ".\testvectors\AES\rsp\CBCKeySbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCMCT128.req" ".\testvectors\AES\rsp\CBCMCT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCMCT192.req" ".\testvectors\AES\rsp\CBCMCT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCMCT256.req" ".\testvectors\AES\rsp\CBCMCT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCMMT128.req" ".\testvectors\AES\rsp\CBCMMT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCMMT192.req" ".\testvectors\AES\rsp\CBCMMT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCMMT256.req" ".\testvectors\AES\rsp\CBCMMT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCVarKey128.req" ".\testvectors\AES\rsp\CBCVarKey128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCVarKey192.req" ".\testvectors\AES\rsp\CBCVarKey192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCVarKey256.req" ".\testvectors\AES\rsp\CBCVarKey256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCVarTxt128.req" ".\testvectors\AES\rsp\CBCVarTxt128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCVarTxt192.req" ".\testvectors\AES\rsp\CBCVarTxt192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CBCVarTxt256.req" ".\testvectors\AES\rsp\CBCVarTxt256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128GFSbox128.req" ".\testvectors\AES\rsp\CFB128GFSbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128GFSbox192.req" ".\testvectors\AES\rsp\CFB128GFSbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128GFSbox256.req" ".\testvectors\AES\rsp\CFB128GFSbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128KeySbox128.req" ".\testvectors\AES\rsp\CFB128KeySbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128KeySbox192.req" ".\testvectors\AES\rsp\CFB128KeySbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128KeySbox256.req" ".\testvectors\AES\rsp\CFB128KeySbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128MCT128.req" ".\testvectors\AES\rsp\CFB128MCT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128MCT192.req" ".\testvectors\AES\rsp\CFB128MCT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128MCT256.req" ".\testvectors\AES\rsp\CFB128MCT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128MMT128.req" ".\testvectors\AES\rsp\CFB128MMT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128MMT192.req" ".\testvectors\AES\rsp\CFB128MMT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128MMT256.req" ".\testvectors\AES\rsp\CFB128MMT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128VarKey128.req" ".\testvectors\AES\rsp\CFB128VarKey128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128VarKey192.req" ".\testvectors\AES\rsp\CFB128VarKey192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128VarKey256.req" ".\testvectors\AES\rsp\CFB128VarKey256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128VarTxt128.req" ".\testvectors\AES\rsp\CFB128VarTxt128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128VarTxt192.req" ".\testvectors\AES\rsp\CFB128VarTxt192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB128VarTxt256.req" ".\testvectors\AES\rsp\CFB128VarTxt256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1GFSbox128.req" ".\testvectors\AES\rsp\CFB1GFSbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1GFSbox192.req" ".\testvectors\AES\rsp\CFB1GFSbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1GFSbox256.req" ".\testvectors\AES\rsp\CFB1GFSbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1KeySbox128.req" ".\testvectors\AES\rsp\CFB1KeySbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1KeySbox192.req" ".\testvectors\AES\rsp\CFB1KeySbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1KeySbox256.req" ".\testvectors\AES\rsp\CFB1KeySbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1MCT128.req" ".\testvectors\AES\rsp\CFB1MCT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1MCT192.req" ".\testvectors\AES\rsp\CFB1MCT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1MCT256.req" ".\testvectors\AES\rsp\CFB1MCT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1MMT128.req" ".\testvectors\AES\rsp\CFB1MMT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1MMT192.req" ".\testvectors\AES\rsp\CFB1MMT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1MMT256.req" ".\testvectors\AES\rsp\CFB1MMT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1VarKey128.req" ".\testvectors\AES\rsp\CFB1VarKey128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1VarKey192.req" ".\testvectors\AES\rsp\CFB1VarKey192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1VarKey256.req" ".\testvectors\AES\rsp\CFB1VarKey256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1VarTxt128.req" ".\testvectors\AES\rsp\CFB1VarTxt128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1VarTxt192.req" ".\testvectors\AES\rsp\CFB1VarTxt192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB1VarTxt256.req" ".\testvectors\AES\rsp\CFB1VarTxt256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8GFSbox128.req" ".\testvectors\AES\rsp\CFB8GFSbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8GFSbox192.req" ".\testvectors\AES\rsp\CFB8GFSbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8GFSbox256.req" ".\testvectors\AES\rsp\CFB8GFSbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8KeySbox128.req" ".\testvectors\AES\rsp\CFB8KeySbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8KeySbox192.req" ".\testvectors\AES\rsp\CFB8KeySbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8KeySbox256.req" ".\testvectors\AES\rsp\CFB8KeySbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8MCT128.req" ".\testvectors\AES\rsp\CFB8MCT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8MCT192.req" ".\testvectors\AES\rsp\CFB8MCT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8MCT256.req" ".\testvectors\AES\rsp\CFB8MCT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8MMT128.req" ".\testvectors\AES\rsp\CFB8MMT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8MMT192.req" ".\testvectors\AES\rsp\CFB8MMT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8MMT256.req" ".\testvectors\AES\rsp\CFB8MMT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8VarKey128.req" ".\testvectors\AES\rsp\CFB8VarKey128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8VarKey192.req" ".\testvectors\AES\rsp\CFB8VarKey192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8VarKey256.req" ".\testvectors\AES\rsp\CFB8VarKey256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8VarTxt128.req" ".\testvectors\AES\rsp\CFB8VarTxt128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8VarTxt192.req" ".\testvectors\AES\rsp\CFB8VarTxt192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\CFB8VarTxt256.req" ".\testvectors\AES\rsp\CFB8VarTxt256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBGFSbox128.req" ".\testvectors\AES\rsp\ECBGFSbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBGFSbox192.req" ".\testvectors\AES\rsp\ECBGFSbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBGFSbox256.req" ".\testvectors\AES\rsp\ECBGFSbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBKeySbox128.req" ".\testvectors\AES\rsp\ECBKeySbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBKeySbox192.req" ".\testvectors\AES\rsp\ECBKeySbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBKeySbox256.req" ".\testvectors\AES\rsp\ECBKeySbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBMCT128.req" ".\testvectors\AES\rsp\ECBMCT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBMCT192.req" ".\testvectors\AES\rsp\ECBMCT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBMCT256.req" ".\testvectors\AES\rsp\ECBMCT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBMMT128.req" ".\testvectors\AES\rsp\ECBMMT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBMMT192.req" ".\testvectors\AES\rsp\ECBMMT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBMMT256.req" ".\testvectors\AES\rsp\ECBMMT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBVarKey128.req" ".\testvectors\AES\rsp\ECBVarKey128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBVarKey192.req" ".\testvectors\AES\rsp\ECBVarKey192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBVarKey256.req" ".\testvectors\AES\rsp\ECBVarKey256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBVarTxt128.req" ".\testvectors\AES\rsp\ECBVarTxt128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBVarTxt192.req" ".\testvectors\AES\rsp\ECBVarTxt192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\ECBVarTxt256.req" ".\testvectors\AES\rsp\ECBVarTxt256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBGFSbox128.req" ".\testvectors\AES\rsp\OFBGFSbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBGFSbox192.req" ".\testvectors\AES\rsp\OFBGFSbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBGFSbox256.req" ".\testvectors\AES\rsp\OFBGFSbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBKeySbox128.req" ".\testvectors\AES\rsp\OFBKeySbox128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBKeySbox192.req" ".\testvectors\AES\rsp\OFBKeySbox192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBKeySbox256.req" ".\testvectors\AES\rsp\OFBKeySbox256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBMCT128.req" ".\testvectors\AES\rsp\OFBMCT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBMCT192.req" ".\testvectors\AES\rsp\OFBMCT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBMCT256.req" ".\testvectors\AES\rsp\OFBMCT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBMMT128.req" ".\testvectors\AES\rsp\OFBMMT128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBMMT192.req" ".\testvectors\AES\rsp\OFBMMT192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBMMT256.req" ".\testvectors\AES\rsp\OFBMMT256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBVarKey128.req" ".\testvectors\AES\rsp\OFBVarKey128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBVarKey192.req" ".\testvectors\AES\rsp\OFBVarKey192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBVarKey256.req" ".\testvectors\AES\rsp\OFBVarKey256.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBVarTxt128.req" ".\testvectors\AES\rsp\OFBVarTxt128.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBVarTxt192.req" ".\testvectors\AES\rsp\OFBVarTxt192.rsp"
|
||||
..\out32dll\fips_aesavs -f ".\testvectors\AES\req\OFBVarTxt256.req" ".\testvectors\AES\rsp\OFBVarTxt256.rsp"
|
||||
|
||||
echo sha tests
|
||||
if exist testvectors\sha\rsp rd /s /q testvectors\sha\rsp
|
||||
md testvectors\sha\rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA1LongMsg.req > testvectors\sha\rsp\SHA1LongMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA1Monte.req > testvectors\sha\rsp\SHA1Monte.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA1ShortMsg.req > testvectors\sha\rsp\SHA1ShortMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA224LongMsg.req > testvectors\sha\rsp\SHA224LongMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA224Monte.req > testvectors\sha\rsp\SHA224Monte.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA224ShortMsg.req > testvectors\sha\rsp\SHA224ShortMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA256LongMsg.req > testvectors\sha\rsp\SHA256LongMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA256Monte.req > testvectors\sha\rsp\SHA256Monte.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA256ShortMsg.req > testvectors\sha\rsp\SHA256ShortMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA384LongMsg.req > testvectors\sha\rsp\SHA384LongMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA384Monte.req > testvectors\sha\rsp\SHA384Monte.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA384ShortMsg.req > testvectors\sha\rsp\SHA384ShortMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA512LongMsg.req > testvectors\sha\rsp\SHA512LongMsg.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA512Monte.req > testvectors\sha\rsp\SHA512Monte.rsp
|
||||
.\fips_shatest < testvectors\sha\req\SHA512ShortMsg.req > testvectors\sha\rsp\SHA512ShortMsg.rsp
|
||||
echo Running tests in .\testvectors\DSA\req
|
||||
if exist ".\testvectors\DSA\rsp" rd /s /q ".\testvectors\DSA\rsp"
|
||||
md ".\testvectors\DSA\rsp"
|
||||
..\out32dll\fips_dssvs keypair < ".\testvectors\DSA\req\KeyPair.req" > ".\testvectors\DSA\rsp\KeyPair.rsp"
|
||||
..\out32dll\fips_dssvs pqg < ".\testvectors\DSA\req\PQGGen.req" > ".\testvectors\DSA\rsp\PQGGen.rsp"
|
||||
..\out32dll\fips_dssvs siggen < ".\testvectors\DSA\req\SigGen.req" > ".\testvectors\DSA\rsp\SigGen.rsp"
|
||||
..\out32dll\fips_dssvs sigver < ".\testvectors\DSA\req\SigVer.req" > ".\testvectors\DSA\rsp\SigVer.rsp"
|
||||
|
||||
echo aes tests
|
||||
if exist testvectors\aes\rsp rd /s /q testvectors\aes\rsp
|
||||
md testvectors\aes\rsp
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCGFSbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCGFSbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCGFSbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCKeySbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCKeySbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCKeySbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCMCT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCMCT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCMCT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCMMT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCMMT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCMMT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCVarKey128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCVarKey192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCVarKey256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCVarTxt128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCVarTxt192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CBCVarTxt256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128GFSbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128GFSbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128GFSbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128KeySbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128KeySbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128KeySbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128MCT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128MCT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128MCT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128MMT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128MMT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128MMT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128VarKey128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128VarKey192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128VarKey256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128VarTxt128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128VarTxt192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB128VarTxt256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8GFSbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8GFSbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8GFSbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8KeySbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8KeySbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8KeySbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8MCT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8MCT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8MCT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8MMT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8MMT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8MMT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8VarKey128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8VarKey192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8VarKey256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8VarTxt128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8VarTxt192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\CFB8VarTxt256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBGFSbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBGFSbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBGFSbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBKeySbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBKeySbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBKeySbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBMCT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBMCT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBMCT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBMMT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBMMT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBMMT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBVarKey128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBVarKey192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBVarKey256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBVarTxt128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBVarTxt192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\ECBVarTxt256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBGFSbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBGFSbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBGFSbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBKeySbox128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBKeySbox192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBKeySbox256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBMCT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBMCT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBMCT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBMMT128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBMMT192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBMMT256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBVarKey128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBVarKey192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBVarKey256.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBVarTxt128.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBVarTxt192.req
|
||||
.\fips_aesavs -f testvectors\aes\req\OFBVarTxt256.req
|
||||
echo Running tests in .\testvectors\HMAC\req
|
||||
if exist ".\testvectors\HMAC\rsp" rd /s /q ".\testvectors\HMAC\rsp"
|
||||
md ".\testvectors\HMAC\rsp"
|
||||
..\out32dll\fips_hmactest < ".\testvectors\HMAC\req\HMAC.req" > ".\testvectors\HMAC\rsp\HMAC.rsp"
|
||||
|
||||
echo tdes tests
|
||||
if exist testvectors\tdes\rsp rd /s /q testvectors\tdes\rsp
|
||||
md testvectors\tdes\rsp
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCinvperm.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCMMT1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCMMT2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCMMT3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCMonte1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCMonte2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCMonte3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCpermop.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCsubtab.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCvarkey.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCBCvartext.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64invperm.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64MMT1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64MMT2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64MMT3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64Monte1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64Monte2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64Monte3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64permop.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64subtab.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64varkey.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB64vartext.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8invperm.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8MMT1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8MMT2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8MMT3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8Monte1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8Monte2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8Monte3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8permop.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8subtab.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8varkey.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TCFB8vartext.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBinvperm.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBMMT1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBMMT2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBMMT3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBMonte1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBMonte2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBMonte3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBpermop.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBsubtab.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBvarkey.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TECBvartext.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBinvperm.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBMMT1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBMMT2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBMMT3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBMonte1.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBMonte2.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBMonte3.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBpermop.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBsubtab.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBvarkey.req
|
||||
.\fips_desmovs -f testvectors\tdes\req\TOFBvartext.req
|
||||
echo Running tests in .\testvectors\RNG\req
|
||||
if exist ".\testvectors\RNG\rsp" rd /s /q ".\testvectors\RNG\rsp"
|
||||
md ".\testvectors\RNG\rsp"
|
||||
..\out32dll\fips_rngvs mct < ".\testvectors\RNG\req\ANSI931_AES128MCT.req" > ".\testvectors\RNG\rsp\ANSI931_AES128MCT.rsp"
|
||||
..\out32dll\fips_rngvs vst < ".\testvectors\RNG\req\ANSI931_AES128VST.req" > ".\testvectors\RNG\rsp\ANSI931_AES128VST.rsp"
|
||||
..\out32dll\fips_rngvs mct < ".\testvectors\RNG\req\ANSI931_AES192MCT.req" > ".\testvectors\RNG\rsp\ANSI931_AES192MCT.rsp"
|
||||
..\out32dll\fips_rngvs vst < ".\testvectors\RNG\req\ANSI931_AES192VST.req" > ".\testvectors\RNG\rsp\ANSI931_AES192VST.rsp"
|
||||
..\out32dll\fips_rngvs mct < ".\testvectors\RNG\req\ANSI931_AES256MCT.req" > ".\testvectors\RNG\rsp\ANSI931_AES256MCT.rsp"
|
||||
..\out32dll\fips_rngvs vst < ".\testvectors\RNG\req\ANSI931_AES256VST.req" > ".\testvectors\RNG\rsp\ANSI931_AES256VST.rsp"
|
||||
|
||||
echo hmac tests
|
||||
if exist testvectors\hmac\rsp rd /s /q testvectors\hmac\rsp
|
||||
md testvectors\hmac\rsp
|
||||
.\fips_hmactest < testvectors\hmac\req\HMAC.req > testvectors\hmac\rsp\HMAC.rsp
|
||||
echo Running tests in .\testvectors\RSA\req
|
||||
if exist ".\testvectors\RSA\rsp" rd /s /q ".\testvectors\RSA\rsp"
|
||||
md ".\testvectors\RSA\rsp"
|
||||
..\out32dll\fips_rsagtest < ".\testvectors\RSA\req\KeyGenRSA.req" > ".\testvectors\RSA\rsp\KeyGenRSA.rsp"
|
||||
..\out32dll\fips_rsastest < ".\testvectors\RSA\req\SigGen15.req" > ".\testvectors\RSA\rsp\SigGen15.rsp"
|
||||
..\out32dll\fips_rsastest -saltlen 0 < ".\testvectors\RSA\req\SigGenPSS.req" > ".\testvectors\RSA\rsp\SigGenPSS.rsp"
|
||||
..\out32dll\fips_rsastest -x931 < ".\testvectors\RSA\req\SigGenRSA.req" > ".\testvectors\RSA\rsp\SigGenRSA.rsp"
|
||||
..\out32dll\fips_rsavtest < ".\testvectors\RSA\req\SigVer15.req" > ".\testvectors\RSA\rsp\SigVer15.rsp"
|
||||
..\out32dll\fips_rsavtest -saltlen 0 < ".\testvectors\RSA\req\SigVerPSS.req" > ".\testvectors\RSA\rsp\SigVerPSS.rsp"
|
||||
..\out32dll\fips_rsavtest -x931 < ".\testvectors\RSA\req\SigVerRSA.req" > ".\testvectors\RSA\rsp\SigVerRSA.rsp"
|
||||
|
||||
echo rng tests
|
||||
if exist testvectors\rng\rsp rd /s /q testvectors\rng\rsp
|
||||
md testvectors\rng\rsp
|
||||
.\fips_rngvs mct < testvectors\rng\req\ANSI931_TDES2MCT.req > testvectors\rng\rsp\ANSI931_TDES2MCT.rsp
|
||||
.\fips_rngvs vst < testvectors\rng\req\ANSI931_TDES2VST.req > testvectors\rng\rsp\ANSI931_TDES2VST.rsp
|
||||
echo Running tests in .\testvectors\SHA\req
|
||||
if exist ".\testvectors\SHA\rsp" rd /s /q ".\testvectors\SHA\rsp"
|
||||
md ".\testvectors\SHA\rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA1LongMsg.req" > ".\testvectors\SHA\rsp\SHA1LongMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA1Monte.req" > ".\testvectors\SHA\rsp\SHA1Monte.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA1ShortMsg.req" > ".\testvectors\SHA\rsp\SHA1ShortMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA224LongMsg.req" > ".\testvectors\SHA\rsp\SHA224LongMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA224Monte.req" > ".\testvectors\SHA\rsp\SHA224Monte.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA224ShortMsg.req" > ".\testvectors\SHA\rsp\SHA224ShortMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA256LongMsg.req" > ".\testvectors\SHA\rsp\SHA256LongMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA256Monte.req" > ".\testvectors\SHA\rsp\SHA256Monte.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA256ShortMsg.req" > ".\testvectors\SHA\rsp\SHA256ShortMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA384LongMsg.req" > ".\testvectors\SHA\rsp\SHA384LongMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA384Monte.req" > ".\testvectors\SHA\rsp\SHA384Monte.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA384ShortMsg.req" > ".\testvectors\SHA\rsp\SHA384ShortMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA512LongMsg.req" > ".\testvectors\SHA\rsp\SHA512LongMsg.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA512Monte.req" > ".\testvectors\SHA\rsp\SHA512Monte.rsp"
|
||||
..\out32dll\fips_shatest < ".\testvectors\SHA\req\SHA512ShortMsg.req" > ".\testvectors\SHA\rsp\SHA512ShortMsg.rsp"
|
||||
|
||||
echo rsa tests
|
||||
if exist testvectors\rsa\rsp rd /s /q testvectors\rsa\rsp
|
||||
md testvectors\rsa\rsp
|
||||
.\fips_rsastest < testvectors\rsa\req\SigGen15.req > testvectors\rsa\rsp\SigGen15.rsp
|
||||
.\fips_rsavtest < testvectors\rsa\req\SigVer15.req > testvectors\rsa\rsp\SigVer15.rsp
|
||||
.\fips_rsastest -saltlen 0 < testvectors\rsa\req\SigGenPSS.req > testvectors\rsa\rsp\SigGenPSS.rsp
|
||||
.\fips_rsavtest -saltlen 0 < testvectors\rsa\req\SigVerPSS.req > testvectors\rsa\rsp\SigVerPSS.rsp
|
||||
.\fips_rsastest -x931 < testvectors\rsa\req\SigGenRSA.req > testvectors\rsa\rsp\SigGenRSA.rsp
|
||||
.\fips_rsavtest -x931 < testvectors\rsa\req\SigVerRSA.req > testvectors\rsa\rsp\SigVerRSA.rsp
|
||||
.\fips_rsagtest < testvectors\rsa\req\KeyGenRSA.req > testvectors\rsa\rsp\KeyGenRSA.rsp
|
||||
|
||||
echo rsa_salt_62 tests
|
||||
if exist testvectors\rsa_salt_62\rsp rd /s /q testvectors\rsa_salt_62\rsp
|
||||
md testvectors\rsa_salt_62\rsp
|
||||
.\fips_rsastest -saltlen 62 < testvectors\rsa_salt_62\req\SigGenPSS.req > testvectors\rsa_salt_62\rsp\SigGenPSS.rsp
|
||||
.\fips_rsavtest -saltlen 62 < testvectors\rsa_salt_62\req\SigVerPSS.req > testvectors\rsa_salt_62\rsp\SigVerPSS.rsp
|
||||
echo Running tests in .\testvectors\TDES\req
|
||||
if exist ".\testvectors\TDES\rsp" rd /s /q ".\testvectors\TDES\rsp"
|
||||
md ".\testvectors\TDES\rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCinvperm.req" ".\testvectors\TDES\rsp\TCBCinvperm.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCMMT1.req" ".\testvectors\TDES\rsp\TCBCMMT1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCMMT2.req" ".\testvectors\TDES\rsp\TCBCMMT2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCMMT3.req" ".\testvectors\TDES\rsp\TCBCMMT3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCMonte1.req" ".\testvectors\TDES\rsp\TCBCMonte1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCMonte2.req" ".\testvectors\TDES\rsp\TCBCMonte2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCMonte3.req" ".\testvectors\TDES\rsp\TCBCMonte3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCpermop.req" ".\testvectors\TDES\rsp\TCBCpermop.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCsubtab.req" ".\testvectors\TDES\rsp\TCBCsubtab.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCvarkey.req" ".\testvectors\TDES\rsp\TCBCvarkey.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCBCvartext.req" ".\testvectors\TDES\rsp\TCBCvartext.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64invperm.req" ".\testvectors\TDES\rsp\TCFB64invperm.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64MMT1.req" ".\testvectors\TDES\rsp\TCFB64MMT1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64MMT2.req" ".\testvectors\TDES\rsp\TCFB64MMT2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64MMT3.req" ".\testvectors\TDES\rsp\TCFB64MMT3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64Monte1.req" ".\testvectors\TDES\rsp\TCFB64Monte1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64Monte2.req" ".\testvectors\TDES\rsp\TCFB64Monte2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64Monte3.req" ".\testvectors\TDES\rsp\TCFB64Monte3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64permop.req" ".\testvectors\TDES\rsp\TCFB64permop.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64subtab.req" ".\testvectors\TDES\rsp\TCFB64subtab.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64varkey.req" ".\testvectors\TDES\rsp\TCFB64varkey.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB64vartext.req" ".\testvectors\TDES\rsp\TCFB64vartext.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8invperm.req" ".\testvectors\TDES\rsp\TCFB8invperm.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8MMT1.req" ".\testvectors\TDES\rsp\TCFB8MMT1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8MMT2.req" ".\testvectors\TDES\rsp\TCFB8MMT2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8MMT3.req" ".\testvectors\TDES\rsp\TCFB8MMT3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8Monte1.req" ".\testvectors\TDES\rsp\TCFB8Monte1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8Monte2.req" ".\testvectors\TDES\rsp\TCFB8Monte2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8Monte3.req" ".\testvectors\TDES\rsp\TCFB8Monte3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8permop.req" ".\testvectors\TDES\rsp\TCFB8permop.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8subtab.req" ".\testvectors\TDES\rsp\TCFB8subtab.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8varkey.req" ".\testvectors\TDES\rsp\TCFB8varkey.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TCFB8vartext.req" ".\testvectors\TDES\rsp\TCFB8vartext.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBinvperm.req" ".\testvectors\TDES\rsp\TECBinvperm.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBMMT1.req" ".\testvectors\TDES\rsp\TECBMMT1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBMMT2.req" ".\testvectors\TDES\rsp\TECBMMT2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBMMT3.req" ".\testvectors\TDES\rsp\TECBMMT3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBMonte1.req" ".\testvectors\TDES\rsp\TECBMonte1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBMonte2.req" ".\testvectors\TDES\rsp\TECBMonte2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBMonte3.req" ".\testvectors\TDES\rsp\TECBMonte3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBpermop.req" ".\testvectors\TDES\rsp\TECBpermop.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBsubtab.req" ".\testvectors\TDES\rsp\TECBsubtab.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBvarkey.req" ".\testvectors\TDES\rsp\TECBvarkey.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TECBvartext.req" ".\testvectors\TDES\rsp\TECBvartext.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBinvperm.req" ".\testvectors\TDES\rsp\TOFBinvperm.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBMMT1.req" ".\testvectors\TDES\rsp\TOFBMMT1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBMMT2.req" ".\testvectors\TDES\rsp\TOFBMMT2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBMMT3.req" ".\testvectors\TDES\rsp\TOFBMMT3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBMonte1.req" ".\testvectors\TDES\rsp\TOFBMonte1.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBMonte2.req" ".\testvectors\TDES\rsp\TOFBMonte2.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBMonte3.req" ".\testvectors\TDES\rsp\TOFBMonte3.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBpermop.req" ".\testvectors\TDES\rsp\TOFBpermop.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBsubtab.req" ".\testvectors\TDES\rsp\TOFBsubtab.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBvarkey.req" ".\testvectors\TDES\rsp\TOFBvarkey.rsp"
|
||||
..\out32dll\fips_desmovs -f ".\testvectors\TDES\req\TOFBvartext.req" ".\testvectors\TDES\rsp\TOFBvartext.rsp"
|
||||
|
||||
@@ -1,373 +1,400 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
# Test vector run script
|
||||
# Auto generated by mkfipsscr.pl script
|
||||
# Do not edit
|
||||
|
||||
|
||||
# dsa tests
|
||||
rm -rf testvectors/dsa/rsp
|
||||
mkdir testvectors/dsa/rsp
|
||||
echo Running tests in "./testvectors/AES/req"
|
||||
rm -rf "./testvectors/AES/rsp"
|
||||
mkdir "./testvectors/AES/rsp"
|
||||
|
||||
if [ -f testvectors/dsa/req/PQGGen.req ] ; then ../util/shlib_wrap.sh ../test/fips_dssvs pqg < testvectors/dsa/req/PQGGen.req > testvectors/dsa/rsp/PQGGen.rsp || { echo fips_dssvs pqg failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/dsa/req/KeyPair.req ] ; then ../util/shlib_wrap.sh ../test/fips_dssvs keypair < testvectors/dsa/req/KeyPair.req > testvectors/dsa/rsp/KeyPair.rsp || { echo fips_dssvs keypair failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/dsa/req/SigGen.req ] ; then ../util/shlib_wrap.sh ../test/fips_dssvs siggen < testvectors/dsa/req/SigGen.req > testvectors/dsa/rsp/SigGen.rsp || { echo fips_dssvs siggen failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/dsa/req/SigVer.req ] ; then ../util/shlib_wrap.sh ../test/fips_dssvs sigver < testvectors/dsa/req/SigVer.req > testvectors/dsa/rsp/SigVer.rsp || { echo fips_dssvs sigver failure ; exit 1; } ; fi
|
||||
|
||||
# sha tests
|
||||
rm -rf testvectors/sha/rsp
|
||||
mkdir testvectors/sha/rsp
|
||||
|
||||
if [ -f testvectors/sha/req/SHA1LongMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA1LongMsg.req > testvectors/sha/rsp/SHA1LongMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA1Monte.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA1Monte.req > testvectors/sha/rsp/SHA1Monte.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA1ShortMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA1ShortMsg.req > testvectors/sha/rsp/SHA1ShortMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA224LongMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA224LongMsg.req > testvectors/sha/rsp/SHA224LongMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA224Monte.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA224Monte.req > testvectors/sha/rsp/SHA224Monte.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA224ShortMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA224ShortMsg.req > testvectors/sha/rsp/SHA224ShortMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA256LongMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA256LongMsg.req > testvectors/sha/rsp/SHA256LongMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA256Monte.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA256Monte.req > testvectors/sha/rsp/SHA256Monte.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA256ShortMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA256ShortMsg.req > testvectors/sha/rsp/SHA256ShortMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA384LongMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA384LongMsg.req > testvectors/sha/rsp/SHA384LongMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA384Monte.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA384Monte.req > testvectors/sha/rsp/SHA384Monte.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA384ShortMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA384ShortMsg.req > testvectors/sha/rsp/SHA384ShortMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA512LongMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA512LongMsg.req > testvectors/sha/rsp/SHA512LongMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA512Monte.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA512Monte.req > testvectors/sha/rsp/SHA512Monte.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/sha/req/SHA512ShortMsg.req ] ; then ../util/shlib_wrap.sh ../test/fips_shatest < testvectors/sha/req/SHA512ShortMsg.req > testvectors/sha/rsp/SHA512ShortMsg.rsp || { echo fips_shatest failure ; exit 1; } ; fi
|
||||
|
||||
# aes tests
|
||||
rm -rf testvectors/aes/rsp
|
||||
mkdir testvectors/aes/rsp
|
||||
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCGFSbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCGFSbox128.req" "./testvectors/AES/rsp/CBCGFSbox128.rsp" || { echo "./testvectors/AES/req/CBCGFSbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCGFSbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCGFSbox192.req" "./testvectors/AES/rsp/CBCGFSbox192.rsp" || { echo "./testvectors/AES/req/CBCGFSbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCGFSbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCGFSbox256.req" "./testvectors/AES/rsp/CBCGFSbox256.rsp" || { echo "./testvectors/AES/req/CBCGFSbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCKeySbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCKeySbox128.req" "./testvectors/AES/rsp/CBCKeySbox128.rsp" || { echo "./testvectors/AES/req/CBCKeySbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCKeySbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCKeySbox192.req" "./testvectors/AES/rsp/CBCKeySbox192.rsp" || { echo "./testvectors/AES/req/CBCKeySbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCKeySbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCKeySbox256.req" "./testvectors/AES/rsp/CBCKeySbox256.rsp" || { echo "./testvectors/AES/req/CBCKeySbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCMCT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCMCT128.req" "./testvectors/AES/rsp/CBCMCT128.rsp" || { echo "./testvectors/AES/req/CBCMCT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCMCT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCMCT192.req" "./testvectors/AES/rsp/CBCMCT192.rsp" || { echo "./testvectors/AES/req/CBCMCT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCMCT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCMCT256.req" "./testvectors/AES/rsp/CBCMCT256.rsp" || { echo "./testvectors/AES/req/CBCMCT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCMMT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCMMT128.req" "./testvectors/AES/rsp/CBCMMT128.rsp" || { echo "./testvectors/AES/req/CBCMMT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCMMT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCMMT192.req" "./testvectors/AES/rsp/CBCMMT192.rsp" || { echo "./testvectors/AES/req/CBCMMT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCMMT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCMMT256.req" "./testvectors/AES/rsp/CBCMMT256.rsp" || { echo "./testvectors/AES/req/CBCMMT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCVarKey128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCVarKey128.req" "./testvectors/AES/rsp/CBCVarKey128.rsp" || { echo "./testvectors/AES/req/CBCVarKey128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCVarKey192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCVarKey192.req" "./testvectors/AES/rsp/CBCVarKey192.rsp" || { echo "./testvectors/AES/req/CBCVarKey192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCVarKey256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCVarKey256.req" "./testvectors/AES/rsp/CBCVarKey256.rsp" || { echo "./testvectors/AES/req/CBCVarKey256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCVarTxt128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCVarTxt128.req" "./testvectors/AES/rsp/CBCVarTxt128.rsp" || { echo "./testvectors/AES/req/CBCVarTxt128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCVarTxt192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCVarTxt192.req" "./testvectors/AES/rsp/CBCVarTxt192.rsp" || { echo "./testvectors/AES/req/CBCVarTxt192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CBCVarTxt256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CBCVarTxt256.req" "./testvectors/AES/rsp/CBCVarTxt256.rsp" || { echo "./testvectors/AES/req/CBCVarTxt256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128GFSbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128GFSbox128.req" "./testvectors/AES/rsp/CFB128GFSbox128.rsp" || { echo "./testvectors/AES/req/CFB128GFSbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128GFSbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128GFSbox192.req" "./testvectors/AES/rsp/CFB128GFSbox192.rsp" || { echo "./testvectors/AES/req/CFB128GFSbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128GFSbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128GFSbox256.req" "./testvectors/AES/rsp/CFB128GFSbox256.rsp" || { echo "./testvectors/AES/req/CFB128GFSbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128KeySbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128KeySbox128.req" "./testvectors/AES/rsp/CFB128KeySbox128.rsp" || { echo "./testvectors/AES/req/CFB128KeySbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128KeySbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128KeySbox192.req" "./testvectors/AES/rsp/CFB128KeySbox192.rsp" || { echo "./testvectors/AES/req/CFB128KeySbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128KeySbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128KeySbox256.req" "./testvectors/AES/rsp/CFB128KeySbox256.rsp" || { echo "./testvectors/AES/req/CFB128KeySbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128MCT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128MCT128.req" "./testvectors/AES/rsp/CFB128MCT128.rsp" || { echo "./testvectors/AES/req/CFB128MCT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128MCT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128MCT192.req" "./testvectors/AES/rsp/CFB128MCT192.rsp" || { echo "./testvectors/AES/req/CFB128MCT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128MCT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128MCT256.req" "./testvectors/AES/rsp/CFB128MCT256.rsp" || { echo "./testvectors/AES/req/CFB128MCT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128MMT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128MMT128.req" "./testvectors/AES/rsp/CFB128MMT128.rsp" || { echo "./testvectors/AES/req/CFB128MMT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128MMT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128MMT192.req" "./testvectors/AES/rsp/CFB128MMT192.rsp" || { echo "./testvectors/AES/req/CFB128MMT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128MMT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128MMT256.req" "./testvectors/AES/rsp/CFB128MMT256.rsp" || { echo "./testvectors/AES/req/CFB128MMT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128VarKey128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128VarKey128.req" "./testvectors/AES/rsp/CFB128VarKey128.rsp" || { echo "./testvectors/AES/req/CFB128VarKey128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128VarKey192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128VarKey192.req" "./testvectors/AES/rsp/CFB128VarKey192.rsp" || { echo "./testvectors/AES/req/CFB128VarKey192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128VarKey256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128VarKey256.req" "./testvectors/AES/rsp/CFB128VarKey256.rsp" || { echo "./testvectors/AES/req/CFB128VarKey256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128VarTxt128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128VarTxt128.req" "./testvectors/AES/rsp/CFB128VarTxt128.rsp" || { echo "./testvectors/AES/req/CFB128VarTxt128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128VarTxt192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128VarTxt192.req" "./testvectors/AES/rsp/CFB128VarTxt192.rsp" || { echo "./testvectors/AES/req/CFB128VarTxt192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB128VarTxt256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB128VarTxt256.req" "./testvectors/AES/rsp/CFB128VarTxt256.rsp" || { echo "./testvectors/AES/req/CFB128VarTxt256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8GFSbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1GFSbox128.req" "./testvectors/AES/rsp/CFB1GFSbox128.rsp" || { echo "./testvectors/AES/req/CFB1GFSbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8GFSbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1GFSbox192.req" "./testvectors/AES/rsp/CFB1GFSbox192.rsp" || { echo "./testvectors/AES/req/CFB1GFSbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8GFSbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1GFSbox256.req" "./testvectors/AES/rsp/CFB1GFSbox256.rsp" || { echo "./testvectors/AES/req/CFB1GFSbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8KeySbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1KeySbox128.req" "./testvectors/AES/rsp/CFB1KeySbox128.rsp" || { echo "./testvectors/AES/req/CFB1KeySbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8KeySbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1KeySbox192.req" "./testvectors/AES/rsp/CFB1KeySbox192.rsp" || { echo "./testvectors/AES/req/CFB1KeySbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8KeySbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1KeySbox256.req" "./testvectors/AES/rsp/CFB1KeySbox256.rsp" || { echo "./testvectors/AES/req/CFB1KeySbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8MCT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1MCT128.req" "./testvectors/AES/rsp/CFB1MCT128.rsp" || { echo "./testvectors/AES/req/CFB1MCT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8MCT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1MCT192.req" "./testvectors/AES/rsp/CFB1MCT192.rsp" || { echo "./testvectors/AES/req/CFB1MCT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8MCT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1MCT256.req" "./testvectors/AES/rsp/CFB1MCT256.rsp" || { echo "./testvectors/AES/req/CFB1MCT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8MMT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1MMT128.req" "./testvectors/AES/rsp/CFB1MMT128.rsp" || { echo "./testvectors/AES/req/CFB1MMT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8MMT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1MMT192.req" "./testvectors/AES/rsp/CFB1MMT192.rsp" || { echo "./testvectors/AES/req/CFB1MMT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8MMT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1MMT256.req" "./testvectors/AES/rsp/CFB1MMT256.rsp" || { echo "./testvectors/AES/req/CFB1MMT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8VarKey128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1VarKey128.req" "./testvectors/AES/rsp/CFB1VarKey128.rsp" || { echo "./testvectors/AES/req/CFB1VarKey128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8VarKey192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1VarKey192.req" "./testvectors/AES/rsp/CFB1VarKey192.rsp" || { echo "./testvectors/AES/req/CFB1VarKey192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8VarKey256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1VarKey256.req" "./testvectors/AES/rsp/CFB1VarKey256.rsp" || { echo "./testvectors/AES/req/CFB1VarKey256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8VarTxt128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1VarTxt128.req" "./testvectors/AES/rsp/CFB1VarTxt128.rsp" || { echo "./testvectors/AES/req/CFB1VarTxt128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8VarTxt192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1VarTxt192.req" "./testvectors/AES/rsp/CFB1VarTxt192.rsp" || { echo "./testvectors/AES/req/CFB1VarTxt192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/CFB8VarTxt256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB1VarTxt256.req" "./testvectors/AES/rsp/CFB1VarTxt256.rsp" || { echo "./testvectors/AES/req/CFB1VarTxt256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBGFSbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8GFSbox128.req" "./testvectors/AES/rsp/CFB8GFSbox128.rsp" || { echo "./testvectors/AES/req/CFB8GFSbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBGFSbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8GFSbox192.req" "./testvectors/AES/rsp/CFB8GFSbox192.rsp" || { echo "./testvectors/AES/req/CFB8GFSbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBGFSbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8GFSbox256.req" "./testvectors/AES/rsp/CFB8GFSbox256.rsp" || { echo "./testvectors/AES/req/CFB8GFSbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBKeySbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8KeySbox128.req" "./testvectors/AES/rsp/CFB8KeySbox128.rsp" || { echo "./testvectors/AES/req/CFB8KeySbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBKeySbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8KeySbox192.req" "./testvectors/AES/rsp/CFB8KeySbox192.rsp" || { echo "./testvectors/AES/req/CFB8KeySbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBKeySbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8KeySbox256.req" "./testvectors/AES/rsp/CFB8KeySbox256.rsp" || { echo "./testvectors/AES/req/CFB8KeySbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBMCT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8MCT128.req" "./testvectors/AES/rsp/CFB8MCT128.rsp" || { echo "./testvectors/AES/req/CFB8MCT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBMCT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8MCT192.req" "./testvectors/AES/rsp/CFB8MCT192.rsp" || { echo "./testvectors/AES/req/CFB8MCT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBMCT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8MCT256.req" "./testvectors/AES/rsp/CFB8MCT256.rsp" || { echo "./testvectors/AES/req/CFB8MCT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBMMT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8MMT128.req" "./testvectors/AES/rsp/CFB8MMT128.rsp" || { echo "./testvectors/AES/req/CFB8MMT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBMMT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8MMT192.req" "./testvectors/AES/rsp/CFB8MMT192.rsp" || { echo "./testvectors/AES/req/CFB8MMT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBMMT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8MMT256.req" "./testvectors/AES/rsp/CFB8MMT256.rsp" || { echo "./testvectors/AES/req/CFB8MMT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBVarKey128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8VarKey128.req" "./testvectors/AES/rsp/CFB8VarKey128.rsp" || { echo "./testvectors/AES/req/CFB8VarKey128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBVarKey192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8VarKey192.req" "./testvectors/AES/rsp/CFB8VarKey192.rsp" || { echo "./testvectors/AES/req/CFB8VarKey192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBVarKey256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8VarKey256.req" "./testvectors/AES/rsp/CFB8VarKey256.rsp" || { echo "./testvectors/AES/req/CFB8VarKey256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBVarTxt128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8VarTxt128.req" "./testvectors/AES/rsp/CFB8VarTxt128.rsp" || { echo "./testvectors/AES/req/CFB8VarTxt128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBVarTxt192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8VarTxt192.req" "./testvectors/AES/rsp/CFB8VarTxt192.rsp" || { echo "./testvectors/AES/req/CFB8VarTxt192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/ECBVarTxt256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/CFB8VarTxt256.req" "./testvectors/AES/rsp/CFB8VarTxt256.rsp" || { echo "./testvectors/AES/req/CFB8VarTxt256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBGFSbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBGFSbox128.req" "./testvectors/AES/rsp/ECBGFSbox128.rsp" || { echo "./testvectors/AES/req/ECBGFSbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBGFSbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBGFSbox192.req" "./testvectors/AES/rsp/ECBGFSbox192.rsp" || { echo "./testvectors/AES/req/ECBGFSbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBGFSbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBGFSbox256.req" "./testvectors/AES/rsp/ECBGFSbox256.rsp" || { echo "./testvectors/AES/req/ECBGFSbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBKeySbox128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBKeySbox128.req" "./testvectors/AES/rsp/ECBKeySbox128.rsp" || { echo "./testvectors/AES/req/ECBKeySbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBKeySbox192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBKeySbox192.req" "./testvectors/AES/rsp/ECBKeySbox192.rsp" || { echo "./testvectors/AES/req/ECBKeySbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBKeySbox256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBKeySbox256.req" "./testvectors/AES/rsp/ECBKeySbox256.rsp" || { echo "./testvectors/AES/req/ECBKeySbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBMCT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBMCT128.req" "./testvectors/AES/rsp/ECBMCT128.rsp" || { echo "./testvectors/AES/req/ECBMCT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBMCT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBMCT192.req" "./testvectors/AES/rsp/ECBMCT192.rsp" || { echo "./testvectors/AES/req/ECBMCT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBMCT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBMCT256.req" "./testvectors/AES/rsp/ECBMCT256.rsp" || { echo "./testvectors/AES/req/ECBMCT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBMMT128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBMMT128.req" "./testvectors/AES/rsp/ECBMMT128.rsp" || { echo "./testvectors/AES/req/ECBMMT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBMMT192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBMMT192.req" "./testvectors/AES/rsp/ECBMMT192.rsp" || { echo "./testvectors/AES/req/ECBMMT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBMMT256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBMMT256.req" "./testvectors/AES/rsp/ECBMMT256.rsp" || { echo "./testvectors/AES/req/ECBMMT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBVarKey128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBVarKey128.req" "./testvectors/AES/rsp/ECBVarKey128.rsp" || { echo "./testvectors/AES/req/ECBVarKey128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBVarKey192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBVarKey192.req" "./testvectors/AES/rsp/ECBVarKey192.rsp" || { echo "./testvectors/AES/req/ECBVarKey192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBVarKey256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBVarKey256.req" "./testvectors/AES/rsp/ECBVarKey256.rsp" || { echo "./testvectors/AES/req/ECBVarKey256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBVarTxt128.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBVarTxt128.req" "./testvectors/AES/rsp/ECBVarTxt128.rsp" || { echo "./testvectors/AES/req/ECBVarTxt128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBVarTxt192.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBVarTxt192.req" "./testvectors/AES/rsp/ECBVarTxt192.rsp" || { echo "./testvectors/AES/req/ECBVarTxt192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f testvectors/aes/req/OFBVarTxt256.req || { echo fips_aesavs -f failure ; exit 1
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/ECBVarTxt256.req" "./testvectors/AES/rsp/ECBVarTxt256.rsp" || { echo "./testvectors/AES/req/ECBVarTxt256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBGFSbox128.req" "./testvectors/AES/rsp/OFBGFSbox128.rsp" || { echo "./testvectors/AES/req/OFBGFSbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBGFSbox192.req" "./testvectors/AES/rsp/OFBGFSbox192.rsp" || { echo "./testvectors/AES/req/OFBGFSbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBGFSbox256.req" "./testvectors/AES/rsp/OFBGFSbox256.rsp" || { echo "./testvectors/AES/req/OFBGFSbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBKeySbox128.req" "./testvectors/AES/rsp/OFBKeySbox128.rsp" || { echo "./testvectors/AES/req/OFBKeySbox128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBKeySbox192.req" "./testvectors/AES/rsp/OFBKeySbox192.rsp" || { echo "./testvectors/AES/req/OFBKeySbox192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBKeySbox256.req" "./testvectors/AES/rsp/OFBKeySbox256.rsp" || { echo "./testvectors/AES/req/OFBKeySbox256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBMCT128.req" "./testvectors/AES/rsp/OFBMCT128.rsp" || { echo "./testvectors/AES/req/OFBMCT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBMCT192.req" "./testvectors/AES/rsp/OFBMCT192.rsp" || { echo "./testvectors/AES/req/OFBMCT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBMCT256.req" "./testvectors/AES/rsp/OFBMCT256.rsp" || { echo "./testvectors/AES/req/OFBMCT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBMMT128.req" "./testvectors/AES/rsp/OFBMMT128.rsp" || { echo "./testvectors/AES/req/OFBMMT128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBMMT192.req" "./testvectors/AES/rsp/OFBMMT192.rsp" || { echo "./testvectors/AES/req/OFBMMT192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBMMT256.req" "./testvectors/AES/rsp/OFBMMT256.rsp" || { echo "./testvectors/AES/req/OFBMMT256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBVarKey128.req" "./testvectors/AES/rsp/OFBVarKey128.rsp" || { echo "./testvectors/AES/req/OFBVarKey128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBVarKey192.req" "./testvectors/AES/rsp/OFBVarKey192.rsp" || { echo "./testvectors/AES/req/OFBVarKey192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBVarKey256.req" "./testvectors/AES/rsp/OFBVarKey256.rsp" || { echo "./testvectors/AES/req/OFBVarKey256.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBVarTxt128.req" "./testvectors/AES/rsp/OFBVarTxt128.rsp" || { echo "./testvectors/AES/req/OFBVarTxt128.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBVarTxt192.req" "./testvectors/AES/rsp/OFBVarTxt192.rsp" || { echo "./testvectors/AES/req/OFBVarTxt192.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_aesavs -f "./testvectors/AES/req/OFBVarTxt256.req" "./testvectors/AES/rsp/OFBVarTxt256.rsp" || { echo "./testvectors/AES/req/OFBVarTxt256.req failure" ; exit 1
|
||||
}
|
||||
|
||||
# tdes tests
|
||||
rm -rf testvectors/tdes/rsp
|
||||
mkdir testvectors/tdes/rsp
|
||||
echo Running tests in "./testvectors/DSA/req"
|
||||
rm -rf "./testvectors/DSA/rsp"
|
||||
mkdir "./testvectors/DSA/rsp"
|
||||
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCinvperm.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCMMT1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCMMT2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCMMT3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCMonte1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCMonte2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCMonte3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCpermop.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCsubtab.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCvarkey.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCBCvartext.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64invperm.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64MMT1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64MMT2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64MMT3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64Monte1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64Monte2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64Monte3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64permop.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64subtab.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64varkey.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB64vartext.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8invperm.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8MMT1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8MMT2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8MMT3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8Monte1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8Monte2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8Monte3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8permop.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8subtab.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8varkey.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TCFB8vartext.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBinvperm.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBMMT1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBMMT2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBMMT3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBMonte1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBMonte2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBMonte3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBpermop.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBsubtab.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBvarkey.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TECBvartext.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBinvperm.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBMMT1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBMMT2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBMMT3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBMonte1.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBMonte2.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBMonte3.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBpermop.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBsubtab.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBvarkey.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f testvectors/tdes/req/TOFBvartext.req || { echo fips_desmovs -f failure ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_dssvs keypair < "./testvectors/DSA/req/KeyPair.req" > "./testvectors/DSA/rsp/KeyPair.rsp" || { echo "./testvectors/DSA/req/KeyPair.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_dssvs pqg < "./testvectors/DSA/req/PQGGen.req" > "./testvectors/DSA/rsp/PQGGen.rsp" || { echo "./testvectors/DSA/req/PQGGen.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_dssvs siggen < "./testvectors/DSA/req/SigGen.req" > "./testvectors/DSA/rsp/SigGen.rsp" || { echo "./testvectors/DSA/req/SigGen.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_dssvs sigver < "./testvectors/DSA/req/SigVer.req" > "./testvectors/DSA/rsp/SigVer.rsp" || { echo "./testvectors/DSA/req/SigVer.req failure" ; exit 1; }
|
||||
|
||||
# hmac tests
|
||||
rm -rf testvectors/hmac/rsp
|
||||
mkdir testvectors/hmac/rsp
|
||||
echo Running tests in "./testvectors/HMAC/req"
|
||||
rm -rf "./testvectors/HMAC/rsp"
|
||||
mkdir "./testvectors/HMAC/rsp"
|
||||
|
||||
if [ -f testvectors/hmac/req/HMAC.req ] ; then ../util/shlib_wrap.sh ../test/fips_hmactest < testvectors/hmac/req/HMAC.req > testvectors/hmac/rsp/HMAC.rsp || { echo fips_hmactest failure ; exit 1; } ; fi
|
||||
../util/shlib_wrap.sh ../test/fips_hmactest < "./testvectors/HMAC/req/HMAC.req" > "./testvectors/HMAC/rsp/HMAC.rsp" || { echo "./testvectors/HMAC/req/HMAC.req failure" ; exit 1; }
|
||||
|
||||
# rng tests
|
||||
rm -rf testvectors/rng/rsp
|
||||
mkdir testvectors/rng/rsp
|
||||
echo Running tests in "./testvectors/RNG/req"
|
||||
rm -rf "./testvectors/RNG/rsp"
|
||||
mkdir "./testvectors/RNG/rsp"
|
||||
|
||||
if [ -f testvectors/rng/req/ANSI931_AES128MCT.req ] ; then ../util/shlib_wrap.sh ../test/fips_rngvs mct < testvectors/rng/req/ANSI931_AES128MCT.req > testvectors/rng/rsp/ANSI931_AES128MCT.rsp || { echo fips_rngvs mct failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rng/req/ANSI931_AES192MCT.req ] ; then ../util/shlib_wrap.sh ../test/fips_rngvs mct < testvectors/rng/req/ANSI931_AES192MCT.req > testvectors/rng/rsp/ANSI931_AES192MCT.rsp || { echo fips_rngvs mct failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rng/req/ANSI931_AES256MCT.req ] ; then ../util/shlib_wrap.sh ../test/fips_rngvs mct < testvectors/rng/req/ANSI931_AES256MCT.req > testvectors/rng/rsp/ANSI931_AES256MCT.rsp || { echo fips_rngvs mct failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rng/req/ANSI931_AES128VST.req ] ; then ../util/shlib_wrap.sh ../test/fips_rngvs vst < testvectors/rng/req/ANSI931_AES128VST.req > testvectors/rng/rsp/ANSI931_AES128VST.rsp || { echo fips_rngvs vst failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rng/req/ANSI931_AES192VST.req ] ; then ../util/shlib_wrap.sh ../test/fips_rngvs vst < testvectors/rng/req/ANSI931_AES192VST.req > testvectors/rng/rsp/ANSI931_AES192VST.rsp || { echo fips_rngvs vst failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rng/req/ANSI931_AES256VST.req ] ; then ../util/shlib_wrap.sh ../test/fips_rngvs vst < testvectors/rng/req/ANSI931_AES256VST.req > testvectors/rng/rsp/ANSI931_AES256VST.rsp || { echo fips_rngvs vst failure ; exit 1; } ; fi
|
||||
../util/shlib_wrap.sh ../test/fips_rngvs mct < "./testvectors/RNG/req/ANSI931_AES128MCT.req" > "./testvectors/RNG/rsp/ANSI931_AES128MCT.rsp" || { echo "./testvectors/RNG/req/ANSI931_AES128MCT.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rngvs vst < "./testvectors/RNG/req/ANSI931_AES128VST.req" > "./testvectors/RNG/rsp/ANSI931_AES128VST.rsp" || { echo "./testvectors/RNG/req/ANSI931_AES128VST.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rngvs mct < "./testvectors/RNG/req/ANSI931_AES192MCT.req" > "./testvectors/RNG/rsp/ANSI931_AES192MCT.rsp" || { echo "./testvectors/RNG/req/ANSI931_AES192MCT.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rngvs vst < "./testvectors/RNG/req/ANSI931_AES192VST.req" > "./testvectors/RNG/rsp/ANSI931_AES192VST.rsp" || { echo "./testvectors/RNG/req/ANSI931_AES192VST.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rngvs mct < "./testvectors/RNG/req/ANSI931_AES256MCT.req" > "./testvectors/RNG/rsp/ANSI931_AES256MCT.rsp" || { echo "./testvectors/RNG/req/ANSI931_AES256MCT.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rngvs vst < "./testvectors/RNG/req/ANSI931_AES256VST.req" > "./testvectors/RNG/rsp/ANSI931_AES256VST.rsp" || { echo "./testvectors/RNG/req/ANSI931_AES256VST.req failure" ; exit 1; }
|
||||
|
||||
# rsa tests
|
||||
rm -rf testvectors/rsa/rsp
|
||||
mkdir testvectors/rsa/rsp
|
||||
echo Running tests in "./testvectors/RSA/req"
|
||||
rm -rf "./testvectors/RSA/rsp"
|
||||
mkdir "./testvectors/RSA/rsp"
|
||||
|
||||
if [ -f testvectors/rsa/req/SigGen15.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsastest < testvectors/rsa/req/SigGen15.req > testvectors/rsa/rsp/SigGen15.rsp || { echo fips_rsastest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa/req/SigVer15.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsavtest < testvectors/rsa/req/SigVer15.req > testvectors/rsa/rsp/SigVer15.rsp || { echo fips_rsavtest failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa/req/SigGenPSS.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsastest -saltlen 0 < testvectors/rsa/req/SigGenPSS.req > testvectors/rsa/rsp/SigGenPSS.rsp || { echo fips_rsastest -saltlen 0 failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa/req/SigVerPSS.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsavtest -saltlen 0 < testvectors/rsa/req/SigVerPSS.req > testvectors/rsa/rsp/SigVerPSS.rsp || { echo fips_rsavtest -saltlen 0 failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa/req/SigGenRSA.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsastest -x931 < testvectors/rsa/req/SigGenRSA.req > testvectors/rsa/rsp/SigGenRSA.rsp || { echo fips_rsastest -x931 failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa/req/SigVerRSA.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsavtest -x931 < testvectors/rsa/req/SigVerRSA.req > testvectors/rsa/rsp/SigVerRSA.rsp || { echo fips_rsavtest -x931 failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa/req/KeyGenRSA.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsagtest < testvectors/rsa/req/KeyGenRSA.req > testvectors/rsa/rsp/KeyGenRSA.rsp || { echo fips_rsagtest failure ; exit 1; } ; fi
|
||||
../util/shlib_wrap.sh ../test/fips_rsagtest < "./testvectors/RSA/req/KeyGenRSA.req" > "./testvectors/RSA/rsp/KeyGenRSA.rsp" || { echo "./testvectors/RSA/req/KeyGenRSA.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rsastest < "./testvectors/RSA/req/SigGen15.req" > "./testvectors/RSA/rsp/SigGen15.rsp" || { echo "./testvectors/RSA/req/SigGen15.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rsastest -saltlen 0 < "./testvectors/RSA/req/SigGenPSS.req" > "./testvectors/RSA/rsp/SigGenPSS.rsp" || { echo "./testvectors/RSA/req/SigGenPSS.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rsastest -x931 < "./testvectors/RSA/req/SigGenRSA.req" > "./testvectors/RSA/rsp/SigGenRSA.rsp" || { echo "./testvectors/RSA/req/SigGenRSA.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rsavtest < "./testvectors/RSA/req/SigVer15.req" > "./testvectors/RSA/rsp/SigVer15.rsp" || { echo "./testvectors/RSA/req/SigVer15.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rsavtest -saltlen 0 < "./testvectors/RSA/req/SigVerPSS.req" > "./testvectors/RSA/rsp/SigVerPSS.rsp" || { echo "./testvectors/RSA/req/SigVerPSS.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_rsavtest -x931 < "./testvectors/RSA/req/SigVerRSA.req" > "./testvectors/RSA/rsp/SigVerRSA.rsp" || { echo "./testvectors/RSA/req/SigVerRSA.req failure" ; exit 1; }
|
||||
|
||||
# rsa_salt_62 tests
|
||||
rm -rf testvectors/rsa_salt_62/rsp
|
||||
mkdir testvectors/rsa_salt_62/rsp
|
||||
echo Running tests in "./testvectors/SHA/req"
|
||||
rm -rf "./testvectors/SHA/rsp"
|
||||
mkdir "./testvectors/SHA/rsp"
|
||||
|
||||
if [ -f testvectors/rsa_salt_62/req/SigGenPSS.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsastest -saltlen 62 < testvectors/rsa_salt_62/req/SigGenPSS.req > testvectors/rsa_salt_62/rsp/SigGenPSS.rsp || { echo fips_rsastest -saltlen 62 failure ; exit 1; } ; fi
|
||||
if [ -f testvectors/rsa_salt_62/req/SigVerPSS.req ] ; then ../util/shlib_wrap.sh ../test/fips_rsavtest -saltlen 62 < testvectors/rsa_salt_62/req/SigVerPSS.req > testvectors/rsa_salt_62/rsp/SigVerPSS.rsp || { echo fips_rsavtest -saltlen 62 failure ; exit 1; } ; fi
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA1LongMsg.req" > "./testvectors/SHA/rsp/SHA1LongMsg.rsp" || { echo "./testvectors/SHA/req/SHA1LongMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA1Monte.req" > "./testvectors/SHA/rsp/SHA1Monte.rsp" || { echo "./testvectors/SHA/req/SHA1Monte.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA1ShortMsg.req" > "./testvectors/SHA/rsp/SHA1ShortMsg.rsp" || { echo "./testvectors/SHA/req/SHA1ShortMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA224LongMsg.req" > "./testvectors/SHA/rsp/SHA224LongMsg.rsp" || { echo "./testvectors/SHA/req/SHA224LongMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA224Monte.req" > "./testvectors/SHA/rsp/SHA224Monte.rsp" || { echo "./testvectors/SHA/req/SHA224Monte.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA224ShortMsg.req" > "./testvectors/SHA/rsp/SHA224ShortMsg.rsp" || { echo "./testvectors/SHA/req/SHA224ShortMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA256LongMsg.req" > "./testvectors/SHA/rsp/SHA256LongMsg.rsp" || { echo "./testvectors/SHA/req/SHA256LongMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA256Monte.req" > "./testvectors/SHA/rsp/SHA256Monte.rsp" || { echo "./testvectors/SHA/req/SHA256Monte.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA256ShortMsg.req" > "./testvectors/SHA/rsp/SHA256ShortMsg.rsp" || { echo "./testvectors/SHA/req/SHA256ShortMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA384LongMsg.req" > "./testvectors/SHA/rsp/SHA384LongMsg.rsp" || { echo "./testvectors/SHA/req/SHA384LongMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA384Monte.req" > "./testvectors/SHA/rsp/SHA384Monte.rsp" || { echo "./testvectors/SHA/req/SHA384Monte.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA384ShortMsg.req" > "./testvectors/SHA/rsp/SHA384ShortMsg.rsp" || { echo "./testvectors/SHA/req/SHA384ShortMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA512LongMsg.req" > "./testvectors/SHA/rsp/SHA512LongMsg.rsp" || { echo "./testvectors/SHA/req/SHA512LongMsg.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA512Monte.req" > "./testvectors/SHA/rsp/SHA512Monte.rsp" || { echo "./testvectors/SHA/req/SHA512Monte.req failure" ; exit 1; }
|
||||
../util/shlib_wrap.sh ../test/fips_shatest < "./testvectors/SHA/req/SHA512ShortMsg.req" > "./testvectors/SHA/rsp/SHA512ShortMsg.rsp" || { echo "./testvectors/SHA/req/SHA512ShortMsg.req failure" ; exit 1; }
|
||||
|
||||
echo Running tests in "./testvectors/TDES/req"
|
||||
rm -rf "./testvectors/TDES/rsp"
|
||||
mkdir "./testvectors/TDES/rsp"
|
||||
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCinvperm.req" "./testvectors/TDES/rsp/TCBCinvperm.rsp" || { echo "./testvectors/TDES/req/TCBCinvperm.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCMMT1.req" "./testvectors/TDES/rsp/TCBCMMT1.rsp" || { echo "./testvectors/TDES/req/TCBCMMT1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCMMT2.req" "./testvectors/TDES/rsp/TCBCMMT2.rsp" || { echo "./testvectors/TDES/req/TCBCMMT2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCMMT3.req" "./testvectors/TDES/rsp/TCBCMMT3.rsp" || { echo "./testvectors/TDES/req/TCBCMMT3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCMonte1.req" "./testvectors/TDES/rsp/TCBCMonte1.rsp" || { echo "./testvectors/TDES/req/TCBCMonte1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCMonte2.req" "./testvectors/TDES/rsp/TCBCMonte2.rsp" || { echo "./testvectors/TDES/req/TCBCMonte2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCMonte3.req" "./testvectors/TDES/rsp/TCBCMonte3.rsp" || { echo "./testvectors/TDES/req/TCBCMonte3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCpermop.req" "./testvectors/TDES/rsp/TCBCpermop.rsp" || { echo "./testvectors/TDES/req/TCBCpermop.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCsubtab.req" "./testvectors/TDES/rsp/TCBCsubtab.rsp" || { echo "./testvectors/TDES/req/TCBCsubtab.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCvarkey.req" "./testvectors/TDES/rsp/TCBCvarkey.rsp" || { echo "./testvectors/TDES/req/TCBCvarkey.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCBCvartext.req" "./testvectors/TDES/rsp/TCBCvartext.rsp" || { echo "./testvectors/TDES/req/TCBCvartext.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64invperm.req" "./testvectors/TDES/rsp/TCFB64invperm.rsp" || { echo "./testvectors/TDES/req/TCFB64invperm.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64MMT1.req" "./testvectors/TDES/rsp/TCFB64MMT1.rsp" || { echo "./testvectors/TDES/req/TCFB64MMT1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64MMT2.req" "./testvectors/TDES/rsp/TCFB64MMT2.rsp" || { echo "./testvectors/TDES/req/TCFB64MMT2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64MMT3.req" "./testvectors/TDES/rsp/TCFB64MMT3.rsp" || { echo "./testvectors/TDES/req/TCFB64MMT3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64Monte1.req" "./testvectors/TDES/rsp/TCFB64Monte1.rsp" || { echo "./testvectors/TDES/req/TCFB64Monte1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64Monte2.req" "./testvectors/TDES/rsp/TCFB64Monte2.rsp" || { echo "./testvectors/TDES/req/TCFB64Monte2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64Monte3.req" "./testvectors/TDES/rsp/TCFB64Monte3.rsp" || { echo "./testvectors/TDES/req/TCFB64Monte3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64permop.req" "./testvectors/TDES/rsp/TCFB64permop.rsp" || { echo "./testvectors/TDES/req/TCFB64permop.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64subtab.req" "./testvectors/TDES/rsp/TCFB64subtab.rsp" || { echo "./testvectors/TDES/req/TCFB64subtab.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64varkey.req" "./testvectors/TDES/rsp/TCFB64varkey.rsp" || { echo "./testvectors/TDES/req/TCFB64varkey.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB64vartext.req" "./testvectors/TDES/rsp/TCFB64vartext.rsp" || { echo "./testvectors/TDES/req/TCFB64vartext.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8invperm.req" "./testvectors/TDES/rsp/TCFB8invperm.rsp" || { echo "./testvectors/TDES/req/TCFB8invperm.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8MMT1.req" "./testvectors/TDES/rsp/TCFB8MMT1.rsp" || { echo "./testvectors/TDES/req/TCFB8MMT1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8MMT2.req" "./testvectors/TDES/rsp/TCFB8MMT2.rsp" || { echo "./testvectors/TDES/req/TCFB8MMT2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8MMT3.req" "./testvectors/TDES/rsp/TCFB8MMT3.rsp" || { echo "./testvectors/TDES/req/TCFB8MMT3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8Monte1.req" "./testvectors/TDES/rsp/TCFB8Monte1.rsp" || { echo "./testvectors/TDES/req/TCFB8Monte1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8Monte2.req" "./testvectors/TDES/rsp/TCFB8Monte2.rsp" || { echo "./testvectors/TDES/req/TCFB8Monte2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8Monte3.req" "./testvectors/TDES/rsp/TCFB8Monte3.rsp" || { echo "./testvectors/TDES/req/TCFB8Monte3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8permop.req" "./testvectors/TDES/rsp/TCFB8permop.rsp" || { echo "./testvectors/TDES/req/TCFB8permop.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8subtab.req" "./testvectors/TDES/rsp/TCFB8subtab.rsp" || { echo "./testvectors/TDES/req/TCFB8subtab.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8varkey.req" "./testvectors/TDES/rsp/TCFB8varkey.rsp" || { echo "./testvectors/TDES/req/TCFB8varkey.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TCFB8vartext.req" "./testvectors/TDES/rsp/TCFB8vartext.rsp" || { echo "./testvectors/TDES/req/TCFB8vartext.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBinvperm.req" "./testvectors/TDES/rsp/TECBinvperm.rsp" || { echo "./testvectors/TDES/req/TECBinvperm.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBMMT1.req" "./testvectors/TDES/rsp/TECBMMT1.rsp" || { echo "./testvectors/TDES/req/TECBMMT1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBMMT2.req" "./testvectors/TDES/rsp/TECBMMT2.rsp" || { echo "./testvectors/TDES/req/TECBMMT2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBMMT3.req" "./testvectors/TDES/rsp/TECBMMT3.rsp" || { echo "./testvectors/TDES/req/TECBMMT3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBMonte1.req" "./testvectors/TDES/rsp/TECBMonte1.rsp" || { echo "./testvectors/TDES/req/TECBMonte1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBMonte2.req" "./testvectors/TDES/rsp/TECBMonte2.rsp" || { echo "./testvectors/TDES/req/TECBMonte2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBMonte3.req" "./testvectors/TDES/rsp/TECBMonte3.rsp" || { echo "./testvectors/TDES/req/TECBMonte3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBpermop.req" "./testvectors/TDES/rsp/TECBpermop.rsp" || { echo "./testvectors/TDES/req/TECBpermop.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBsubtab.req" "./testvectors/TDES/rsp/TECBsubtab.rsp" || { echo "./testvectors/TDES/req/TECBsubtab.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBvarkey.req" "./testvectors/TDES/rsp/TECBvarkey.rsp" || { echo "./testvectors/TDES/req/TECBvarkey.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TECBvartext.req" "./testvectors/TDES/rsp/TECBvartext.rsp" || { echo "./testvectors/TDES/req/TECBvartext.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBinvperm.req" "./testvectors/TDES/rsp/TOFBinvperm.rsp" || { echo "./testvectors/TDES/req/TOFBinvperm.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBMMT1.req" "./testvectors/TDES/rsp/TOFBMMT1.rsp" || { echo "./testvectors/TDES/req/TOFBMMT1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBMMT2.req" "./testvectors/TDES/rsp/TOFBMMT2.rsp" || { echo "./testvectors/TDES/req/TOFBMMT2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBMMT3.req" "./testvectors/TDES/rsp/TOFBMMT3.rsp" || { echo "./testvectors/TDES/req/TOFBMMT3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBMonte1.req" "./testvectors/TDES/rsp/TOFBMonte1.rsp" || { echo "./testvectors/TDES/req/TOFBMonte1.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBMonte2.req" "./testvectors/TDES/rsp/TOFBMonte2.rsp" || { echo "./testvectors/TDES/req/TOFBMonte2.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBMonte3.req" "./testvectors/TDES/rsp/TOFBMonte3.rsp" || { echo "./testvectors/TDES/req/TOFBMonte3.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBpermop.req" "./testvectors/TDES/rsp/TOFBpermop.rsp" || { echo "./testvectors/TDES/req/TOFBpermop.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBsubtab.req" "./testvectors/TDES/rsp/TOFBsubtab.rsp" || { echo "./testvectors/TDES/req/TOFBsubtab.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBvarkey.req" "./testvectors/TDES/rsp/TOFBvarkey.rsp" || { echo "./testvectors/TDES/req/TOFBvarkey.req failure" ; exit 1
|
||||
}
|
||||
../util/shlib_wrap.sh ../test/fips_desmovs -f "./testvectors/TDES/req/TOFBvartext.req" "./testvectors/TDES/rsp/TOFBvartext.rsp" || { echo "./testvectors/TDES/req/TOFBvartext.req failure" ; exit 1
|
||||
}
|
||||
|
||||
@@ -108,6 +108,24 @@ my %fips_tests = (
|
||||
"CFB8VarTxt128" => "fips_aesavs -f",
|
||||
"CFB8VarTxt192" => "fips_aesavs -f",
|
||||
"CFB8VarTxt256" => "fips_aesavs -f",
|
||||
#"CFB1GFSbox128" => "fips_aesavs -f",
|
||||
#"CFB1GFSbox192" => "fips_aesavs -f",
|
||||
#"CFB1GFSbox256" => "fips_aesavs -f",
|
||||
#"CFB1KeySbox128" => "fips_aesavs -f",
|
||||
#"CFB1KeySbox192" => "fips_aesavs -f",
|
||||
#"CFB1KeySbox256" => "fips_aesavs -f",
|
||||
#"CFB1MCT128" => "fips_aesavs -f",
|
||||
#"CFB1MCT192" => "fips_aesavs -f",
|
||||
#"CFB1MCT256" => "fips_aesavs -f",
|
||||
#"CFB1MMT128" => "fips_aesavs -f",
|
||||
#"CFB1MMT192" => "fips_aesavs -f",
|
||||
#"CFB1MMT256" => "fips_aesavs -f",
|
||||
#"CFB1VarKey128" => "fips_aesavs -f",
|
||||
#"CFB1VarKey192" => "fips_aesavs -f",
|
||||
#"CFB1VarKey256" => "fips_aesavs -f",
|
||||
#"CFB1VarTxt128" => "fips_aesavs -f",
|
||||
#"CFB1VarTxt192" => "fips_aesavs -f",
|
||||
#"CFB1VarTxt256" => "fips_aesavs -f",
|
||||
"ECBGFSbox128" => "fips_aesavs -f",
|
||||
"ECBGFSbox192" => "fips_aesavs -f",
|
||||
"ECBGFSbox256" => "fips_aesavs -f",
|
||||
@@ -268,6 +286,7 @@ my $tprefix;
|
||||
my $shwrap_prefix;
|
||||
my $debug = 0;
|
||||
my $quiet = 0;
|
||||
my $rspdir = "rsp";
|
||||
|
||||
foreach (@ARGV)
|
||||
{
|
||||
@@ -290,7 +309,10 @@ foreach (@ARGV)
|
||||
elsif (/--dir=(.*)$/)
|
||||
{
|
||||
$tvdir = $1;
|
||||
# $tvdir .= "/" unless $tvdir =~ /\/$/;
|
||||
}
|
||||
elsif (/--rspdir=(.*)$/)
|
||||
{
|
||||
$rspdir = $1;
|
||||
}
|
||||
elsif (/--tprefix=(.*)$/)
|
||||
{
|
||||
@@ -314,7 +336,17 @@ $tvdir = "." unless defined $tvdir;
|
||||
|
||||
if ($win32)
|
||||
{
|
||||
$tprefix = ".\\" unless defined $tprefix;
|
||||
if (!defined $tprefix)
|
||||
{
|
||||
if ($onedir)
|
||||
{
|
||||
$tprefix = ".\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tprefix = "..\\out32dll\\";
|
||||
}
|
||||
}
|
||||
$outfile = "fipstests.bat" unless defined $outfile;
|
||||
open(OUT, ">$outfile");
|
||||
|
||||
@@ -394,7 +426,7 @@ sub recurse_test
|
||||
$fips_found{$1}++;
|
||||
test_line($win32, $_, $tprefix, $fips_tests{$1});
|
||||
}
|
||||
else
|
||||
elsif (! /SHAmix\.req$/)
|
||||
{
|
||||
print STDERR "WARNING: unrecognized filename $_\n";
|
||||
}
|
||||
@@ -415,7 +447,7 @@ sub test_dir
|
||||
{
|
||||
my ($win32, $req) = @_;
|
||||
my $rsp = $req;
|
||||
$rsp =~ s/req$/rsp/;
|
||||
$rsp =~ s/req$/$rspdir/;
|
||||
if ($win32)
|
||||
{
|
||||
$rsp =~ tr|/|\\|;
|
||||
@@ -442,17 +474,20 @@ END
|
||||
sub test_line
|
||||
{
|
||||
my ($win32, $req, $tprefix, $tcmd) = @_;
|
||||
my $rsp = $req;
|
||||
$rsp =~ s/req\/([^\/]*).req$/$rspdir\/$1.rsp/;
|
||||
if ($tcmd =~ /-f$/)
|
||||
{
|
||||
if ($win32)
|
||||
{
|
||||
$req =~ tr|/|\\|;
|
||||
print OUT "$tprefix$tcmd \"$req\"\n";
|
||||
$rsp =~ tr|/|\\|;
|
||||
print OUT "$tprefix$tcmd \"$req\" \"$rsp\"\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print OUT <<END;
|
||||
${shwrap_prefix}shlib_wrap.sh $tprefix$tcmd "$req" || { echo "$req failure" ; exit 1
|
||||
${shwrap_prefix}shlib_wrap.sh $tprefix$tcmd "$req" "$rsp" || { echo "$req failure" ; exit 1
|
||||
}
|
||||
END
|
||||
}
|
||||
@@ -479,8 +514,6 @@ END
|
||||
}
|
||||
}
|
||||
|
||||
my $rsp = $req;
|
||||
$rsp =~ s/req\/([^\/]*).req$/rsp\/$1.rsp/;
|
||||
if ($win32)
|
||||
{
|
||||
$req =~ tr|/|\\|;
|
||||
|
||||
@@ -107,6 +107,13 @@ typedef struct
|
||||
|
||||
static FIPS_PRNG_CTX sctx;
|
||||
|
||||
static int fips_prng_fail = 0;
|
||||
|
||||
void FIPS_rng_stick(void)
|
||||
{
|
||||
fips_prng_fail = 1;
|
||||
}
|
||||
|
||||
void fips_rand_prng_reset(FIPS_PRNG_CTX *ctx)
|
||||
{
|
||||
ctx->seeded = 0;
|
||||
@@ -295,9 +302,11 @@ static int fips_rand(FIPS_PRNG_CTX *ctx,
|
||||
for (i = 0; i < AES_BLOCK_LENGTH; i++)
|
||||
tmp[i] = R[i] ^ I[i];
|
||||
AES_encrypt(tmp, ctx->V, &ctx->ks);
|
||||
/* Continuouse PRNG test */
|
||||
/* Continuous PRNG test */
|
||||
if (ctx->second)
|
||||
{
|
||||
if (fips_prng_fail)
|
||||
memcpy(ctx->last, R, AES_BLOCK_LENGTH);
|
||||
if (!memcmp(R, ctx->last, AES_BLOCK_LENGTH))
|
||||
{
|
||||
RANDerr(RAND_F_FIPS_RAND,RAND_R_PRNG_STUCK);
|
||||
|
||||
@@ -75,6 +75,13 @@
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
|
||||
static int fips_rsa_pairwise_fail = 0;
|
||||
|
||||
void FIPS_corrupt_rsa_keygen(void)
|
||||
{
|
||||
fips_rsa_pairwise_fail = 1;
|
||||
}
|
||||
|
||||
int fips_check_rsa(RSA *rsa)
|
||||
{
|
||||
const unsigned char tbs[] = "RSA Pairwise Check Data";
|
||||
@@ -278,6 +285,9 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
|
||||
p = rsa->p;
|
||||
if (!BN_mod_inverse(rsa->iqmp,rsa->q,p,ctx)) goto err;
|
||||
|
||||
if (fips_rsa_pairwise_fail)
|
||||
BN_add_word(rsa->n, 1);
|
||||
|
||||
if(!fips_check_rsa(rsa))
|
||||
goto err;
|
||||
|
||||
|
||||
@@ -47,8 +47,12 @@ lib: $(LIBOBJ)
|
||||
@echo $(LIBOBJ) > lib
|
||||
|
||||
../fips_standalone_sha1$(EXE_EXT): fips_standalone_sha1.o
|
||||
if [ -z "$(HOSTCC)" ] ; then \
|
||||
FIPS_SHA_ASM=""; for i in $(SHA1_ASM_OBJ) sha1dgst.o ; do FIPS_SHA_ASM="$$FIPS_SHA_ASM ../../crypto/sha/$$i" ; done; \
|
||||
$(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM
|
||||
$(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM ; \
|
||||
else \
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../../include -I../../crypto fips_standalone_sha1.c ../../crypto/sha/sha1dgst.c ; \
|
||||
fi
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
@@ -1009,6 +1009,7 @@ int dtls1_send_certificate_request(SSL *s)
|
||||
STACK_OF(X509_NAME) *sk=NULL;
|
||||
X509_NAME *name;
|
||||
BUF_MEM *buf;
|
||||
unsigned int msg_len;
|
||||
|
||||
if (s->state == SSL3_ST_SW_CERT_REQ_A)
|
||||
{
|
||||
@@ -1086,6 +1087,10 @@ int dtls1_send_certificate_request(SSL *s)
|
||||
#endif
|
||||
|
||||
/* XDTLS: set message header ? */
|
||||
msg_len = s->init_num - DTLS1_HM_HEADER_LENGTH;
|
||||
dtls1_set_message_header(s, s->init_buf->data,
|
||||
SSL3_MT_CERTIFICATE_REQUEST, msg_len, 0, msg_len);
|
||||
|
||||
/* buffer the message to handle re-xmits */
|
||||
dtls1_buffer_message(s, 0);
|
||||
|
||||
|
||||
@@ -3561,3 +3561,6 @@ FIPS_selftest_check 3954 EXIST:OPENSSL_FIPS:FUNCTION:
|
||||
fips_cipher_test 3955 EXIST:OPENSSL_FIPS:FUNCTION:
|
||||
int_EVP_CIPHER_set_engine_callbacks 3956 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
|
||||
int_EVP_CIPHER_init_engine_callbacks 3957 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
|
||||
FIPS_corrupt_rsa_keygen 3958 EXIST:OPENSSL_FIPS:FUNCTION:
|
||||
FIPS_corrupt_dsa_keygen 3959 EXIST:OPENSSL_FIPS:FUNCTION:
|
||||
FIPS_rng_stick 3960 EXIST:OPENSSL_FIPS:FUNCTION:
|
||||
|
||||
@@ -149,7 +149,7 @@ if ($FLAVOR =~ /CE/)
|
||||
else
|
||||
{
|
||||
$ex_libs.=' gdi32.lib advapi32.lib user32.lib';
|
||||
$ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
|
||||
$ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
|
||||
}
|
||||
|
||||
# As native NT API is pure UNICODE, our WIN-NT build defaults to UNICODE,
|
||||
@@ -331,7 +331,7 @@ sub do_lib_rule
|
||||
|
||||
if ($name eq "")
|
||||
{
|
||||
$ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
|
||||
$ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
|
||||
}
|
||||
elsif ($FLAVOR =~ /CE/)
|
||||
{
|
||||
@@ -341,7 +341,7 @@ sub do_lib_rule
|
||||
{
|
||||
$ex.=' unicows.lib' if ($FLAVOR =~ /NT/);
|
||||
$ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib';
|
||||
$ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
|
||||
$ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
|
||||
}
|
||||
$ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user