提交 10fa0476 编写于 作者: B Bodo Möller

remove unused old directory crypto/rijndael (superseded by crypto/aes)

上级 04f0a6ba
#
# crypto/rijndael/Makefile
#
DIR= rijndael
TOP= ../..
CC= cc
CPP= $(CC) -E
INCLUDES=
CFLAG=-g
INSTALL_PREFIX=
OPENSSLDIR= /usr/local/ssl
INSTALLTOP=/usr/local/ssl
MAKE= make -f Makefile.ssl
MAKEDEPPROG= makedepend
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
MAKEFILE= Makefile.ssl
AR= ar r
RD_ENC= rd_enc.o
# or use
#DES_ENC= bx86-elf.o
# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=
APPS=
LIB=$(TOP)/libcrypto.a
LIBSRC=rd_fst.c
LIBOBJ=rd_fst.o
SRC= $(LIBSRC)
EXHEADER=rd_fst.h rijndael.h
top:
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
all: lib
lib: $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
@touch lib
$(LIBOBJ): $(LIBSRC)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
links:
@$(TOP)/util/point.sh Makefile.ssl Makefile
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
install: installs
installs:
@for i in $(EXHEADER) ; \
do \
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
tags:
ctags $(SRC)
tests:
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
rd_fst.o: rd_fst.c rd_fst.h
Optimised ANSI C code for the Rijndael cipher (now AES)
Authors:
Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
Paulo Barreto <paulo.barreto@terra.com.br>
All code contained in this distributed is placed in the public domain.
========================================================================
Disclaimer:
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================
Acknowledgements:
We are deeply indebted to the following people for their bug reports,
fixes, and improvement suggestions to the API implementation. Though we
tried to list all contributions, we apologise in advance for any
missing reference:
Andrew Bales <Andrew.Bales@Honeywell.com>
Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
John Skodon <skodonj@webquill.com>
========================================================================
Description:
This optimised implementation of Rijndael is noticeably faster than the
previous versions on Intel processors under Win32 w/ MSVC 6.0. On the
same processor under Linux w/ gcc-2.95.2, the key setup is also
considerably faster, but normal encryption/decryption is only marginally
faster.
To enable full loop unrolling for encryption/decryption, define the
conditional compilation directive FULL_UNROLL. This may help increase
performance or not, depending on the platform.
To compute the intermediate value tests, define the conditional
compilation directive INTERMEDIATE_VALUE_KAT. It may be worthwhile to
define the TRACE_KAT_MCT directive too, which provides useful progress
information during the generation of the KAT and MCT sets.
========================================================================
Contents:
README This file
rijndael-alg-fst.c The algorithm implementation.
rijndael-alg-fst.h The corresponding header file.
rijndael-api-fst.c NIST's implementation.
rijndael-api-fst.h The corresponding header file.
rijndael-test-fst.c A simple program to generate test vectors.
table.128 Data for the table tests and 128-bit keys.
table.192 Data for the table tests and 192-bit keys.
table.256 Data for the table tests and 256-bit keys.
fips-test-vectors.txt Key schedule and ciphertext intermediate values
(reduced set proposed for FIPS inclusion).
Makefile A sample makefile; may need some changes,
depending on the C compiler used.
N.B. Both the API implementation and the provisional reduced set of
test vectors are likely to change, according to NIST's final decision
regarding modes of operation and the FIPS contents. They are therefore
marked as "version 2.9" rather than "version 3.0".
此差异已折叠。
/**
* rijndael-alg-fst.h
*
* @version 3.0 (December 2000)
*
* Optimised ANSI C code for the Rijndael cipher (now AES)
*
* @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
* @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
* @author Paulo Barreto <paulo.barreto@terra.com.br>
*
* This code is hereby placed in the public domain.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __RIJNDAEL_ALG_FST_H
#define __RIJNDAEL_ALG_FST_H
#define MAXKC (256/32)
#define MAXKB (256/8)
#define MAXNR 14
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits);
int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits);
void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]);
void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]);
#endif /* __RIJNDAEL_ALG_FST_H */
#include "openssl/rd_fst.h"
typedef struct
{
u32 rd_key[4 *(MAXNR + 1)];
int rounds;
} RIJNDAEL_KEY;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册