arc4.h File Reference

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  arc4_ctx

Defines

#define ARC4_CTX_SIZE   sizeof ( struct arc4_ctx )

Functions

 FILE_LICENCE (GPL2_OR_LATER)
void arc4_skip (const void *key, size_t keylen, size_t skip, const void *src, void *dst, size_t msglen)
 Perform ARC4 encryption or decryption, skipping initial keystream bytes.

Variables

struct cipher_algorithm arc4_algorithm


Define Documentation

#define ARC4_CTX_SIZE   sizeof ( struct arc4_ctx )

Definition at line 15 of file arc4.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

void arc4_skip ( const void *  key,
size_t  keylen,
size_t  skip,
const void *  src,
void *  dst,
size_t  msglen 
)

Perform ARC4 encryption or decryption, skipping initial keystream bytes.

Parameters:
key ARC4 encryption key
keylen Key length
skip Number of bytes of keystream to skip
src Message to encrypt or decrypt
msglen Length of message
Return values:
dst Encrypted or decrypted message

Definition at line 114 of file arc4.c.

References arc4_setkey(), arc4_xor(), and NULL.

Referenced by tkip_kie_decrypt().

00116 {
00117         struct arc4_ctx ctx;
00118         arc4_setkey ( &ctx, key, keylen );
00119         arc4_xor ( &ctx, NULL, NULL, skip );
00120         arc4_xor ( &ctx, src, dst, msglen );
00121 }


Variable Documentation

Definition at line 123 of file arc4.c.

Referenced by tkip_decrypt(), tkip_encrypt(), wep_decrypt(), and wep_encrypt().


Generated on Tue Apr 6 20:01:48 2010 for gPXE by  doxygen 1.5.7.1