Compare commits
23 Commits
FIPS_098_T
...
FIPS_098_T
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f9048b8a1 | ||
|
|
d73ed541db | ||
|
|
e6e5592a50 | ||
|
|
663bbb6367 | ||
|
|
98ced05c56 | ||
|
|
5b75e1cff4 | ||
|
|
f36a8c2060 | ||
|
|
90ac9ec264 | ||
|
|
fe5c4c885b | ||
|
|
1950e8acea | ||
|
|
437bafa5cc | ||
|
|
7c78f06301 | ||
|
|
b27278d0cf | ||
|
|
24a69a8196 | ||
|
|
b3049d696b | ||
|
|
77b265f48c | ||
|
|
735b9eeed5 | ||
|
|
67c31c4b61 | ||
|
|
0406ce2646 | ||
|
|
76108ba7eb | ||
|
|
4d27e3d339 | ||
|
|
7d59e441ca | ||
|
|
3e3c47d5d5 |
169
Configure
169
Configure
@@ -121,11 +121,12 @@ my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o mo86-cof.o:dx86-cof.o yx8
|
||||
my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o mo86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o";
|
||||
|
||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o::";
|
||||
my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
|
||||
my $s390x_asm=":bn-s390x.o::aes_cbc.o aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::::";
|
||||
|
||||
my $no_asm="::::::::::";
|
||||
|
||||
my $ia64_asm=$no_asm;
|
||||
my $s390x_asm=$no_asm;
|
||||
|
||||
# As for $BSDthreads. Idea is to maintain "collective" set of flags,
|
||||
# which would cover all BSD flavors. -pthread applies to them all,
|
||||
# but is treated differently. OpenBSD expands is as -D_POSIX_THREAD
|
||||
@@ -202,25 +203,25 @@ my %table=(
|
||||
|
||||
#### SPARC Solaris with GNU C setups
|
||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc
|
||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
####
|
||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -mcpu=ultrasparc -pedantic -ansi -Wall -Wshadow -Wno-long-long -D__EXTENSIONS__ -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -mcpu=ultrasparc -pedantic -ansi -Wall -Wshadow -Wno-long-long -D__EXTENSIONS__ -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SPARC Solaris with Sun C setups
|
||||
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
|
||||
# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
|
||||
# SC5.0 note: Compiler common patch 107357-01 or later is required!
|
||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
|
||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
|
||||
####
|
||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8.o::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR::sparcv8plus.o::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SunOS configs, assuming sparc for the gcc one.
|
||||
#"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:${no_asm}::",
|
||||
@@ -233,11 +234,11 @@ my %table=(
|
||||
#### IRIX 6.x configs
|
||||
# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
|
||||
# './Configure irix-cc -o32' manually.
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${no_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${no_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# N64 ABI builds.
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${no_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${no_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### Unified HP-UX ANSI C configs.
|
||||
# Special notes:
|
||||
@@ -270,8 +271,8 @@ my %table=(
|
||||
# Since there is mention of this in shlib/hpux10-cc.sh
|
||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1::pa-risc2.o::::::::::dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
@@ -279,8 +280,8 @@ my %table=(
|
||||
# Kevin Steves <ks@hp.se>
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc1_0-cc","cc:+DAportable +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2.o::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HP/UX IA-64 targets
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O2 +Olit=all -z -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD32 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -317,14 +318,14 @@ my %table=(
|
||||
# *-generic* is endian-neutral target, but ./config is free to
|
||||
# throw in -D[BL]_ENDIAN, whichever appropriate...
|
||||
"linux-generic32","gcc:-DTERMIO -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)",
|
||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### IA-32 targets...
|
||||
"linux-ia32-icc", "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
####
|
||||
"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -333,12 +334,12 @@ my %table=(
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
# assisted with debugging of following two configs.
|
||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
|
||||
# -Wa,-Av8plus should do the trick no matter what.
|
||||
"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# GCC 3.1 is a requirement
|
||||
"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### Alpha Linux with GNU C and Compaq C setups
|
||||
# Special notes:
|
||||
# - linux-alpha+bwx-gcc is ment to be used from ./config only. If you
|
||||
@@ -362,13 +363,13 @@ my %table=(
|
||||
"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)",
|
||||
"BSD-x86-elf", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-BSD-x86-elf", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall -g::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-sparcv8", "gcc:-DB_ENDIAN -DTERMIOS -O3 -mv8 -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-sparcv8", "gcc:-DB_ENDIAN -DTERMIOS -O3 -mv8 -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-generic64","gcc:-DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
|
||||
# simply *happens* to work around a compiler bug in gcc 3.3.3,
|
||||
# triggered by RIPEMD160 code.
|
||||
"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
@@ -406,12 +407,12 @@ my %table=(
|
||||
|
||||
#### IBM's AIX.
|
||||
"aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
||||
"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
|
||||
"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:${no_asm}:dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${no_asm}:dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
|
||||
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
|
||||
# at build time. $OBJECT_MODE is respected at ./config stage!
|
||||
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${no_asm}:dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${no_asm}:dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||
|
||||
#
|
||||
# Cray T90 and similar (SDSC)
|
||||
@@ -503,9 +504,9 @@ my %table=(
|
||||
|
||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
|
||||
"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
@@ -905,9 +906,39 @@ print "Configuring for $target\n";
|
||||
|
||||
&usage if (!defined($table{$target}));
|
||||
|
||||
if ($fips && ($disabled{"shared"} eq "default"))
|
||||
my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
my $cc = $fields[$idx_cc];
|
||||
my $cflags = $fields[$idx_cflags];
|
||||
my $unistd = $fields[$idx_unistd];
|
||||
my $thread_cflag = $fields[$idx_thread_cflag];
|
||||
my $sys_id = $fields[$idx_sys_id];
|
||||
my $lflags = $fields[$idx_lflags];
|
||||
my $bn_ops = $fields[$idx_bn_ops];
|
||||
my $cpuid_obj = $fields[$idx_cpuid_obj];
|
||||
my $bn_obj = $fields[$idx_bn_obj];
|
||||
my $des_obj = $fields[$idx_des_obj];
|
||||
my $aes_obj = $fields[$idx_aes_obj];
|
||||
my $bf_obj = $fields[$idx_bf_obj];
|
||||
my $md5_obj = $fields[$idx_md5_obj];
|
||||
my $sha1_obj = $fields[$idx_sha1_obj];
|
||||
my $cast_obj = $fields[$idx_cast_obj];
|
||||
my $rc4_obj = $fields[$idx_rc4_obj];
|
||||
my $rmd160_obj = $fields[$idx_rmd160_obj];
|
||||
my $rc5_obj = $fields[$idx_rc5_obj];
|
||||
my $dso_scheme = $fields[$idx_dso_scheme];
|
||||
my $shared_target = $fields[$idx_shared_target];
|
||||
my $shared_cflag = $fields[$idx_shared_cflag];
|
||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
|
||||
my $shared_extension = $fields[$idx_shared_extension];
|
||||
my $ranlib = $fields[$idx_ranlib];
|
||||
my $arflags = $fields[$idx_arflags];
|
||||
|
||||
if ($fips)
|
||||
{
|
||||
delete $disabled{"shared"};
|
||||
delete $disabled{"shared"} if ($disabled{"shared"} eq "default");
|
||||
$disabled{"asm"}="forced"
|
||||
if ($target !~ "VC\-.*" &&
|
||||
"$cpuid_obj:$bn_obj:$aes_obj:$des_obj:$sha1_obj" eq "::::");
|
||||
}
|
||||
|
||||
|
||||
@@ -1001,33 +1032,6 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/]
|
||||
|
||||
print "IsMK1MF=$IsMK1MF\n";
|
||||
|
||||
my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
my $cc = $fields[$idx_cc];
|
||||
my $cflags = $fields[$idx_cflags];
|
||||
my $unistd = $fields[$idx_unistd];
|
||||
my $thread_cflag = $fields[$idx_thread_cflag];
|
||||
my $sys_id = $fields[$idx_sys_id];
|
||||
my $lflags = $fields[$idx_lflags];
|
||||
my $bn_ops = $fields[$idx_bn_ops];
|
||||
my $cpuid_obj = $fields[$idx_cpuid_obj];
|
||||
my $bn_obj = $fields[$idx_bn_obj];
|
||||
my $des_obj = $fields[$idx_des_obj];
|
||||
my $aes_obj = $fields[$idx_aes_obj];
|
||||
my $bf_obj = $fields[$idx_bf_obj];
|
||||
my $md5_obj = $fields[$idx_md5_obj];
|
||||
my $sha1_obj = $fields[$idx_sha1_obj];
|
||||
my $cast_obj = $fields[$idx_cast_obj];
|
||||
my $rc4_obj = $fields[$idx_rc4_obj];
|
||||
my $rmd160_obj = $fields[$idx_rmd160_obj];
|
||||
my $rc5_obj = $fields[$idx_rc5_obj];
|
||||
my $dso_scheme = $fields[$idx_dso_scheme];
|
||||
my $shared_target = $fields[$idx_shared_target];
|
||||
my $shared_cflag = $fields[$idx_shared_cflag];
|
||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
|
||||
my $shared_extension = $fields[$idx_shared_extension];
|
||||
my $ranlib = $fields[$idx_ranlib];
|
||||
my $arflags = $fields[$idx_arflags];
|
||||
|
||||
# '%' in $lflags is used to split flags to "pre-" and post-flags
|
||||
my ($prelflags,$postlflags)=split('%',$lflags);
|
||||
if (defined($postlflags)) { $lflags=$postlflags; }
|
||||
@@ -1161,6 +1165,8 @@ if ($no_asm)
|
||||
{
|
||||
$cpuid_obj=$bn_obj=$des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj="";
|
||||
$sha1_obj=$md5_obj=$rmd160_obj="";
|
||||
$cflags=~s/\-D[BL]_ENDIAN// if ($fips);
|
||||
$thread_cflags=~s/\-D[BL]_ENDIAN// if ($fips);
|
||||
}
|
||||
|
||||
if (!$no_shared)
|
||||
@@ -1215,12 +1221,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
|
||||
@@ -1228,6 +1241,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 "")
|
||||
|
||||
@@ -284,7 +284,7 @@ link_o.alpha-osf1:
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version $$SHLIB_HIST"; \
|
||||
fi; \
|
||||
@@ -305,7 +305,7 @@ link_a.alpha-osf1:
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version $$SHLIB_HIST"; \
|
||||
fi; \
|
||||
@@ -428,7 +428,7 @@ link_o.irix:
|
||||
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
|
||||
ALLSYMSFLAGS="$${MINUSWL}-all"; \
|
||||
NOALLSYMSFLAGS="$${MINUSWL}-none"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,-B,symbolic"; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.irix:
|
||||
@@ -442,7 +442,7 @@ link_a.irix:
|
||||
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
|
||||
ALLSYMSFLAGS="$${MINUSWL}-all"; \
|
||||
NOALLSYMSFLAGS="$${MINUSWL}-none"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,-B,symbolic"; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.irix:
|
||||
@@ -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
|
||||
|
||||
152
TABLE
152
TABLE
@@ -117,14 +117,14 @@ $sys_id =
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -145,7 +145,7 @@ $lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -171,8 +171,8 @@ $sys_id =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -684,7 +684,7 @@ $sys_id = AIX
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_CHAR
|
||||
$cpuid_obj =
|
||||
$bn_obj = aix_ppc32.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -711,7 +711,7 @@ $sys_id = AIX
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_CHAR
|
||||
$cpuid_obj =
|
||||
$bn_obj = aix_ppc32.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -765,7 +765,7 @@ $sys_id = AIX
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
|
||||
$cpuid_obj =
|
||||
$bn_obj = aix_ppc64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -792,7 +792,7 @@ $sys_id = AIX
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
|
||||
$cpuid_obj =
|
||||
$bn_obj = aix_ppc64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -981,7 +981,7 @@ $sys_id = MACOSX
|
||||
$lflags = -Wl,-search_paths_first%
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = osx_ppc32.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -1251,7 +1251,7 @@ $sys_id = MACOSX
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = osx_ppc32.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -1548,7 +1548,7 @@ $sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -1575,7 +1575,7 @@ $sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -1602,7 +1602,7 @@ $sys_id = ULTRASPARC
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8plus.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -1629,8 +1629,8 @@ $sys_id = ULTRASPARC
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8plus.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -1953,14 +1953,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -1980,14 +1980,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -2115,7 +2115,7 @@ $sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = pa-risc2.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2142,7 +2142,7 @@ $sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$bn_ops = SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1
|
||||
$cpuid_obj =
|
||||
$bn_obj = pa-risc2.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2169,14 +2169,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -2196,14 +2196,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -2223,7 +2223,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = pa-risc2W.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2250,7 +2250,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = pa-risc2W.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2351,14 +2351,14 @@ $arflags =
|
||||
|
||||
*** irix-mips3-cc
|
||||
$cc = cc
|
||||
$cflags = -n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
|
||||
$cflags = -n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W
|
||||
$unistd =
|
||||
$thread_cflag = -D_SGI_MP_SOURCE
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-mips3.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2385,7 +2385,7 @@ $sys_id =
|
||||
$lflags =
|
||||
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-mips3.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2405,14 +2405,14 @@ $arflags =
|
||||
|
||||
*** irix64-mips4-cc
|
||||
$cc = cc
|
||||
$cflags = -64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
|
||||
$cflags = -64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W
|
||||
$unistd =
|
||||
$thread_cflag = -D_SGI_MP_SOURCE
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-mips3.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2439,7 +2439,7 @@ $sys_id =
|
||||
$lflags =
|
||||
$bn_ops = RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-mips3.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2709,14 +2709,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -2736,14 +2736,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -2763,14 +2763,14 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -2790,7 +2790,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
|
||||
$cpuid_obj =
|
||||
$bn_obj = linux_ppc32.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2817,7 +2817,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
|
||||
$cpuid_obj =
|
||||
$bn_obj = linux_ppc64.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
@@ -2844,12 +2844,12 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-s390x.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj = aes_cbc.o aes-s390x.o
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-s390x.o sha256-s390x.o sha512-s390x.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
@@ -2871,8 +2871,8 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -2898,8 +2898,8 @@ $sys_id = ULTRASPARC
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8plus.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -2953,7 +2953,7 @@ $lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -3492,8 +3492,8 @@ $sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -3519,8 +3519,8 @@ $sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -3546,8 +3546,8 @@ $sys_id = ULTRASPARC
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8plus.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -3573,8 +3573,8 @@ $sys_id = ULTRASPARC
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj = sparcv8plus.o
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -3655,7 +3655,7 @@ $lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
@@ -3682,7 +3682,7 @@ $lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj = des_enc-sparc.o fcrypt_b.o
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
|
||||
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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -626,14 +626,13 @@ AES_encrypt:
|
||||
|
||||
call _x86_64_AES_encrypt_compact
|
||||
|
||||
lea 16(%rsp),%rsp
|
||||
pop $out # restore out
|
||||
mov 16(%rsp),$out # restore out
|
||||
mov 24(%rsp),%rsp
|
||||
mov $s0,0($out) # write output vector
|
||||
mov $s1,4($out)
|
||||
mov $s2,8($out)
|
||||
mov $s3,12($out)
|
||||
|
||||
mov (%rsp),%rsp
|
||||
pop %r15
|
||||
pop %r14
|
||||
pop %r13
|
||||
@@ -1217,19 +1216,18 @@ AES_decrypt:
|
||||
sub $sbox,%rbp
|
||||
and \$0x300,%rbp
|
||||
lea ($sbox,%rbp),$sbox
|
||||
shr \$3,%rbp # recall "magic" constants!
|
||||
shr \$3,%rbp # recall "magic" constants!
|
||||
add %rbp,$sbox
|
||||
|
||||
call _x86_64_AES_decrypt_compact
|
||||
|
||||
lea 16(%rsp),%rsp
|
||||
pop $out # restore out
|
||||
mov $s0,0($out)
|
||||
mov 16(%rsp),$out # restore out
|
||||
mov 24(%rsp),%rsp
|
||||
mov $s0,0($out) # write output vector
|
||||
mov $s1,4($out)
|
||||
mov $s2,8($out)
|
||||
mov $s3,12($out)
|
||||
|
||||
mov (%rsp),%rsp
|
||||
pop %r15
|
||||
pop %r14
|
||||
pop %r13
|
||||
@@ -1275,6 +1273,13 @@ $code.=<<___;
|
||||
.type AES_set_encrypt_key,\@function,3
|
||||
.align 16
|
||||
AES_set_encrypt_key:
|
||||
call _x86_64_AES_set_encrypt_key
|
||||
ret
|
||||
.size AES_set_encrypt_key,.-AES_set_encrypt_key
|
||||
|
||||
.type _x86_64_AES_set_encrypt_key,\@abi-omnipotent
|
||||
.align 16
|
||||
_x86_64_AES_set_encrypt_key:
|
||||
push %rbx
|
||||
push %rbp
|
||||
|
||||
@@ -1461,8 +1466,8 @@ $code.=<<___;
|
||||
.Lexit:
|
||||
pop %rbp
|
||||
pop %rbx
|
||||
ret
|
||||
.size AES_set_encrypt_key,.-AES_set_encrypt_key
|
||||
.byte 0xf3,0xc3 # rep ret
|
||||
.size _x86_64_AES_set_encrypt_key,.-_x86_64_AES_set_encrypt_key
|
||||
___
|
||||
|
||||
sub deckey_ref()
|
||||
@@ -1527,7 +1532,7 @@ $code.=<<___;
|
||||
.align 16
|
||||
AES_set_decrypt_key:
|
||||
push %rdx # save key schedule
|
||||
call AES_set_encrypt_key
|
||||
call _x86_64_AES_set_encrypt_key
|
||||
cmp \$0,%eax
|
||||
pop %r8 # restore key schedule
|
||||
jne .Labort
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,8 @@ my $current_function;
|
||||
if ($self->{op} =~ /(movz)b.*/) { # movz is pain...
|
||||
$self->{op} = $1;
|
||||
$self->{sz} = "b";
|
||||
} elsif ($self->{op} =~ /call/) {
|
||||
$self->{sz} = ""
|
||||
} elsif ($self->{op} =~ /([a-z]{3,})([qlwb])/) {
|
||||
$self->{op} = $1;
|
||||
$self->{sz} = $2;
|
||||
@@ -358,7 +360,7 @@ my $current_function;
|
||||
$self->{value} = $v;
|
||||
last;
|
||||
};
|
||||
/\.extern/ && do { $self->{value} = "EXTRN\t".$line; last; };
|
||||
/\.extern/ && do { $self->{value} = "EXTRN\t".$line.":BYTE"; last; };
|
||||
/\.globl/ && do { $self->{value} = "PUBLIC\t".$line; last; };
|
||||
/\.type/ && do { ($sym,$type,$narg) = split(',',$line);
|
||||
if ($type eq "\@function") {
|
||||
@@ -394,8 +396,15 @@ my $current_function;
|
||||
last;
|
||||
};
|
||||
/\.asciz/ && do { if ($line =~ /^"(.*)"$/) {
|
||||
$self->{value} = "DB\t"
|
||||
.join(",",unpack("C*",$1),0);
|
||||
my @str=unpack("C*",$1);
|
||||
push @str,0;
|
||||
while ($#str>15) {
|
||||
$self->{value}.="DB\t"
|
||||
.join(",",@str[0..15])."\n";
|
||||
foreach (0..15) { shift @str; }
|
||||
}
|
||||
$self->{value}.="DB\t"
|
||||
.join(",",@str) if (@str);
|
||||
}
|
||||
last;
|
||||
};
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opensslconf.h"
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -41,7 +41,13 @@
|
||||
# apparently are not atomic instructions, but implemented in microcode.
|
||||
|
||||
$output=shift;
|
||||
open STDOUT,"| $^X ../perlasm/x86_64-xlate.pl $output";
|
||||
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or
|
||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||
die "can't locate x86_64-xlate.pl";
|
||||
|
||||
open STDOUT,"| $^X $xlate $output";
|
||||
|
||||
if ($output =~ /512/) {
|
||||
$func="sha512_block_data_order";
|
||||
|
||||
@@ -371,6 +371,9 @@ static const SHA_LONG64 K512[80] = {
|
||||
}
|
||||
# endif
|
||||
# define PULL64(x) __pull64be(&(x))
|
||||
# if _MSC_VER<=1200
|
||||
# pragma inline_depth(0)
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -136,11 +136,11 @@ OPENSSL_ia32_cpuid:
|
||||
cpuid
|
||||
cmp \$0,%r9d
|
||||
jne .Lnotintel
|
||||
or \$1<<20,%edx # use reserved bit to engage RC4_CHAR
|
||||
or \$0x00100000,%edx # use reserved 20th bit to engage RC4_CHAR
|
||||
and \$15,%ah
|
||||
cmp \$15,%ah # examine Family ID
|
||||
je .Lnotintel
|
||||
or \$1<<30,%edx # use reserved bit to skip unrolled loop
|
||||
or \$0x40000000,%edx # use reserved 30th bit to skip unrolled loop
|
||||
.Lnotintel:
|
||||
bt \$28,%edx # test hyper-threading bit
|
||||
jnc .Ldone
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ static int generate_key(DH *dh)
|
||||
if (FIPS_mode() && (BN_num_bits(dh->p) < OPENSSL_DH_FIPS_MIN_MODULUS_BITS))
|
||||
{
|
||||
DHerr(DH_F_GENERATE_KEY, DH_R_KEY_SIZE_TOO_SMALL);
|
||||
goto err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ctx = BN_CTX_new();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -95,46 +95,52 @@ int main(int argc, char *argv[])
|
||||
|
||||
static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb);
|
||||
|
||||
/* seed, out_p, out_q, out_g are taken from the updated Appendix 5 to
|
||||
* FIPS PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */
|
||||
static unsigned char seed[20]={
|
||||
0xd5,0x01,0x4e,0x4b,0x60,0xef,0x2b,0xa8,0xb6,0x21,0x1b,0x40,
|
||||
0x62,0xba,0x32,0x24,0xe0,0x42,0x7d,0xd3,
|
||||
/* seed, out_p, out_q, out_g are taken from the earlier validation test
|
||||
* vectors.
|
||||
*/
|
||||
|
||||
static unsigned char seed[20] = {
|
||||
0x1c, 0xfb, 0xa9, 0x6c, 0xf7, 0x95, 0xb3, 0x2e, 0x01, 0x01, 0x3c, 0x8d,
|
||||
0x7f, 0x6e, 0xf4, 0x59, 0xcc, 0x2f, 0x19, 0x59
|
||||
};
|
||||
|
||||
static unsigned char out_p[] = {
|
||||
0xc2, 0x3c, 0x48, 0x31, 0x7e, 0x3b, 0x4e, 0x5d, 0x3c, 0x93, 0x78, 0x60,
|
||||
0x5c, 0xf2, 0x60, 0xbb, 0x5a, 0xfa, 0x7f, 0x17, 0xf9, 0x26, 0x69, 0x46,
|
||||
0xe7, 0x07, 0xbb, 0x3b, 0x2e, 0xc4, 0xb5, 0x66, 0xf7, 0x4d, 0xae, 0x9b,
|
||||
0x8f, 0xf0, 0x42, 0xea, 0xb3, 0xa0, 0x7e, 0x81, 0x85, 0x89, 0xe6, 0xb0,
|
||||
0x29, 0x03, 0x6b, 0xcc, 0xfb, 0x8e, 0x46, 0x15, 0x4d, 0xc1, 0x69, 0xd8,
|
||||
0x2f, 0xef, 0x5c, 0x8b, 0x29, 0x32, 0x41, 0xbd, 0x13, 0x72, 0x3d, 0xac,
|
||||
0x81, 0xcc, 0x86, 0x6c, 0x06, 0x5d, 0x51, 0xa1, 0xa5, 0x07, 0x0c, 0x3e,
|
||||
0xbe, 0xdd, 0xf4, 0x6e, 0xa8, 0xed, 0xb4, 0x2f, 0xbd, 0x3e, 0x64, 0xea,
|
||||
0xee, 0x92, 0xec, 0x51, 0xe1, 0x0d, 0xab, 0x25, 0x45, 0xae, 0x55, 0x21,
|
||||
0x4d, 0xd6, 0x96, 0x6f, 0xe6, 0xaa, 0xd3, 0xca, 0x87, 0x92, 0xb1, 0x1c,
|
||||
0x3c, 0xaf, 0x29, 0x09, 0x8b, 0xc6, 0xed, 0xe1
|
||||
};
|
||||
|
||||
static unsigned char out_p[]={
|
||||
0x8d,0xf2,0xa4,0x94,0x49,0x22,0x76,0xaa,
|
||||
0x3d,0x25,0x75,0x9b,0xb0,0x68,0x69,0xcb,
|
||||
0xea,0xc0,0xd8,0x3a,0xfb,0x8d,0x0c,0xf7,
|
||||
0xcb,0xb8,0x32,0x4f,0x0d,0x78,0x82,0xe5,
|
||||
0xd0,0x76,0x2f,0xc5,0xb7,0x21,0x0e,0xaf,
|
||||
0xc2,0xe9,0xad,0xac,0x32,0xab,0x7a,0xac,
|
||||
0x49,0x69,0x3d,0xfb,0xf8,0x37,0x24,0xc2,
|
||||
0xec,0x07,0x36,0xee,0x31,0xc8,0x02,0x91,
|
||||
static unsigned char out_q[] = {
|
||||
0xae, 0x0a, 0x8c, 0xfb, 0x80, 0xe1, 0xc6, 0xd1, 0x09, 0x0f, 0x26, 0xde,
|
||||
0x91, 0x53, 0xc2, 0x8b, 0x2b, 0x0f, 0xde, 0x7f
|
||||
};
|
||||
|
||||
static unsigned char out_q[]={
|
||||
0xc7,0x73,0x21,0x8c,0x73,0x7e,0xc8,0xee,
|
||||
0x99,0x3b,0x4f,0x2d,0xed,0x30,0xf4,0x8e,
|
||||
0xda,0xce,0x91,0x5f,
|
||||
static unsigned char out_g[] = {
|
||||
0x0d, 0x7d, 0x92, 0x74, 0x10, 0xf6, 0xa4, 0x43, 0x86, 0x9a, 0xd1, 0xd9,
|
||||
0x56, 0x00, 0xbc, 0x18, 0x97, 0x99, 0x4e, 0x9a, 0x93, 0xfb, 0x00, 0x3d,
|
||||
0x6c, 0xa0, 0x1b, 0x95, 0x6b, 0xbd, 0xf7, 0x7a, 0xbc, 0x36, 0x3f, 0x3d,
|
||||
0xb9, 0xbf, 0xf9, 0x91, 0x37, 0x68, 0xd1, 0xb9, 0x1e, 0xfe, 0x7f, 0x10,
|
||||
0xc0, 0x6a, 0xcd, 0x5f, 0xc1, 0x65, 0x1a, 0xb8, 0xe7, 0xab, 0xb5, 0xc6,
|
||||
0x8d, 0xb7, 0x86, 0xad, 0x3a, 0xbf, 0x6b, 0x7b, 0x0a, 0x66, 0xbe, 0xd5,
|
||||
0x58, 0x23, 0x16, 0x48, 0x83, 0x29, 0xb6, 0xa7, 0x64, 0xc7, 0x08, 0xbe,
|
||||
0x55, 0x4c, 0x6f, 0xcb, 0x34, 0xc1, 0x73, 0xb0, 0x39, 0x68, 0x52, 0xdf,
|
||||
0x27, 0x7f, 0x32, 0xbc, 0x2b, 0x0d, 0x63, 0xed, 0x75, 0x3e, 0xb5, 0x54,
|
||||
0xac, 0xc8, 0x20, 0x2a, 0x73, 0xe8, 0x29, 0x51, 0x03, 0x77, 0xe8, 0xc9,
|
||||
0x61, 0x32, 0x25, 0xaf, 0x21, 0x5b, 0x6e, 0xda
|
||||
};
|
||||
|
||||
static unsigned char out_g[]={
|
||||
0x62,0x6d,0x02,0x78,0x39,0xea,0x0a,0x13,
|
||||
0x41,0x31,0x63,0xa5,0x5b,0x4c,0xb5,0x00,
|
||||
0x29,0x9d,0x55,0x22,0x95,0x6c,0xef,0xcb,
|
||||
0x3b,0xff,0x10,0xf3,0x99,0xce,0x2c,0x2e,
|
||||
0x71,0xcb,0x9d,0xe5,0xfa,0x24,0xba,0xbf,
|
||||
0x58,0xe5,0xb7,0x95,0x21,0x92,0x5c,0x9c,
|
||||
0xc4,0x2e,0x9f,0x6f,0x46,0x4b,0x08,0x8c,
|
||||
0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02,
|
||||
};
|
||||
|
||||
static const unsigned char str1[]="12345678901234567890";
|
||||
|
||||
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
|
||||
static const unsigned char rnd_key1[]="12345678";
|
||||
static const unsigned char rnd_key2[]="abcdefgh";
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@@ -154,21 +160,11 @@ int main(int argc, char **argv)
|
||||
do_print_errors();
|
||||
EXIT(1);
|
||||
}
|
||||
#if 0
|
||||
CRYPTO_malloc_debug_init();
|
||||
CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
|
||||
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
FIPS_rand_set_key(rnd_key1,rnd_key2);
|
||||
RAND_seed(rnd_seed, sizeof rnd_seed);
|
||||
#endif
|
||||
|
||||
fprintf(stderr,"test generation of DSA parameters\n");
|
||||
|
||||
dsa = FIPS_dsa_new();
|
||||
DSA_generate_parameters_ex(dsa, 512,seed,20,&counter,&h,&cb);
|
||||
DSA_generate_parameters_ex(dsa, 1024,seed,20,&counter,&h,&cb);
|
||||
|
||||
fprintf(stderr,"seed\n");
|
||||
for (i=0; i<20; i+=4)
|
||||
@@ -177,10 +173,9 @@ int main(int argc, char **argv)
|
||||
seed[i],seed[i+1],seed[i+2],seed[i+3]);
|
||||
}
|
||||
fprintf(stderr,"\ncounter=%d h=%ld\n",counter,h);
|
||||
|
||||
|
||||
if (dsa == NULL) goto end;
|
||||
/*DSA_print(bio_err,dsa,0);*/
|
||||
if (counter != 105)
|
||||
if (counter != 16)
|
||||
{
|
||||
fprintf(stderr,"counter should be 105\n");
|
||||
goto end;
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -209,7 +209,11 @@ int FIPS_check_incore_fingerprint(void)
|
||||
{
|
||||
unsigned char sig[EVP_MAX_MD_SIZE];
|
||||
unsigned int len;
|
||||
#if defined(__sgi) && (defined(__mips) || defined(mips))
|
||||
extern int __dso_displacement[];
|
||||
#else
|
||||
extern int OPENSSL_NONPIC_relocated;
|
||||
#endif
|
||||
|
||||
if (FIPS_text_start()==NULL)
|
||||
{
|
||||
@@ -224,7 +228,11 @@ int FIPS_check_incore_fingerprint(void)
|
||||
{
|
||||
if (FIPS_signature>=FIPS_rodata_start && FIPS_signature<FIPS_rodata_end)
|
||||
FIPSerr(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT,FIPS_R_FINGERPRINT_DOES_NOT_MATCH_SEGMENT_ALIASING);
|
||||
#if defined(__sgi) && (defined(__mips) || defined(mips))
|
||||
else if (__dso_displacement!=NULL)
|
||||
#else
|
||||
else if (OPENSSL_NONPIC_relocated)
|
||||
#endif
|
||||
FIPSerr(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT,FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED);
|
||||
else
|
||||
FIPSerr(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT,FIPS_R_FINGERPRINT_DOES_NOT_MATCH);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
78
fips/fipsld
78
fips/fipsld
@@ -38,7 +38,7 @@ TARGET=`(while [ "x$1" != "x" -a "x$1" != "x-o" ]; do shift; done; echo $2)`
|
||||
case `basename "${TARGET}"` in
|
||||
libcrypto*|libfips*|*.dll) ;;
|
||||
*) case "$*" in
|
||||
*libcrypto.a*|*-lcrypto*) ;;
|
||||
*libcrypto.a*|*-lcrypto*|*fipscanister.o*) ;;
|
||||
*) exec ${CC} "$@" ;;
|
||||
esac
|
||||
esac
|
||||
@@ -52,13 +52,18 @@ esac
|
||||
|
||||
THERE="`echo $0 | sed -e 's|[^/]*$||'`"..
|
||||
|
||||
# If set, FIPSLIBDIR is location of installed validated FIPS module
|
||||
if [ -n "${FIPSLIBDIR}" ]; then
|
||||
CANISTER_O="${FIPSLIBDIR}/fipscanister.o"
|
||||
elif [ -f "${THERE}/fips/fipscanister.o" ]; then
|
||||
CANISTER_O="${THERE}/fips/fipscanister.o"
|
||||
elif [ -f "${THERE}/lib/fipscanister.o" ]; then
|
||||
CANISTER_O="${THERE}/lib/fipscanister.o"
|
||||
# fipscanister.o can appear in command line
|
||||
CANISTER_O=`(while [ "x$1" != "x" ]; do case "$1" in *fipscanister.o) echo $1; exit;; esac; shift; done)`
|
||||
if [ -z "${CANISTER_O}" ]; then
|
||||
# If set, FIPSLIBDIR is location of installed validated FIPS module
|
||||
if [ -n "${FIPSLIBDIR}" ]; then
|
||||
CANISTER_O="${FIPSLIBDIR}/fipscanister.o"
|
||||
elif [ -f "${THERE}/fips/fipscanister.o" ]; then
|
||||
CANISTER_O="${THERE}/fips/fipscanister.o"
|
||||
elif [ -f "${THERE}/lib/fipscanister.o" ]; then
|
||||
CANISTER_O="${THERE}/lib/fipscanister.o"
|
||||
fi
|
||||
CANISTER_O_CMD="${CANISTER_O}"
|
||||
fi
|
||||
[ -f ${CANISTER_O} ] || { echo "unable to find ${CANISTER_O}"; exit 1; }
|
||||
|
||||
@@ -80,38 +85,7 @@ case "${TARGET}" in
|
||||
esac
|
||||
|
||||
case `basename "${TARGET}"` in
|
||||
libfips*|*fips.dll)
|
||||
# libfips.so creation can be taking place in the source
|
||||
# directory only!!!
|
||||
FINGERTYPE="${THERE}/fips/fips_standalone_sha1"
|
||||
# fipscanister.o should be specified on command line...
|
||||
CANISTER_O=`(while [ "x$1" != "x" ]; do case "$1" in *fipscanister.o) echo $1; exit;; esac; shift; done)`
|
||||
[ -n "$CANISTER_O" ] || { echo "fipscanister.o is not found"; exit 1; }
|
||||
PREMAIN_C=`dirname "${CANISTER_O}"`/fips_premain.c
|
||||
|
||||
# verify fipspremain.c against its detached signature...
|
||||
${FINGERTYPE} "${PREMAIN_C}" | sed "s/(.*\//(/" | \
|
||||
diff -w "${PREMAIN_C}.sha1" - || \
|
||||
{ echo "${PREMAIN_C} fingerprint mismatch"; exit 1; }
|
||||
# verify fipscanister.o against its detached signature...
|
||||
${FINGERTYPE} "${CANISTER_O}" | sed "s/(.*\//(/" | \
|
||||
diff -w "${CANISTER_O}.sha1" - || \
|
||||
{ echo "${CANISTER_O} fingerprint mismatch"; exit 1; }
|
||||
|
||||
/bin/rm -f "${TARGET}"
|
||||
${CC} "${PREMAIN_C}" ${_WL_PREMAIN} "$@"
|
||||
|
||||
# generate signature...
|
||||
SIG=`"${THERE}/fips/fips_premain_dso" "${TARGET}"`
|
||||
/bin/rm -f "${TARGET}"
|
||||
if [ -z "${SIG}" ]; then
|
||||
echo "unable to collect signature"; exit 1
|
||||
fi
|
||||
|
||||
# recompile with signature...
|
||||
${CC} -DHMAC_SHA1_SIG=\"${SIG}\" "${PREMAIN_C}" ${_WL_PREMAIN} "$@"
|
||||
;;
|
||||
libcrypto*|*.dll) # must be linking a shared lib...
|
||||
lib*|*.dll) # must be linking a shared lib...
|
||||
# Shared lib creation can be taking place in the source
|
||||
# directory only, but fipscanister.o can reside elsewhere...
|
||||
FINGERTYPE="${THERE}/fips/fips_standalone_sha1"
|
||||
@@ -127,16 +101,18 @@ libcrypto*|*.dll) # must be linking a shared lib...
|
||||
|
||||
# Temporarily remove fipscanister.o from libcrypto.a!
|
||||
# We are required to use the standalone copy...
|
||||
trap 'ar r "${THERE}/libcrypto.a" "${CANISTER_O}";
|
||||
(ranlib "${THERE}/libcrypto.a") 2>/dev/null;
|
||||
sleep 1;
|
||||
touch -c "${TARGET}"' 0
|
||||
|
||||
ar d "${THERE}/libcrypto.a" fipscanister.o 2>&1 > /dev/null || :
|
||||
(ranlib "${THERE}/libcrypto.a") 2>/dev/null || :
|
||||
if [ -f "${THERE}/libcrypto.a" ]; then
|
||||
if ar d "${THERE}/libcrypto.a" fipscanister.o; then
|
||||
(ranlib "${THERE}/libcrypto.a") 2>/dev/null || :
|
||||
trap 'ar r "${THERE}/libcrypto.a" "${CANISTER_O}";
|
||||
(ranlib "${THERE}/libcrypto.a") 2>/dev/null || :;
|
||||
sleep 1;
|
||||
touch -c "${TARGET}"' 0
|
||||
fi
|
||||
fi
|
||||
|
||||
/bin/rm -f "${TARGET}"
|
||||
${CC} "${CANISTER_O}" \
|
||||
${CC} ${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
|
||||
"${PREMAIN_C}" \
|
||||
${_WL_PREMAIN} "$@"
|
||||
|
||||
@@ -148,7 +124,7 @@ libcrypto*|*.dll) # must be linking a shared lib...
|
||||
fi
|
||||
|
||||
# recompile with signature...
|
||||
${CC} "${CANISTER_O}" \
|
||||
${CC} ${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
|
||||
-DHMAC_SHA1_SIG=\"${SIG}\" "${PREMAIN_C}" \
|
||||
${_WL_PREMAIN} "$@"
|
||||
;;
|
||||
@@ -175,7 +151,7 @@ libcrypto*|*.dll) # must be linking a shared lib...
|
||||
{ echo "${PREMAIN_C} fingerprint mismatch"; exit 1; }
|
||||
|
||||
/bin/rm -f "${TARGET}"
|
||||
${CC} "${CANISTER_O}" \
|
||||
${CC} ${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
|
||||
"${PREMAIN_C}" \
|
||||
${_WL_PREMAIN} "$@"
|
||||
|
||||
@@ -187,7 +163,7 @@ libcrypto*|*.dll) # must be linking a shared lib...
|
||||
fi
|
||||
|
||||
# recompile with signature...
|
||||
${CC} "${CANISTER_O}" \
|
||||
${CC} ${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
|
||||
-DHMAC_SHA1_SIG=\"${SIG}\" "${PREMAIN_C}" \
|
||||
${_WL_PREMAIN} "$@"
|
||||
;;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
@echo off
|
||||
|
||||
SET ASMOPTS=-DOPENSSL_IA32_SSE2
|
||||
SET ASM=no-asm
|
||||
SET ASM=%1
|
||||
|
||||
if NOT X%PROCESSOR_ARCHITECTURE% == X goto defined
|
||||
|
||||
@@ -25,38 +23,10 @@ echo Auto Configuring for X86
|
||||
|
||||
SET TARGET=VC-WIN32
|
||||
|
||||
if NOT x%1% == xno-asm SET ASM=nasm
|
||||
|
||||
goto compile
|
||||
|
||||
:IA64
|
||||
|
||||
echo Auto Configuring for IA64
|
||||
SET TARGET=VC-WIN64I
|
||||
perl ms\uplink.pl win64i > ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
ias -o ms\uptable.obj ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
|
||||
goto compile
|
||||
|
||||
:AMD64
|
||||
|
||||
echo Auto Configuring for AMD64
|
||||
SET TARGET=VC-WIN64A
|
||||
perl ms\uplink.pl win64a > ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
ml64 -c -Foms\uptable.obj ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
|
||||
|
||||
:compile
|
||||
|
||||
perl Configure %TARGET% fipscanisterbuild
|
||||
pause
|
||||
|
||||
if %ASM% == no-asm goto skipasm
|
||||
if x%ASM% == xno-asm goto compile
|
||||
echo Generating x86 for NASM assember
|
||||
SET ASM=nasm
|
||||
SET ASMOPTS=-DOPENSSL_IA32_SSE2
|
||||
|
||||
echo Bignum
|
||||
cd crypto\bn\asm
|
||||
@@ -138,7 +108,64 @@ perl x86cpuid.pl win32n %ASMOPTS% > cpu_win32.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
cd ..
|
||||
|
||||
:skipasm
|
||||
goto compile
|
||||
|
||||
:IA64
|
||||
|
||||
echo Auto Configuring for IA64
|
||||
SET TARGET=VC-WIN64I
|
||||
perl ms\uplink.pl win64i > ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
ias -o ms\uptable.obj ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
|
||||
goto compile
|
||||
|
||||
:AMD64
|
||||
|
||||
echo Auto Configuring for AMD64
|
||||
SET TARGET=VC-WIN64A
|
||||
perl ms\uplink.pl win64a > ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
ml64 -c -Foms\uptable.obj ms\uptable.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
|
||||
if x%ASM% == xno-asm goto compile
|
||||
echo Generating x86_64 for ML64 assember
|
||||
SET ASM=ml64
|
||||
|
||||
echo Bignum
|
||||
cd crypto\bn\asm
|
||||
perl x86_64-mont.pl x86_64-mont.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
cd ..\..\..
|
||||
|
||||
echo AES
|
||||
cd crypto\aes\asm
|
||||
perl aes-x86_64.pl aes-x86_64.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
cd ..\..\..
|
||||
|
||||
echo SHA
|
||||
cd crypto\sha\asm
|
||||
perl sha1-x86_64.pl sha1-x86_64.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
perl sha512-x86_64.pl sha256-x86_64.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
perl sha512-x86_64.pl sha512-x86_64.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
cd ..\..\..
|
||||
|
||||
echo CPU-ID
|
||||
cd crypto
|
||||
perl x86_64cpuid.pl cpuid-x86_64.asm
|
||||
if ERRORLEVEL 1 goto error
|
||||
cd ..
|
||||
|
||||
:compile
|
||||
|
||||
perl Configure %TARGET% fipscanisterbuild
|
||||
pause
|
||||
|
||||
echo on
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ $suffix=(@ARGV[0]=~/^\$/) ? shift(@ARGV) : "\$m";
|
||||
#################################################################
|
||||
# rename segments in COFF modules according to %map table below #
|
||||
%map=( ".text" => "fipstx$suffix", #
|
||||
".text\$"=> "fipstx$suffix", #
|
||||
".rdata"=> "fipsrd$suffix", #
|
||||
".data" => "fipsda$suffix" ); #
|
||||
#################################################################
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ int main(int argc, char *argv[])
|
||||
long bytes=256L;
|
||||
#ifndef OPENSSL_NO_DH
|
||||
DH *dh;
|
||||
int dhe1024 = 0, dhe1024dsa = 0;
|
||||
int dhe1024 = 1, dhe1024dsa = 0;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
EC_KEY *ecdh = NULL;
|
||||
|
||||
@@ -7,7 +7,7 @@ RANDFILE = ./.rnd
|
||||
|
||||
####################################################################
|
||||
[ req ]
|
||||
default_bits = 512
|
||||
default_bits = 1024
|
||||
default_keyfile = keySS.pem
|
||||
distinguished_name = req_distinguished_name
|
||||
encrypt_rsa_key = no
|
||||
|
||||
@@ -280,10 +280,8 @@ test_dh:
|
||||
test_dsa:
|
||||
@echo "Generate a set of DSA parameters"
|
||||
../util/shlib_wrap.sh ./$(DSATEST)
|
||||
../util/shlib_wrap.sh ./$(DSATEST) -app2_1
|
||||
if [ -n "$(FIPSCANLIB)" ]; then \
|
||||
../util/shlib_wrap.sh ./$(FIPS_DSATEST); \
|
||||
../util/shlib_wrap.sh ./$(FIPS_DSATEST) -app2_1; \
|
||||
fi
|
||||
|
||||
test_gen:
|
||||
@@ -394,11 +392,12 @@ $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
|
||||
FIPS_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
fi; \
|
||||
LIBRARIES="$(LIBCRYPTO) $(LIBKRB5)"; \
|
||||
if [ -z "$(SHARED_LIBS)" ] ; then \
|
||||
if [ "$(FIPSCANLIB)" = "libfips" ]; then \
|
||||
LIBRARIES="-L$(TOP) -lfips"; \
|
||||
else \
|
||||
FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
|
||||
LIBRARIES="$${FIPSLIBDIR:-$(TOP)/fips/}fipscanister.o"; \
|
||||
fi; \
|
||||
[ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="-L$(TOP) -lfips"; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||
CC=$${CC} APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
|
||||
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
|
||||
|
||||
@@ -7,7 +7,7 @@ RANDFILE = ./.rnd
|
||||
|
||||
####################################################################
|
||||
[ req ]
|
||||
default_bits = 512
|
||||
default_bits = 1024
|
||||
default_keyfile = keySS.pem
|
||||
distinguished_name = req_distinguished_name
|
||||
encrypt_rsa_key = no
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1277,6 +1277,7 @@ sub read_options
|
||||
"no-hmac" => \$no_hmac,
|
||||
"no-asm" => \$no_asm,
|
||||
"nasm" => \$nasm,
|
||||
"ml64" => \$ml64,
|
||||
"nw-nasm" => \$nw_nasm,
|
||||
"nw-mwasm" => \$nw_mwasm,
|
||||
"gaswin" => \$gaswin,
|
||||
|
||||
@@ -172,6 +172,10 @@ $app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
|
||||
if ($nasm) {
|
||||
$asm='nasmw -f win32';
|
||||
$afile='-o ';
|
||||
} elsif ($ml64) {
|
||||
$asm='ml64 /c /Cp /Cx';
|
||||
$asm.=' /Zi' if $debug;
|
||||
$afile='/Fo';
|
||||
} else {
|
||||
$asm='ml /Cp /coff /c /Cx';
|
||||
$asm.=" /Zi" if $debug;
|
||||
@@ -187,6 +191,8 @@ $bf_enc_obj='';
|
||||
$bf_enc_src='';
|
||||
|
||||
if (!$no_asm)
|
||||
{
|
||||
if ($FLAVOR =~ "WIN32")
|
||||
{
|
||||
$aes_asm_obj='crypto\aes\asm\a_win32.obj';
|
||||
$aes_asm_src='crypto\aes\asm\a_win32.asm';
|
||||
@@ -214,6 +220,19 @@ if (!$no_asm)
|
||||
$cpuid_asm_src='crypto\cpu_win32.asm';
|
||||
$cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
|
||||
}
|
||||
elsif ($FLAVOR =~ "WIN64A")
|
||||
{
|
||||
$aes_asm_obj='$(OBJ_D)\aes-x86_64.obj';
|
||||
$aes_asm_src='crypto\aes\asm\aes-x86_64.asm';
|
||||
$bn_asm_obj='$(OBJ_D)\x86_64-mont.obj $(OBJ_D)\bn_asm.obj';
|
||||
$bn_asm_src='crypto\bn\asm\x86_64-mont.asm';
|
||||
$sha1_asm_obj='$(OBJ_D)\sha1-x86_64.obj $(OBJ_D)\sha256-x86_64.obj $(OBJ_D)\sha512-x86_64.obj';
|
||||
$sha1_asm_src='crypto\sha\asm\sha1-x86_64.asm crypto\sha\asm\sha256-x86_64.asm crypto\sha\asm\sha512-x86_64.asm';
|
||||
$cpuid_asm_obj='$(OBJ_D)\cpuid-x86_64.obj';
|
||||
$cpuid_asm_src='crypto\cpuid-x86_64.asm';
|
||||
$cflags.=" -DOPENSSL_CPUID_OBJ -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM";
|
||||
}
|
||||
}
|
||||
|
||||
if ($shlib && $FLAVOR !~ /CE/)
|
||||
{
|
||||
|
||||
@@ -27,18 +27,34 @@ SunOS|IRIX*)
|
||||
LD_PRELOAD_64="$LIBCRYPTOSO $LIBSSLSO"; export LD_PRELOAD_64
|
||||
preload_var=LD_PRELOAD_64
|
||||
;;
|
||||
# Why are newly built .so's preloaded anyway? Because run-time
|
||||
# .so lookup path embedded into application takes precedence
|
||||
# over LD_LIBRARY_PATH and as result application ends up linking
|
||||
# to previously installed .so's. On IRIX instead of preloading
|
||||
# newly built .so's we trick run-time linker to fail to find
|
||||
# the installed .so by setting _RLD_ROOT variable.
|
||||
*ELF\ 32*MIPS*)
|
||||
#_RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD_LIST
|
||||
_RLD_ROOT=/no/such/dir; export _RLD_ROOT
|
||||
eval $rld_var=\"/usr/lib'${'$rld_var':+:$'$rld_var'}'\"
|
||||
preload_var=_RLD_LIST
|
||||
;;
|
||||
*ELF\ N32*MIPS*)
|
||||
[ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH
|
||||
_RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST
|
||||
#_RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST
|
||||
_RLDN32_ROOT=/no/such/dir; export _RLDN32_ROOT
|
||||
eval $rld_var=\"/usr/lib32'${'$rld_var':+:$'$rld_var'}'\"
|
||||
preload_var=_RLDN32_LIST
|
||||
;;
|
||||
*ELF\ 64*MIPS*)
|
||||
[ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH
|
||||
_RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST
|
||||
#_RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST
|
||||
_RLD64_ROOT=/no/such/dir; export _RLD64_ROOT
|
||||
eval $rld_var=\"/usr/lib64'${'$rld_var':+:$'$rld_var'}'\"
|
||||
preload_var=_RLD64_LIST
|
||||
;;
|
||||
esac
|
||||
eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var
|
||||
eval $rld_var=\"${THERE}'${'$rld_var':+:$'$rld_var'}'\"; export $rld_var
|
||||
unset rld_var
|
||||
;;
|
||||
*) LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH" # Linux, ELF HP-UX
|
||||
|
||||
Reference in New Issue
Block a user