summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1998-07-21 22:23:21 +0000
committerNiels Provos <provos@cvs.openbsd.org>1998-07-21 22:23:21 +0000
commit76077be4bf3b32f321f86f8155efaec34aee1cb1 (patch)
tree9aef4dd593c5037b59f88e74ad77d5bbbc991271 /include
parentcd9dff9842030a7dcf68d2d82df316ac047209b4 (diff)
Add CAST encryption, implementation by Steve Reid <sreid@sea-to-sky.net>.
Man pages will come soon, I hope.
Diffstat (limited to 'include')
-rw-r--r--include/Makefile6
-rw-r--r--include/cast.h25
2 files changed, 28 insertions, 3 deletions
diff --git a/include/Makefile b/include/Makefile
index 008358e754f..9c3a1215ed1 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.52 1998/07/17 22:47:46 espie Exp $
+# $OpenBSD: Makefile,v 1.53 1998/07/21 22:23:18 provos Exp $
# $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
@@ -8,8 +8,8 @@
# Missing: mp.h
-FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h cpio.h ctype.h db.h \
- des.h dirent.h disktab.h elf_abi.h err.h fnmatch.h fstab.h fts.h \
+FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h cast.h cpio.h ctype.h \
+ db.h des.h dirent.h disktab.h elf_abi.h err.h fnmatch.h fstab.h fts.h \
glob.h grp.h ieeefp.h inttypes.h iso646.h kvm.h langinfo.h libgen.h \
limits.h locale.h malloc.h math.h md4.h md5.h memory.h mpool.h ndbm.h \
netdb.h netgroup.h nlist.h nl_types.h olf_abi.h paths.h poll.h pwd.h \
diff --git a/include/cast.h b/include/cast.h
new file mode 100644
index 00000000000..539a727b3e2
--- /dev/null
+++ b/include/cast.h
@@ -0,0 +1,25 @@
+/* $OpenBSD: cast.h,v 1.1 1998/07/21 22:23:17 provos Exp $ */
+/*
+ * CAST-128 in C
+ * Written by Steve Reid <sreid@sea-to-sky.net>
+ * 100% Public Domain - no warranty
+ * Released 1997.10.11
+ */
+
+#ifndef _CAST_H_
+#define _CAST_H_
+
+typedef unsigned char u8; /* 8-bit unsigned */
+typedef unsigned long u32; /* 32-bit unsigned */
+
+typedef struct {
+ u32 xkey[32]; /* Key, after expansion */
+ int rounds; /* Number of rounds to use, 12 or 16 */
+} cast_key;
+
+void cast_setkey(cast_key* key, u8* rawkey, int keybytes);
+void cast_encrypt(cast_key* key, u8* inblock, u8* outblock);
+void cast_decrypt(cast_key* key, u8* inblock, u8* outblock);
+
+#endif /* ifndef _CAST_H_ */
+