Commit b6dd9218 authored by Niels Möller's avatar Niels Möller

Renamed rc4 -> arcfour.

Rev: src/crypto.h:1.11
Rev: src/lsh.c:1.32
Rev: src/lshd.c:1.27
Rev: src/symmetric/Makefile.am.in:1.6
Rev: src/symmetric/arcfour.c:1.1
Rev: src/symmetric/include/arcfour.h:1.1
Rev: src/symmetric/include/rc4.h:1.5(DEAD)
Rev: src/symmetric/rc4.c:1.3(DEAD)
parent 041f01da
......@@ -35,7 +35,9 @@
(src) += (blocksize), \
(dst) += (blocksize)) )
extern struct crypto_algorithm crypto_rc4_algorithm;
extern struct crypto_algorithm crypto_arcfour_algorithm;
extern struct crypto_algorithm crypto_des_algorithm;
struct crypto_algorithm *make_blowfish_algorithm(UINT32 key_size);
struct crypto_algorithm *make_blowfish(void);
struct crypto_algorithm *make_des3(void);
......
......@@ -169,7 +169,7 @@ int main(int argc, char **argv)
lookup = make_fake_host_db(make_dss_algorithm(NULL));
kex = make_dh_client(dh, lookup);
algorithms = make_alist(7,
ATOM_ARCFOUR, &crypto_rc4_algorithm,
ATOM_ARCFOUR, &crypto_arcfour_algorithm,
ATOM_BLOWFISH_CBC, crypto_cbc(make_blowfish()),
ATOM_3DES_CBC, crypto_cbc(make_des3()),
ATOM_HMAC_SHA1, make_hmac_algorithm(&sha_algorithm),
......
......@@ -183,7 +183,7 @@ int main(int argc, char **argv)
init_host_key(r); /* Initializes public_key and secret_key */
kex = make_dh_server(dh, public_key, secret_key);
algorithms = make_alist(7,
ATOM_ARCFOUR, &crypto_rc4_algorithm,
ATOM_ARCFOUR, &crypto_arcfour_algorithm,
ATOM_BLOWFISH_CBC, crypto_cbc(make_blowfish()),
ATOM_3DES_CBC, crypto_cbc(make_des3()),
ATOM_HMAC_SHA1, make_hmac_algorithm(&sha_algorithm),
......
......@@ -19,7 +19,7 @@ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \
libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \
$(BUILT_SOURCES) \
sha.c md5.c idea.c rc4.c cast.c blowfish.c
sha.c md5.c idea.c arcfour.c cast.c blowfish.c
# Generate DES headers.
$(des_headers): desdata
......
/* rc4.c
/* arcfour.c
*
*/
#include "crypto_types.h"
#include <rc4.h>
#include <arcfour.h>
#ifdef RCSID
RCSID("$Id$");
......@@ -11,7 +11,7 @@ RCSID("$Id$");
#define SWAP(a,b) do { int _t = a; a = b; b = _t; } while(0)
void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len)
void arcfour_set_key(struct arcfour_ctx *ctx, const UINT8 *key, UINT32 len)
{
register UINT8 j; /* Depends on the eight-bitness of these variables. */
unsigned i;
......@@ -32,7 +32,8 @@ void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len)
ctx->i = ctx->j = 0;
}
void rc4_crypt(struct rc4_ctx *ctx, UINT8 *dest, const UINT8 *src, UINT32 len)
void arcfour_crypt(struct arcfour_ctx *ctx, UINT8 *dest,
const UINT8 *src, UINT32 len)
{
register UINT8 i, j;
......
/*
* $Id$
*/
#ifndef ARCFOUR_H_INCLUDED
#define ARCFOUR_H_INCLUDED
#include "crypto_types.h"
struct arcfour_ctx {
UINT8 S[256];
UINT8 i, j;
};
#if 0
void arcfour_init(struct arcfour_ctx *ctx);
#endif
void arcfour_set_key(struct arcfour_ctx *ctx, const UINT8 *key, UINT32 len);
void arcfour_crypt(struct arcfour_ctx *ctx, UINT8 *dest,
const UINT8 *src, UINT32 len);
#endif /* ARCFOUR_H_INCLUDED */
/*
* $Id$
*/
#ifndef RC4_H_INCLUDED
#define RC4_H_INCLUDED
#include "crypto_types.h"
struct rc4_ctx {
UINT8 S[256];
UINT8 i, j;
};
#if 0
void rc4_init(struct rc4_ctx *ctx);
#endif
void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len);
void rc4_crypt(struct rc4_ctx *ctx, UINT8 *dest, const UINT8 *src, UINT32 len);
#endif /* RC4_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment