1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

just use crypto/rijndael, and nuke opencrypto/rindael.[ch].

the two became almost identical since latest KAME merge.

Discussed with:	sam
This commit is contained in:
Hajimu UMEMOTO 2005-03-11 17:24:46 +00:00
parent 2b37548a71
commit df3c03a773
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143423
6 changed files with 12 additions and 1293 deletions

View File

@ -142,6 +142,9 @@ copies:
cd ${.CURDIR}/../sys/contrib/pf/net; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/net
cd ${.CURDIR}/../sys/crypto; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \
${DESTDIR}${INCLUDEDIR}/crypto
cd ${.CURDIR}/../sys/opencrypto; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/crypto
@ -199,6 +202,11 @@ symlinks:
ln -fs ../../../sys/contrib/pf/net/$$h \
${DESTDIR}${INCLUDEDIR}/net; \
done
cd ${.CURDIR}/../sys/crypto; \
for h in rijndael/rijndael.h; do \
ln -fs ../../../sys/crypto/$$h \
${DESTDIR}${INCLUDEDIR}/crypto; \
done
cd ${.CURDIR}/../sys/opencrypto; \
for h in *.h; do \
ln -fs ../../../sys/opencrypto/$$h \

View File

@ -34,11 +34,6 @@
#define RIJNDAEL_MAXKB (256/8)
#define RIJNDAEL_MAXNR 14
/* XXX: avoid conflicts with opencrypto */
#define rijndael_set_key _rijndael_set_key
#define rijndael_decrypt _rijndael_decrypt
#define rijndael_encrypt _rijndael_encrypt
typedef struct {
int decrypt;
int Nr; /* key-length-dependent number of rounds */

View File

@ -4,14 +4,15 @@
.PATH: ${.CURDIR}/../../crypto
.PATH: ${.CURDIR}/../../crypto/blowfish
.PATH: ${.CURDIR}/../../crypto/des
.PATH: ${.CURDIR}/../../crypto/rijndael
.PATH: ${.CURDIR}/../../crypto/sha2
.PATH: ${.CURDIR}/../../net
KMOD = crypto
SRCS = crypto.c
SRCS += criov.c cryptosoft.c xform.c
SRCS += cast.c deflate.c rmd160.c rijndael.c skipjack.c
SRCS += bf_enc.c bf_skey.c
SRCS += cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c
SRCS += skipjack.c bf_enc.c bf_skey.c
SRCS += des_ecb.c des_enc.c des_setkey.c
SRCS += sha1.c sha2.c
SRCS += zlib.c

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +0,0 @@
/* $FreeBSD$ */
/* $OpenBSD: rijndael.h,v 1.7 2001/12/19 17:42:24 markus Exp $ */
/*-
* 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_H
#define __RIJNDAEL_H
#define MAXKC (256/32)
#define MAXKB (256/8)
#define MAXNR 14
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
/* The structure for key information */
typedef struct {
int enc_only; /* context contains only encrypt schedule */
int Nr; /* key-length-dependent number of rounds */
u32 ek[4*(MAXNR + 1)]; /* encrypt key schedule */
u32 dk[4*(MAXNR + 1)]; /* decrypt key schedule */
} rijndael_ctx;
void rijndael_set_key(rijndael_ctx *, u_char *, int);
void rijndael_decrypt(rijndael_ctx *, u_char *, u_char *);
void rijndael_encrypt(rijndael_ctx *, u_char *, u_char *);
#endif /* __RIJNDAEL_H */

View File

@ -50,11 +50,11 @@ __FBSDID("$FreeBSD$");
#include <crypto/blowfish/blowfish.h>
#include <crypto/des/des.h>
#include <crypto/rijndael/rijndael.h>
#include <crypto/sha1.h>
#include <opencrypto/cast.h>
#include <opencrypto/deflate.h>
#include <opencrypto/rijndael.h>
#include <opencrypto/rmd160.h>
#include <opencrypto/skipjack.h>