summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorJoshua Oreman2009-06-24 09:33:50 +0200
committerMarty Connor2010-01-05 15:00:20 +0100
commit05d3be1048bcaec5fd989b237a8209b8aae8f6db (patch)
treeec78eaf1b198db7e7ad543e6fe6d2dfe53891d4c /src/include
parent[digest] Add generic CRC32 function (diff)
downloadipxe-05d3be1048bcaec5fd989b237a8209b8aae8f6db.tar.gz
ipxe-05d3be1048bcaec5fd989b237a8209b8aae8f6db.tar.xz
ipxe-05d3be1048bcaec5fd989b237a8209b8aae8f6db.zip
[cipher] Add the ARC4 stream cipher
Signed-off-by: Marty Connor <mdc@etherboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/arc4.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/gpxe/arc4.h b/src/include/gpxe/arc4.h
new file mode 100644
index 000000000..9917628a5
--- /dev/null
+++ b/src/include/gpxe/arc4.h
@@ -0,0 +1,22 @@
+#ifndef _GPXE_ARC4_H
+#define _GPXE_ARC4_H
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+struct cipher_algorithm;
+
+#include <stdint.h>
+
+struct arc4_ctx {
+ int i, j;
+ u8 state[256];
+};
+
+#define ARC4_CTX_SIZE sizeof ( struct arc4_ctx )
+
+extern struct cipher_algorithm arc4_algorithm;
+
+void arc4_skip ( const void *key, size_t keylen, size_t skip,
+ const void *src, void *dst, size_t msglen );
+
+#endif /* _GPXE_ARC4_H */