[BACK]Return to cast5.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_ntl / crypt / cast5

File: [local] / OpenXM / src / ox_ntl / crypt / cast5 / cast5.h (download)

Revision 1.2, Mon Sep 20 00:10:24 2004 UTC (19 years, 8 months ago) by iwane
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.1: +2 -2 lines

include <inttypes.h>

/* $OpenXM: OpenXM/src/ox_ntl/crypt/cast5/cast5.h,v 1.2 2004/09/20 00:10:24 iwane Exp $ */
/*
 * rfc 2144
 *  The CAST-128 Encryption Algorithm
 */

#ifndef __CAST_128_H__
#define __CAST_128_H__

#include <inttypes.h>


typedef struct __cast128_key_t {
	int len;
	int loop;

	uint32_t key[4];

	uint32_t km[16];
	uint32_t kr[16];
} cast128_key;


void	cast128_keyset(const unsigned char *, int, cast128_key *);

void	cast128_enc_i(cast128_key *, uint32_t ml, uint32_t mr, uint32_t *el, uint32_t *er);
void	cast128_enc_c(cast128_key *, const unsigned char *, unsigned char *);

void	cast128_dec_i(cast128_key *, uint32_t ml, uint32_t mr, uint32_t *el, uint32_t *er);
void	cast128_dec_c(cast128_key *, const unsigned char *, unsigned char *);


#endif /* __CAST_128_H__ */