[cipher] Add the ARC4 stream cipher

Signed-off-by: Marty Connor <mdc@etherboot.org>
This commit is contained in:
Joshua Oreman
2009-06-24 00:33:50 -07:00
committed by Marty Connor
parent 7eaad90976
commit 05d3be1048
2 changed files with 153 additions and 0 deletions

22
src/include/gpxe/arc4.h Normal file
View File

@@ -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 */