summaryrefslogtreecommitdiffstats
path: root/kernel/seppl.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/seppl.h')
-rw-r--r--kernel/seppl.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/kernel/seppl.h b/kernel/seppl.h
new file mode 100644
index 0000000..edc0d29
--- /dev/null
+++ b/kernel/seppl.h
@@ -0,0 +1,60 @@
+#ifndef _SEPPL_MODULE_H
+#define _SEPPL_MODULE_H
+
+/* $Id: newmail.c 31 2003-10-22 22:59:07Z lennart $ */
+
+/***
+ This file is part of seppl
+
+ seppl is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ seppl is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with seppl; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+***/
+
+#include <linux/spinlock.h>
+#include <linux/crypto.h>
+
+#if 0
+#define DEBUGP printk
+#else
+#define DEBUGP(format, args...)
+#endif
+
+#include "seppl_protocol.h"
+
+struct seppl_key {
+ u8 algorithm;
+ char name[7];
+ atomic_t ready;
+ atomic_t usage;
+
+ struct crypto_tfm *tfm;
+ spinlock_t iv_spinlock;
+ u8 *iv;
+ u8 *key;
+
+ unsigned int ivsize;
+ unsigned int keysize;
+ unsigned int blocksize;
+
+ struct seppl_key *next;
+};
+
+struct seppl_key* seppl_claim_key(u8 algorithm, const char *name);
+void seppl_release_key(struct seppl_key *key);
+void seppl_copy_iv(struct seppl_key *key, u8* iv);
+void seppl_clean_keys(void);
+int seppl_add_key(u8 algorithm, const char *name, const u8* key_data);
+
+#endif